How we migrated CompositeC1Contrib into the core

19 August 2012

How we migrated CompositeC1Contrib into the core

Razor Functions, User Control Functions, .Master Page templates, Razor templates and ASP.NET Sitemap Provider. These are some of the things you will find in Composite C1 4.0. My colleague @napernik wrote Core support for ASP.NET tech in Composite C1 4.0, describing some of the technical aspects of these elements. In this post I will touch on the broader topic of how and why these things ended up inside 4.0. We had a lot of inspiration.

4 out of 5 of these elements are not new features

Previously 4 out of 5 features (Razor Functions, User Control Functions, .Master Page templates, and ASP.NET Sitemap Provider) have been available via @burningice's widely used community contribution project called CompositeC1Contrib. A kick ass contribution, if I may say so, which enabled us to add rather awesome ASP.NET features to Composite C1 with little work.

Our starter sites would install either C1Contrib's Razor Functions or its classic ASP.NET features, depending on your starter site tech choice; so some of you have probably felt these ASP.NET features were built into Composite C1 and were part of the core, but this is giving us way to much credit. We only tested and documented the contribution packages and we added them to the starter sites, so people settings up a new site would get relevant bits from C1Contrib all ready to use.

Refactored into the core of Composite C1 4.0

In the upcoming 4.0 release we have extended the core product so it now ships with the asp.net related features you can find in CompositeC1Contrib. This makes sense because these ASP.NET elements are so crucial they really do belong in the (pluggable) core of Composite C1. The C1 Console should fully support it and ASP.NET developers should have a seamless and tooled experience. We did not copy/paste the C1Contrib code into the core, we carefully lifted all the stones and migrated features with great care.

An example is that we created "pluggable view engine" support in the core C1 Template handling and we added 3 default plug-ins for handling the 'old' XML based templates, Razor templates and .Master Page templates. We did heavy refactoring to the template core, and the reward was that we now have pretty perfect support for Razor/.Master/XML templates and moving forward we can quickly absorb new view engines that may come along.

The new core support for view engine plug-ins was only one of many changes we made in order to migrate ASP.NET .Master Page support from C1Contrib to 4.0. The other C1Contrib features like Razor Functions and Sitemap Provider were moved with a similar courage to change things.

Beside from adding new APIs we also migrated concrete features from C1Contrib to Composite C1 - we did so as if the features were completely new. I.e. we did not feel bound by backwards compatibility or concepts, we only felt bound by the overall use-cases and and our own sense of "right". I personally adhere to a belief that we should never publish a core API until we are certain that things like naming, API usability and overall system coherence feels solid.

The C1Contrib features were pretty well made by @burningice and a lot of ping pong with us happened during its development, so you will see a lot of similarities between C1Contrib and 4.0.

Upgrading a Composite C1 site to 4.0

We have made syntax, naming and concept changes between C1Contrib and 4.0, so when you upgrade a 2.x or 3.x site to 4.0 all existing code using C1Control ASP.NET features needs to be migrated. This is a very big deal, since it complicates the upgrading process.

We will develop a tool which automate the C1Contrib related upgrade process and make it available to the community. Currently we can not guarantee that it will be fully automated, but we will do our best and if any gray zones exists, we will provide good guidance.

So what exactly is new?

All your favorite ASP.NET technology is built in by default, things fit naturally in the core, there is a much richer API, the C1 Console now support all aspects of the ASP.NET features, naming and concepts have been tweaked, new starter sites will emerge. The experience is more wholesome and a lot more seamless, and the features are more rich.

ASP.NET is now truly a 1st class citizen in Composite C1 and ASP.NET developers get a CMS which seamlessly fit with their favorite ASP.NET layout engine. All the cool technology C1Contrib gave you is now always close at hand.

I hope you will begin to use the 4.0 beta and let of know if you think this is made well enough or if you hit any walls while using it. If you want to build your next website on the 4.0 beta, get in touch with us and we may help you get continuously upgraded in exchange for feedback. We believe we have this thing pretty much nailed, but we likely have things that can improve and we need people to use it and help us get those parts better.

To dive in read @napernik's blog post and how you can quickly install the latest build.

Thanks!

Thanks to @burningice for an excellent blueprint to work with and an amazing feature set to target. These are important features and by giving C1Contrib to the Composite C1 community a long time ago this community did something very substantial. True community at work.


comments powered by Disqus