What's new for developers in upcoming Composite C1 4.0

02 August 2012

Core support for ASP.NET tech in Composite C1 4.0

If you have been using ASP.NET technology like master pages or razor with Composite C1 you might have noticed these were not part of the core product, but added via @burningice's CompositeC1Contrib project. These technologies have turned out to be quite popular among developers even though integration have been lacking in certain areas and GUI support was almost nonexistent. If you wanted to use razor or master pages the contrib project was your savior.

Given its popularity and the fact that we are transitioning our C1 Packages to use Razor in the future, it makes sense to have these technologies in the core of Composite C1 and that is just what we have been working on for the last couple of months.

Here's some of the new features you can expect to see in the next Composite C1:

1. Pluggable page templates. In versions up to C1 3.2 the only option for defining a page template was to write an xml file containing XHTML and C1 markup, which is a working solution but because of lacking an ability of inheriting one template from another it wasn't easy to reuse the template code effectively. Now when we decoupled this part of the system, that allowed us to put in support for other technologies - Master Pages and razor files.

Image no longer available

2. Support for ASP.NET master pages. Here's an example of how a typical template would look like:

Image no longer available

Image no longer available

Unlike xml page templates that were used before, TemplateId is defined inside of the template, and no template specific data is  kept in C1 Data Layer - as a result those templates are easier to copy from one solution to another and to keep their history using version control systems.

A master page is also editable from C1 console, with a compilation check on "save", which makes it safe to apply quick changes without having Visual Studio at hand

Editing master page

3. Razor page templates. Giving the similar to master pages benefits, single razor file (*.cshtml) defines a page template

Image no longer available

4. Razor functions. 

Favorited by many community members and inherited from the the contrib project, razor functions receive own place in "Functions" perspective.

Edit razor function

5. UserControl functions.

Long time requested feature, allows to simply convert your existing ASCX controls into C1 functions by inheriting Composite.AspNet.UserControl and putting them under /App_Data/UserControls.

If you have any feedback or suggestions, you are welcome to leave them on our codeplex forum or add a comment below.

You can try those new features by either downloading C1 4.0 beta sources from codeplex or by installing the latest build via Web Platform Installer.

  ASP.NET  Beta  Razor

comments powered by Disqus