We, at Hedgehog Development, have been intimately working with Sitecore serialization since it was released with Sitecore 6.0 in 2008. Specifically our interest has been in helping developers bring their Sitecore items into Visual Studio and essentially allow you to treat your Sitecore items as code. We do this with our Team Development for Sitecore product.

I was having a discussion the other day and was asked to elaborate on the serialization format that Sitecore uses. I figured I would have some notes, or official documentation, on the format, but I couldn't find any! I figured this is a good a place as any to describe the serialization format that Sitecore uses. More...

Sitecore Rules Engine and RegEx

September 29, 2011

I was having some fun with the Sitecore (6.5.0.110818) rules engine over the last couple days. Specifically, I was trying to show content editor warnings as well as control icons for templates based on the name of the item. However the Item name comparison, when using a regular expression, was never evaluating to true. More...

I have a nice assortment of little scripts that I've written over the years to perform various tasks within Sitecore. Based on this Stack Overflow question I figured I would release one.

This script will show, and allow you to reset, the __security field on all items in a subtree. The code wasn't written to be pretty; it was written quickly to perform a very specific task.

To use this, simply drop this aspx file into your webroot and browse to it. Delete when done. More...

This post is in response to another blog post by Dmitry Vasilinenko. I posted this up as a comment, but it was quickly taken down for some reason.


Dmitry,
Continuous Integration (CI), for Sitecore based web sites, has been gaining traction over the past few years particularly amongst solution partners (i.e. Hedgehog Development, Pentia, Inmento, etc...) and I am glad Sitecore is starting to take an interest in it.

Part of my responsibilities here, at Hedgehog Development, has been to help other Sitecore partners create a proper build/deployment processes including the use of CI for their team. The major hurdle I've seen is the amount of understanding and time required to get a proper process in place.

You've identified some fundamental concepts of Continuous Integration for any software development project. I also strongly agree that your project and the underlying CMS should be separate! This is something I've been pushing for some time now, and I believe is finally gaining support.

The one aspect of CI with Sitecore that appears to be glossed over though is the Sitecore templates, or Sitecore items in general, and how they are handled. In my opinion, the Sitecore templates (and items) that are created specific for the solution at hand should be treated as code. The C# code you write would be worthless without the items then require. We, at Hedgehog Development, had created the Team Development for Sitecore (TDS) product to close this gap. TDS addresses many of the points you raise as well as the ability to deploy your sitecore items as code to a different Sitecore installation.

As for your recommend free tools, and this is just my own opinion, I don't particularly care for them. I would suggest that the readers take a look at TeamCity by JetBrains, rather than cc.net + nAnt. TeamCity is also free and is a bit easier, IMHO, to work with. Personally, I am very happy with using Microsoft Team Foundation Server. The integration with Visual Studio is 2nd to none and the build and testing functionality is great. I do understand that this software isn't free, which is why you mentioned SVN, cc.net and nAnt.

Sean Kearney
Sitecore MVP


References:
Sitecore and Visual Studio: http://seankearney.com/post/Visual-Studio-Projects-and-Sitecore.aspx
Hedgehog: http://TeamDevelopmentForSitecore.com
Pentia: http://mcore.wordpress.com/2008/02/29/continous-integration-and-sitecore/
Oshyn: http://oshyn.com/_blog/Web_Content_Management/post/Enterprise-Sitecore-Continuous-Integration-Configuration-Management/

You might be interested to hear about a new initiative that Hedgehog Development is undertaking, the Sitecore Users' Virtual Group. This user group is dedicated to supporting the Sitecore community wherever they exist across the globe. We have some great speakers lined up for our first sessions, and we’re looking forward to their deep expertise on Sitecore development. All sessions are free of charge and conducted over the web. The current schedule is at http://www.sitecoreug.org
 
Our first presentation will take place next Wednesday, May 18, at 9:00 AM Pacific, Noon Eastern, or 5:00 PM UK time. John West, CTO of Sitecore North America, will discuss the state of Sitecore and the CMS marketplace. John has graciously agreed to answer your questions. If you have any questions, please go ahead and submit them to our site at http://www.sitecoreug.org/question.aspx.
 
The attendance link will be mailed out next week. If you would like to attend, please register at http://www.sitecoreug.org/registration.aspx.

