Ajaxian » Making creating DOM-based applications less of a hassle - 0 views
-
Dojo also has an implementation of the Django templating language, dojox.dtl. This is an extremely powerful template engine that, similar to this one, creates the HTML once, then updates it when the data changes. You simply update the data, call the template.render method, and the HTML is updated - no creating nodes repeatedly, no innerHTML or nodeValue access.
-
a framework for JavaScript applications called ViewsHandler. ViewsHandler is not another JavaScript templating solution but works on the assumption that in most cases you'll have to create a lot of HTML initially but you'll only have to change the content of some elements dynamically as new information gets loaded or users interact with the app. So instead of creating a lot of HTML over and over again all I wanted to provide is a way to create all the needed HTML upfront and then have easy access to the parts of the HTML that need updating. The first thing you'll need to do to define your application is to create an object with the different views and pointers to the methods that populate the views: