Skip to main content

Diigo Home

Ajaxian » Making creating DOM-based applications less of a hassle - The Diigo Meta page

ajaxian.com/...-applications-less-of-a-hassle - Cached - Annotated View

Gary Edwards's personal annotations on this page

garyedwards
Garyedwards bookmarked on 2008-08-22 javascript dom html ajax

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:

  • 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.

This link has been bookmarked by 1 people . It was first bookmarked on 22 Aug 2008, by Gary Edwards.

  • 22 Aug 08
    garyedwards
    Gary Edwards

    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:

    javascript dom html ajax

    • 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.