Looking back at 2010 I can confidently say the biggest news I was hit with was that I am having triplets. A pair of identicals girls and a singleton girl to be exact. This is, of course, in addition to my two year old son. I always wanted four kids so I am pretty stoked!

The actual due date is April 29, 2011 but as you can imagine we are expecting them a bit earlier. The average gestational period for triplets is 33 weeks, which puts them around March 11.

Needless to say things have been changing in my world. The most recent would be the sale of a web site I owned. I hope to have some more good news as soon as next week and I'll save that for another post.

I did stumble on this video and must say it has summed up a lot of my conversations recently and I imagine how they will be for a long time.

 

Selling RSWarrior.com

January 24, 2011

In the Summer of 2002, I was 24 years old, single, had a good number of friends who rode motorcycles, and my 1989 Suzuki GSXR 750 just broke down. I purchased the Yamaha Road Star (Star Cycles) Warrior in June, which, at the time, was one of the fastest and best handling power cruisers in the market. Being that I was coming from the sport bike realm, this was the bike for me.

2002 was the first model year for the Warrior so there wasn’t yet a community site up and running. There was a community of Warrior owners on a hosted forum site (Delphi), as well as a fan’ type site, but they had missing pieces. I started the rswarrior.com site in June of 2002 primarily using software written by me. With a bit of luck, and help from key people, the site took off.

Fast forward to December 2010. I am 33 years old, married, a home owner, a father to a two year old, and I have three girls on the way (yes you read that correctly). I still have the Warrior and put a few miles on it a year back and forth to work. However, my life has changed. I have responsibilities that life insurance just won’t cover, many of my friends no longer ride, and my passion time for motorcycles has dwindled.

I’ve been a fairly silent member on rswarrior.com over the last five or more years. There has been a great moderator team and, to be honest, they’ve ran it so well that I’ve been able to be silent. As silent as I was, I did always have my hands and eyes on it. The site had grown to over 21,000 registered members making about 30,000 pageviews a day. However, as my time for riding has dwindled so has my time for running the site. Even with the moderators doing a phenomenal job I just can’t help but feel that the site would be better off under someone else.

In light of the recent changes in my life, and changes yet to come, I’ve decided to let the site go. As of November 1, 2010 I am no longer the owner of rswarrior.com and by the time your read this you will have noticed that the site has changed hands.

I know that many of the 21,000 rswarrior.com members reading this are wondering what this means for them. I sincerely hope that it means you have a much better experience using the site. I created the site with a lot of blood, sweat, and tears and I know the moderators put in countless hours to keep the site running. I wouldn’t turn the site over unless I thought it was for the better. I still have the Warrior and will continue to be a member on the site.

Reflecting back, the site has had its share of bumps along the way. Very poor web hosts, server upgrades, weekend long down time, lost members, fighting members, thieving vendors, design and software changes, etc.. ultimately the community got through it all. I really do hope that the ownership change is just another small bump in the road and the community continues to grow.

I have a multi-lingual Sitecore (6.2) site that has been having many issues with item versions showing up in their site myseteriously. The client has over 12 languages in their site and certain items shouldn't be accessible to certain languages. Now, Sitecore says simply don't create a version of the item and it won't appear in the site for the language. Perfect? Nope.

There are dozens of pages scattered in the Sitecore tree that shouldn't exist in the English site. However, on any given day one of these pages starts showing up in the English site. There isn't an English site author creating a version and, to make it even more frustrating, there is no audit trail of them being created! I've logged about 10 'bugs' with Sitecore on ways to have these versions magically appear in the tree (and there are more that I haven't reported). Most of them have been addressed with hot-fixes, but I think it boils down to one fundamental issue with Sitecore...

A Sitecore item NEEDS at least one version. Shared fields are the reason we need a version. A "shared field" is a field whos value has no boundaries. The value is available to all versions in any language. Things like workflow, security, display name, sort order, etc... are stored in a shared field on a version of an item. If you have an item with no version than it has no security, display name, or sort order.

This leads me to one of my bugs. As an example, try this.

Create a little subtree of five items names 1, 2, 3, 4 and 5. Now:

  1. Remove all versions from this item
  2. Sort item '5' using the 'First' sorting button
  3. Sort item '5' moving it 'Down' below item '1'

