Microsoft

Blog Categories

Archives

Archive for the ‘.NET’ Category

Sitecore once again a Leader in Gartner Magic Quadrant for WCM

GartnerMQ_Picture1According to Gartner, companies that prioritize customer experience generate 60% higher profits than competitors. And more than ever before, web content management is viewed as mission-critical across an organization – whether your focus is on IT application, digital experience, marketing or merchandising.

As we work with many of our customers on their digital transformation journey, we assist in the development of a well thought-out customer experience strategy and ensuring the means to successfully execute. Since many of these customers have .NET technology, we often recommend they take a look at Sitecore, a global leader in customer experience management software and Microsoft’s 2014 Alliance ISV Partner of the Year.

I work closely with Perficient’s Sitecore team and was excited to see that last week, Gartner named Sitecore a Leader in the Magic Quadrant for Web Content Management for the sixth consecutive year. The Web Content Management report evaluates 19 vendors on their Ability to Execute and Completeness of Vision. This year, Sitecore secured the highest position of all vendors for its Ability to Execute. In discussing Sitecore’s strengths, the report mentions:

The range of capabilities in version 8 of the newly positioned Sitecore Experience Platform is among the best in the market. Sitecore has incorporated into the product some highly valuable features, such as engagement analytics, a/b testing (or split testing) and data management platform capability.

Sitecore has increased its installed base in all regions that drive the WCM market. This means customers often select it for more leading-edge and market-defining solution contexts.

You can download the full report here.

Azure: Did You Know? Block vs Page Blobs

storage1Azure storage service supports two types of blobs (blob, or BLOB, stand for Binary Large OBject, i.e. an unstructured binary data): block and page blobs. Blob type is selected when blob is created and then it can’t be changed. Although both blob types allow for storage of large binary objects in Azure, they are optimized for different storage scenarios.

Read the rest of this post »

Glass.Mapper Version 4 – Top New Features

I recently discussed a few best practices for utilizing Glass.Mapper for mapping Sitecore content templates to strongly-typed C# objects. I also briefly mentioned that the Glass.Mapper library was upgraded to version 4 this past May. For Sitecore developers, this is significant news, and this release introduced a few great changes worth mentioning:

  • Simplified Nuget Packages: Previous versions of Glass.Mapper utilized multiple Nuget packages (Glass.Mapper, Glass.Mapper.Sc, Glass.Mapper.Sc.Mvc-5, etc.), but V4 only uses one (Glass.Mapper.Sc). While Nuget does a pretty good job of managing dependencies, it’s still nice to see simplification as an objective of the Glass.Mapper team.
  • No IOC Dependency: Castle Windsor, an inversion of control library, was previously used throughout Glass.Mapper, but has since been removed for V4. The factory pattern is now used for object instantiation, while also allowing developers to use their own IOC container with much less fuss than before.
  • Traditional MVC Support: Glass.Mapper has typically made Sitecore Page Editor support fairly simple, minus a few quirks. Previously, views had to inherit from a GlassView object (Glass.Mapper.Sc.Web.Mvc.GlassView) to get access to Page Editor-friendly helper methods, but now they live as HTML helpers that are much more familiar to traditional ASP.NET MVC developers.
  • Caching: V4 of Glass.Mapper supports simple caching via attributes, and an interface can be implemented to utilize any caching tools that developers prefer. This does allow for significant gains in performance over V3 and non-caching V4 implementations. Relatively static content on a site (menus, headers, etc.) are prime candidates for caching with Glass.Mapper.

For further reading, check out the Glass.Mapper.Sc documentation, and get a detailed look at version 4 in a presentation from the Sitecore Virtual User Group.

Azure: Did You Know? Hybrid Connections as VPN Alternative

hybrid2In real life cloud deployment scenarios one of the very common cases is when only part of the application resides in the cloud. Usually, it’s when there is a legacy system which can’t be migrated to the cloud and resides on premises, or it’s not optimal to deploy entire system to the cloud. After all, cloud is not an answer to every question. In this case, these is a need to establish a connection between parts of the applications which are deployed in Azure (for example, a web site), and parts which reside on premises (for example, a mainframe).

Read the rest of this post »

Sitecore Glass.Mapper: Concrete Classes vs Interface Mapping

glass mapperGlass.Mapper is a great object-relational mapping (ORM) tool built on .NET for the Umbraco and Sitecore platforms. As a Sitecore Platinum Implementation Partner, Perficient and its developers use the best tools available, and Glass.Mapper is right up there in our preferred Sitecore tool belt.

