Saturday, November 12, 2011

Creating a Gutter Icon for Proxies

One of the true joys of Sitecore is the ease of customization.  We use proxies fairly extensively on our site, and a colleague recently complained that the Content Editor did not give a clear indication of whether an item is a proxy, and what is its source.  This inspired me to see if I could add a gutter icon to identify proxies, similar to the gutter clones icon that ships with Sitecore 6.4.   (The "gutter" is the area to the left of the content tree with icons, such as "My Locked Items", that can be toggled on and off.)  Like the clones icon, I wanted one that would navigate to the source item when clicked.  This is a fairly straightforward task, but I did have to lean on ReSharper's decompiler to see how the Sitecore guys built the clones icon.

Saturday, July 16, 2011

Structs in C#

Just read a very good discussion on structs in Professional C# 4.0 and .NET 4 (Wrox Programmer to Programmer).

Here are the main points:
  • structs are value types, so they get created and destroyed very fast.
  • They are well suited for grouping together a small number of value fields, such as a pair of ints for X,Y coordinates.
  • Because they are values, they do not need to be initialized with the new keyword.   
  • You cannot override the default constructor, nor initialize fields inside a struct, except in a non-default constructor.
  • If you create an instance of the new struct with new, the fields are initialized to their default values.  If you create the struct without new, you must manually initialized the fields before using them.
Poking around with this some more, I've noticed that creating a non-default constructor does not hide the default constructor, unlike classes.

Tuesday, April 19, 2011

Dreamcore Day 1 Musings

A very full first day at Dreamcore.  The day began with a keynote overview by CEO Michael Seifert on how OMS, content personalization, and CRM integration form a complete circle of customer engagement.   I was struck at how OMS is being woven into the Sitecore product.  For example, the page editor now provides a  interface for tagging content by marketing persona using a nifty feature called Persona Cards, and there is now a very intuitive automation designer that handles building personalization workflows.  Alexey Rusakov showed off more of what the page editor can do in 6.5, such as generating item clones and spinning off personalization rules.  Empower the content author!

Wednesday, February 2, 2011

Agile Estimation and Planning

I just finished Mike Cohn's Agile Estimating and Planning, a thorough and very readable treatment of how Agile works as a project planning methodology. Here are my takeaways:

Wednesday, January 19, 2011

Sitecore Hands-Off Deployment

Managing the Sitecore Web.config file across development, test and production environments can be a major headache for source control and deployment. Do you store the version you need for development in source control? And since this version differs from what's needed to run the production website, it's difficult to use the publish option to deploy changes to the website.

Fortunately, Visual Studio 2010 has added some very nice functionality for managing different flavors of Web.Config, through the Web.Config transform feature of the Web Deployment project. This feature allows you to specify, and check into source control, the specific changes you need to make to change a development Web.Config into a test or production version.

Steve Green has a useful post outlining this feature.