You should now observe that there is a version for every item in our subtree. We only worked on item '5' yet all items have a version. This shouldn't happen; I never told it to create a version!

Once you introduce multiple languages into the equation it gets better! Say you have this same sub-tree and they all have a version in English. Now, change the language you are working on within Sitecore to Danish and resort the tree. You will notice that Sitecore went ahead and created Danish versions of all the items. Worth noting is that the version that was created would have bypassed any language security too. Why couldn't Sitecore just save the sort field on the English version (it is a shared field)?

I will admit that my example is a bit contrived. It probably would never exist as is, but we do have a client that has items scattered in their tree that do not have any versions. I will also admit that this could be a training issue, but I still feel it raises a fundamental flaw in the system.

I think the first step in fixing the problem is that there NEEDS to be at least one version of an item. The "Remove Version" button should check to see that it isn't the last version of all languages. If it is the last version then it can't be deleted.

I would love to hear your thoughts.

P.s. I haven't seen Sitecore 7.0, but I can imagine that the fundamental architecture changes with it will (hopefully) address this.

This is a topic that I've been meaning to cover for some time now, but it is this post by John West that pushed me to do it sooner rather than later.

There are basically two ways of working with Sitecore.

  1. Your solution, and code, is fully immersed in the Sitecore web site.
  2. Your solution, and code, is outside of Sitecore's web site and you use some post build process to deploy.

John's post, and Sitecore documents, suggests that you go with option 1. I, however, do not agree that this is the right way to go. I feel that my code should not be mixed in with over 6,000 of Sitecore's files. Here are some reasons:

  1. The most important advantage is a clear understanding of the ownership of files in the solution. Everything checked into source control is explicitly owned by the solution being developed. All other files are owned by Sitecore or a third party package installed in Sitecore.
  2. I want to be able to distinguish my files from Sitecore's just by looking on the file system.
  3. If I need to ship the code to my client I simply want to zip up my 'workspace' and not have to wade through out-of-the box Sitecore files.
  4. I want my development environment to be as close as possible to a production environment. This means no .cs files in my web root

I've been working outside of the web root for three years now and wouldn't consider it being any other way. In fact, I am always wondering why you would want to work out of the web root as Sitecore suggests. I spoke to a client recently, while proving support for Team Development for Sitecore, and their answer was simply, "we didn't know better." That isn't acceptable.

Here is the way I work and highly suggest you work as well.

  1. Use IIS and configure Sitecore somewhere other than C:\[Workspace]\[Client]\trunk\. For example, C:\Sitecore\[Client]\Website
  2. Create your Visual Studio solution (and projects) outside of the web root. i.e. C:\[Workspace]\[Client]\trunk\ClientWebsite.sln
  3. Add references to any Sitecore assemblies as needed. Make sure to set "Copy Local" to false as John West suggests.
  4. Use a post build step to copy the output of your compiled Web Application project to the location specified in step 1. Or, better yet, use Team Development for Sitecore to handle the deployment for you.
  5. To debug, you will need to make a change to the Web Application project. On the 'Web' tab of the properties for your Web Application project you should choose the "Use Custom Web Server" option and enter in your development Sitecore URL. Once this setting has been specified you can now press F5 to build your project and debug normally. This may require some IIS components to be enabled, depending on your system. This will also work for IIS running on a remote machine (and virtual machines) as long as remote debugging components are installed on the remote machine.

Taking this one step further, you NEED to be using source control and automated builds in your development. Continuous Integration is also a good practice and possible using Team Development for Sitecore! Cost shouldn't be an excuse either as there are free tools out there to help you with this!
We, at Hedgehog Development, have done a good number of Sitecore sites this way and we do consider this a best practice. We are able to bring new developers onto a project in minutes and can roll out builds effortlessly.

I would love to get some feedback on this. Please let me know if you love working out of the web root as Sitecore suggests.

I spoke with Jens Mikkelsen and Jimmi Lhyne Anderson from LearnSitecore the other week about who I am, Dreamcore and Team Development for Sitecore.

What is Team Development for Sitecore and how can it help you?

Download: Learn Sitecore

Subscribe: iTunes

This was my first podcast experience so cut me some slack ;) Thanks to Jens and Jimmi for having me.