in reply to integrating XMLHttpRequest and HTML::Template

The whole point about separating your code into a View and a Controller is not to lock you into always using templates for your View. Templates are only one way of implementing a View.

The point of the separation is so that you can easily adapt your code to provide alternate Views! In this case your View is actually running in the browser, so your Controller can push the data directly to the browser, and you use some JavaScript to display the information. An other View could be a CSV dump of the data, or an XML dump, or you could provide a WAP interface. Some of those may use templates for the View, but they certainly don't have to.

  • Comment on Re: integrating XMLHttpRequest and HTML::Template

Replies are listed 'Best First'.
Re^2: integrating XMLHttpRequest and HTML::Template
by punkish (Priest) on Jun 03, 2005 at 14:30 UTC
    in other words, are you saying that what I am doing is fine, and there may not be a better way? ;-)

    For example, I could think of possibly separating my cgi code, so the H::T code is in one file, and the XMLHttpRequest code is in another.

    --

    when small people start casting long shadows, it is time to go to bed