As a Sitecore developer interested in using Glass.Mapper, you should consider one important architectural decision that can really impact ease of development and long-term maintenance of your project: should you write C# interfaces or concrete classes to represent Sitecore data?

The Basics: Templates to Objects

At its most basic, Glass.Mapper maps a Sitecore template to a strongly-typed C# object – very POCO friendly. Template fields are exposed as read/write properties, and distinct classes allow for easy testing. This allows you to quickly mirror your templates in code and have easy access to your content fields.

Best of all, Sitecore’s multiple template inheritance can be easily represented via Glass.Mapper, but here’s the catch: C# does not allow multiple inheritance for concrete classes, but does support the concept via interfaces. With this in mind, is there a best practice for designing classes/interfaces with Glass.Mapper? Let’s take a quick look at both options.

Concrete Classes

While concrete classes lack multiple inheritance, they do support base classes, which can be useful for modelling Sitecore’s basic item fields (ID, ItemName, DisplayName, Path, etc.) on a base class, then extending that with a template definition as necessary. This also lets you add methods directly on the classes, which helps consolidate business logic and simplify discovery of functionality.

Because inheritance options are limited, concrete classes work best for content with simple structures and limited repeatability – in other words, a site with a small number of Sitecore templates or those with overall simple structures.

Interfaces

Because interfaces can be inherited multiple times, Sitecore items with multiple templates are a natural fit.

In my experience, this works best when you keep data modelling simple: use interfaces to model Sitecore templates as if you were building simple POCOs. Start by creating an interface based on each of your templates (including necessary inheritance from other templates), then let Glass.Mapper do the heavy lifting of mapping across all said interfaces. Don’t try to implement concrete classes and extend logic or add custom fields/properties. Just read/write data from Sitecore and use helper classes or extension methods to add functionality around your models.

Previous versions used the Castle Windsor IOC library to generate proxy objects, but the new-for-2015 Version 4 uses the factory pattern to accomplish the same thing.

For additional information on interface implementation with Glass.Mapper, refer to this documentation.

Choose Wisely

Glass.Mapper works best when your data modelling is kept simple: use C# interfaces to model Sitecore templates. Only consider concrete classes for simple data structures and small websites. If you want to mix-and-match, you can define interfaces and implement concrete classes farther down the inheritance tree, but remember that you will have to implement methods and members for all inherited interfaces – which negates the simplicity of Glass.Mapper quite a bit.

Ignite 2015 Recap – Top 3 Sessions to Replay

ignite mainWelcome back from a great Ignite Conference! By now, I hope everyone knows that the conference recordings are posted to channel9, a section of MSDN. Microsoft does a great job of recording and publishing all of this content quickly, its pretty awesome.

One of my biggest challenges at the conference was knowing which session to pick. There were 3-6 sessions at any given time that I wanted to go to. All week it was like that, crazy.

This year, Microsoft added “foundational keynote” sessions. Sadly, most of them were on Monday and over-lapped each other. I went back and downloaded the videos and they are all amazing, filled with product name changes, roadmap discussions, and a very transparent look at Microsoft’s Cloud Strategy. Read the rest of this post »

Ignite 2015 – DevOps Strategy, Visual Studio Online Announcements

ignite mainFor my first session at Microsoft Ignite Conference 2015, I chose DevOps as a Strategy for Business Agility by Brian Harry, Microsoft Technical Fellow and he serves as the Product Unit Manager for Microsoft Team Foundation Server. I must say, it was a great choice.

Brian kicked off this amazing session with only a few, very short slides, explaining the benefits of DevOps and apologizing that the title was not completely accurate. Brian did discuss the strategy and why DevOps is extremely important, however he understood his audience was much more interested in all things Visual Studio Online and Team Foundation Server.

(If you want to know more about DevOps and how it can help transform your business, email me)

As head of the TFS team, Brian is in a unique position to share how he manages his team and runs his development life cycle. Read the rest of this post »

Azure: Did You Know? Always On Web Apps

alwayson-1When you creating a new web app (or web site, how it used to be called until recently) it’s have “Always On” setting off by default, which means the web site will be recycled after period of inactivity (20 minutes). This setting is somewhat similar to “Idle Time-out” setting on IIS application pool.When you web app is recycled, it will take Azure some time to bring it up the site when it’s accessed next time (in my experience it may take about 5-10 seconds) which could be frustrating for user.  So enabling “Always On” setting on Azure web app increases application responsiveness, especially if application is not very frequently accessed by users.

Read the rest of this post »

Top 10 Announcements from Build 2015 Keynote on Day 1

