Thursday, February 01, 2007

Templates Based Web Application

I'm searching templates based web application design tech.

First, I come to XOOPS. It is an extensible, OO (Object Oriented), easy to use dynamic web content management system written in PHP. It use Smarty engine, which take the template, parse it, and ouput .php file as result, some tags:
〈{if ...} >
〈{/if} >
〈{foreach ...>
〈{/foreach}>

Then, I found Shopify , which support customized layout and theme for each register store. In their admin pages, owner can change the liquid for template. Actually Shopify use Ruby on Rail and Mephisto Templates., some tags:
{% if ... %}
{% endif %}
{% for ... in ... %}
{% endfor %}

In .Net platform, there are 4 template engine: Web Forms, NVelocity, Brail, StringTemplate. Here's comparisson. And MonoRail:View Engines Book also has some information.

In ASP.Net, we can loading user control as a ItemTemplate to accomplish similar work. This article give us a example to create templates dynamically in a DataList web server control like:
Repeater1.ItemTemplate = Page.LoadTemplate("usercontrol.ascx")

Using AJAX, the client can update certain part of the page. The data used to update the client can be a string, or even a rendered ouput of a user control,
ScottGus Blog show us Cool UI Templating Technique to use with ASP.NET AJAX for non-UpdatePanel scenarios.

Alexander Kleshchevnikov, defined his email template tags and implement a parser in vb.net.

No comments: