When Written: Feb 2011
Umbraco- A great Open Source .NET CMS
A lot of my time in recent months has been taken in evaluating CMS systems for a client of ours. After looking at the market leaders like WordPress, Joomla and Drupal to name a few we tried, it was felt that because they all used php, and the client wanted something that they could develop against and so extend it and as they had a lot of in-house .NET expertise a .NET CMS would be the preferred option. There are a few of these but they are not as well known as their php cousins. DotNetNuke, Kentico, and Umbraco were chosen as a shortlist.
Now, before I get bombarded by emails from companies who market .NET CMS systems that cost several thousands of pounds, many of which are quite stunning products, saying that their product is so much better let me explain further. It was felt in this case by our client that because they wanted to resell web sites built on the back of this CMS that having a licence cost that would need to be recovered first would put them at a bidding disadvantage as most clients have heard of the many ‘free’ CMS out there, so paying a licence fee for your product immediately puts you at a disadvantage to your competitors. Kentico was eventually ruled out despite being considered the most fully featured because of this and because of the limitations of only one editor being allowed.
Some CMS present you with complete pages and you spend most of your time finding out how to remove all the bits you don’t want, others present you with a very basic framework and you have a steep learning curve to get it knocked into some sort of shape that can be used. What was liked about Umbraco was that although the install could leave you with such a basic framework, there were a couple of simple starter sites which provided just the basics to get you up and running. Modifying the designs is very simple to understand if you are familiar with ASP .NET Master pages and content areas. The styling is done via standards based CSS and the programming can be anything supported on the .NET framework.
There are several extra modules available in the community web site ( our.umbraco.org ) but thankfully not such a bewildering selection as there is for something like Joomla, which should minimise the problem of certain combinations of modules not working properly together, a situation experienced by a couple of ISP colleagues. A lot of the production of dynamic pages and menus is done with XSLT pages. XSLT takes XML data and transforms it to display it the way you want; it has the equivalent of for, next loops, conditional statements and most of what you would expect in the presentation layer of a modern language.
2nd Edition of this book makes a great reference when battling with XSLT
Whilst I have used XSLT before and have written about here before I was very pleased to have O’Reilly’s ‘XSLT Cookbook’ (ISBN 0-596-00974-7 ) arrive on my desk the other day. The ‘Cookbook’ series I find very useful, as rather than a simple list of commands and their syntax, for which I often search on line or rely on intellisense when coding, these books are full of real world examples of how you might code round a particular problem. My copy sits beside me at the moment while I battle with new functionality for this Umbraco CMS. For example: To generate a menu based on the structure of your web site automatically you would need something like:
First get the variables that you are going to need:
<xsl:variable name="rootNode" select="$currentPage/ancestor-or-self::root" />
<xsl:variable name="homeNode" select="$rootNode/CWS_Home [@isDoc]" />
Then start to set up the unordered list in the generated HTML
Now walk through the first level of pages in the site
<xsl:for-each select="$homeNode/* [@isDoc and @level = 2 and string(umbracoNaviHide) != '1']">
Now check for the current page so you can mark it as selected in the list and apply a different style
<xsl:if test="$currentPage/ancestor-or-self::* [@isDoc]/@id = current()/@id">
Build the links on the menu items
<xsl:value-of select="@nodeName" />
Close the list item
Finish loop and tidy up HTML
All pretty familiar stuff and XSLT is also incredibly powerful in manipulating data types and the way they are displayed.
Microsoft’s Web App Gallery makes installing complicated groups of applications a breeze
All this testing of various CMS was made a whole lot easier with the excellent Microsoft Web Installer (http://www.microsoft.com/web/gallery ) , which although it has been around for a while now, I find it surprising that people who I assume would know of such things have never heard of it. In case this sounds like you, let me explain. Web Installer will check your system and install all the various technologies needed to get a working and pre-configured copy of, in this case, a CMS but there are a variety of larger applications available on this site. So for example the Umbraco install might install on your machine the .NET framework, SQL server and IIS all configured to work first time. It really saves a lot of time if you are just wanting to try things out then you can spend time learning the backend configuration options once you have decided that the product is for you.
Article by: Mark Newton
Published in: Mark Newton