The 2015 BUILD Conference kicked off today, and today’s keynote was packed full of TONS of announcements and new information. Some of these things are going to be released sometime this year, but some of it has also been released to be available today! Even though you can watch the Build 2015 Day 1 Keynote anytime online, I thought I’d compress it down to the points I think are the most significant.

Keep in mind, this isn’t a full list of everything announced. Honestly, you have to watch the keynote to get everything.

Visual Studio Code for OSX / Linux / Windows

Visual Studio Code Announcement
This is exactly what it looks like, a lite version of Visual Studio that runs on ANY operating system you want. As of today, Visual Studio isn’t only on Windows anymore.

Visual Studio Code can be downloaded today, here: http://code.visualstudio.com

Windows Holographic Platform

HololensMars

The Windows Holographic Platform is the platform behind the hardware that is HoloLens; Microsoft’s Augmented Reality glasses/headset. This is some super innovative technology that has the potential to fundamentally transform the way we use computers. The HoloLens was first announced a few months back, but today Microsoft shed a little more light on the technology surrounding it:

  1. HoloLens applications are built as Universal Windows Apps and distributed through the Windows Store
  2. HoloLens is stand alone and doesn’t require a phone or PC to use
  3. Any Universal Windows App can be placed / overlaid on your wall, refrigerator, or what ever you want within your space

Universal Windows Apps = 1 Platform & 1 Binary

UniversalApps

Universal Windows App will allow for developers to build a single application and distribute that application as a single binary that will run on any device that runs Windows 10; including: phones, tablets, laptops, desktops, Xbox, HoloLens and IoT (Internet of Things) devices.

Universal Apps built with Web, .NET, Win32, Java, C++ or Objective-C

WinAppsWithJavaObjC

This one is a handful of awesome! The tooling for building Universal Windows Apps will support the ability to write Universal Windows Apps with .NET, Win32, C++, Java, Objective-C and web technologies (html/javascript). You’ll be able to share code between Android and/or iOS with your Universal Windows Apps!

Web Apps as Universal Windows Apps

Web apps will be able to be registered in the Windows Store so that they run on Windows 10 as if they are a native Universal Windows App.

Android App Support

Windows 10 will have a Android based sub-system that will allow for Android apps to be packaged up and distributes through the Windows Store. This is to make it extremely simple to take an existing Android app or Android Java code and reuse it to target the Windows 10 Platform.

One thing to note about the Android sub-system is that it will run the apps within a sandboxed environment, so the system can be kept safe and secure.

Windows Store for Business

WindowsStoreForBusiness

The Windows Store will be able to be customized by companies and schools who wish to customize the apps listed.

Windows Phone as Desktop Replacement

Functionality was announced with a demo of using a Windows 10 Phone as a desktop computer by connecting an HDMI monitor/tv with Bluetooth keyboard and mouse. Universal Windows Apps run on the phone as normal, but when you connect a monitor/keyboard/mouse you can use the apps as if you’re on a desktop computer.

Microsoft Edge Browser

MicrosoftEdgeBrowser

The Microsoft Edge Browser was announced as the official name of the new web browser from Microsoft that was formerly known as Project Spartan. This is a browser that is “built for doing” by integrating built-in note taking and sharing. The Edge browser will also include support for Browser Extensions built with standards based JavaScript and HTML.

New Azure SQL Database Features

AzureSQLNewFeatures

There are a few new features being introduced to Azure SQL Databases:

More!!

This was a very exciting day to kick start a very exciting week for Microsoft and the Windows platform! There is so much more in the Build 2015 Day 1 Keynote than I could list here. If you’re interested, I encourage you to go watch/listen to the full keynote over on Channel 9.

http://channel9.msdn.com/Events/Build/2015/KEY01

 

Image Credits: The images above were taken from screenshots of the keynote video.

Working with dynamic schema in Azure DocumentDB

dynamicAbout a week ago Azure DocumentDB, a new Microsoft’s entry into NoSql database market, become generally available. DocumentDB allows user to to store/update/delete arbitrary objects (as complex as needed, not limited by relation structure) and query these objects using a special (quite limited) flavor of SQL (yes, SQL!) or LINQ when it’s used from .NET. Although these kinds of databases are called NoSql, they should rather be called object databases, or non-relational, because, well, you can still use SQL to query them.

So, these objects that you can story in DocumentDB, they could be really anything. However, in order to effectively use DocumentDB .NET client library, you need to know the object schema in advance. For example, let’s say you have the following class:

And then you instantiating the object of this class and storing it to DocumentDB (assuming that you already created database, document connection and client): Read the rest of this post »