My current project requires both e-commerce and content management features at the core of its solution. Whilst this would seem to be a fairly obvious and common requirement, the current offerings in the .Net world seem to be lacking when you try to consider both requirements. Sure, there are some great .Net CMS tools (Umbraco being my favourite) and there a number of e-commerce frameworks to pick from, but there seems to be a bit of a void when looking for an enterprise scale e-commerce framework that includes a fully featured CMS system.
Howard posted recently about the state of play of open source CMS in the .Net world. The outcome of this investigation was that we chose N2 CMS as our content management framework and have been working with and building our site around this tool for the last few weeks. Here’s some initial thoughts around why I think N2 is the right choice for our solution.
It doesn’t take over the solution.
N2 is a CMS framework, not a fully blown CMS solution that you install and have to work around they way it does things. In fact, you can integrate N2 into an existing website, however it has been built, by using the N2 API – it’s really flexible in terms of how involved you want N2 to be in your application. You could make the decision to use N2 to manage your CMS requirements even if only 1% of your overall solution needed CMS functionality. It doesn’t have to be “an N2 site” in the way that it would do with Umbraco for example. In fact, you could use N2 without a website at all – the API would integrate into any kind of solution.
That said, if your website is a pure CMS solution then N2 can be used as the core of the system. They also provide a fully featured example site to get you up and running.
N2 does not impose a particular style of development.
I think Umbraco is great, but I dislike editing code, templates, macros etc through the admin interface. N2 means we can code in the way we want to, developing as we would do normally using good solid development engineering practices and tools. Content definitions are built up in .Net code, which means we can follow OO principles and they can be unit tested and refactored easily like any other piece of code. The N2 source code is available so if you wish you can see the inner workings and even modify if you want to. Its built on a good technology stack - .Net, Castle Windsor, NHibernate and SQL Server, which fits exactly with the rest of our solution.
It sits nicely with Asp.Net MVC (so far).
Our public facing website is built using Asp.Net MVC. N2 include an example of how to use a custom N2 route with MVC which means that it will intercept incoming requests first and try to process them. Admittedly, this example is no where near as advanced as the templates site, but its working well for us so far. I think as our solution becomes more complex we may encounter some complexities with the route definitions, but Asp.Net MVC routing is very flexible and customisable so I think we will be able to solve anything that doesn’t hang well straight away with the N2 content route.
The out-the-box admin interface also sits nicely side by side with an MVC application. We have two projects in our solution – one MVC application with our code in it and then a Web Forms application which contains the N2 Edit Site code (unmodified). We just link the two together via a virtual directory in IIS and everything fits seamlessly.
It has a great API.
For an open source project the documentation is quite good, with a number of examples. This is being built on by the N2 community in the form of a wiki, and also an active discussion forum. However, who needs documentation when you have an API like this:
So, for now, I’m very happy with N2. I get the feeling this may well be the subject of a number of posts in the coming weeks…