CSharp Templating Engine investigation

    In order to render html from our C# REST service we had to look into templating engines available in C#, since we wanted our generated html to be altered on the fly.

    We came across the following

    4 View engines exist in

    MVCContrib project

    Which are

  1. Brail
  2. NHaml (NHaml has been moved from MvcContrib into a separate project)
  3. NVelocity
  4. XSLT
  5. In addition we found the following two engines


    StringTemplate and StringTemplateMVC

    Asp view from Castle project

    Each engine aims to keep the focus on the generated html, and the dynamic contents are inserted into the html.

    Our decision about which language to use was based on the following conditions

  6. Be able to use the same templating / view engine in asp.net MVC.
  7. Do not have to learn a new templating language if possible.
  8. Be able to keep the business logic separate from the view templates.
  9. Have the least learning curve to implement a basic use case.
  10. Has enough capability to be able to use advance features and capabilities.
  11. Should be extendable if needed.
  12. Should have a very strong developer community to support and sort out the bugs with.
  13. Should be in use for sometime to be able to determine its stability.
  14. After doing quite some investigation we decided to go for Spark templating engine, primarily because of the capability of being able to use c# like syntax in templates, and the initial configuration and setup was very simple and easy.

Reblog this post [with Zemanta]

2 thoughts on “CSharp Templating Engine investigation

  1. Dear Friend
    You are articles are nice and excellent concept. I would like to invite to newly launched .NET Programming website the codegain.com on 1st of this June 2009. Currently CodeGain has more than 400 articles within the a month under the followings categories C#, VB.NET,ASP.NET,WPF,WCF,WFF,LINQ, AJAX, JQuery, JavaScript, Sql Servers , Oracle and more. To more list of categories visit the http://www.codegain.com. I have seen you are writing greatest article to web portal, I’m kindly asking you publish your article in codegain.com also and support to grow the CodeGain share this with your friends also. I am expecting good response from you. You can contact me using info@codegain.com.

    Thank you

  2. Pingback: CSharp Templating Engine investigation « Information for Technology « 技術者派遣の技術日誌ブログ

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s