Introduction to "Bellevue" project
Bellevue is a prototype of a new Open source template engine for Asp.Net MVC framework. Bellevue uses pure HTML in its core - without any additional tags or syntax. It then uses CSS-like syntax to inject the active logic into the HTML - or in other words: to bind the data from the model to the view.
The design goals of Bellevue are:
- Respect HTML as first-class language as opposed to treating it as "just text".
- Don't mess with my HTML! The data binding code (Bellevue code) should be separate from HTML
- Enforce strict Model-View separation as described by Terence Parr here
The idea in brief
Pretty much all existing template engines (MVC view engines) start from HTML, but then force the developers to modify this HTML to insert active content in the middle of the HTML.
For example in Asp.Net Web Forms, you add
<% ... %> tags in places where you want the active content to be shown:
These modifications render the original HTML useless for many purposes: it can no longer be shown stand-alone in a web browser and most of the WYSIWYG editors can no longer show it properly.
Bellevue takes a different approach. It keeps the original structure of the HTML as-is:
... and then uses a separate CSS-like script to inject the active content within the HTML:
Bellevue View Engine is a fully Asp.Net MVC compatible view engine: It will support all features of Asp.Net MVC and you can mix it with Web Forms views and even with other view engines. It will be released as open source using some License, which I have not yet decided. I reserve the moral right to release additional tools or versions with commercial license, but basic view engine will be free.
Before we get deeper into code, let's get the expectations straight: This is a preview demonstrating the idea. Even though I am releasing the source code, the point of this article is to get some feedback about the idea - not really about the implementation.
If you are looking for something you can actually use in production, please check back in one or two months. I am about to start a major rewrite to fix the hack-level code and I should hopefully have a more production-level implementation in May-June timeframe.
To get started with Bellevue, I would suggest the following: