Dual-Side Templating for 2010
Date : 2008 02 15 Category : Tech & DevelopmentMichael Mahemoff is bullish on templating that runs all over the shop, and explained the progression in his Dual-Side Templating piece:
c. 1995: Server-Side Templating. This is the standard templating used in Java’s JSP, Perl’s Mason, PHP, ASP, etc. ie some html code with <?= “language” ?> code embedded in it. c. 2005: Browser-Side Templating. This is an Ajax pattern where you have a block of HTML that includes some custom syntax (e.g. <% ${foo.bar} %>) which are then processed via Javascript. c. 2010: Dual-Side Templating A single template is used on both browser and server, to render content wherever it’s appropriate - typically the server as the page loads and the browser as the app progresses. For example, blog comments. You output all existing comments from the server, using your server-side template. Then, when the user makes a new comment, you render a preview of it - and the final version - using browser-side templating.