<?xml version="1.0" encoding="iso-8859-1"?>

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  xmlns:admin="http://webns.net/mvcb/"
  xmlns:cc="http://web.resource.org/cc/"
  xmlns="http://purl.org/rss/1.0/">

<channel rdf:about="http://blogs.codehaus.org/people/rinkrank//archives/web.html">
<title>Aslak Hellesoy&apos;s uncommon sense - Web</title>
<link>http://blogs.codehaus.org/people/rinkrank//archives/web.html</link>
<description></description>
<dc:language>en-us</dc:language>
<dc:creator></dc:creator>
<dc:date>2005-02-26T19:54:50+00:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=2.661" />

<items>
<rdf:Seq><rdf:li rdf:resource="http://blogs.codehaus.org/people/rinkrank/archives/000995_ajax_with_javascript_templates.html" />
</rdf:Seq>
</items>

</channel>

<item rdf:about="http://blogs.codehaus.org/people/rinkrank/archives/000995_ajax_with_javascript_templates.html">
<title>Ajax with JavaScript Templates</title>
<link>http://blogs.codehaus.org/people/rinkrank/archives/000995_ajax_with_javascript_templates.html</link>
<description><![CDATA[<p>Rich, responsive webapps using the <a href="http://www.adaptivepath.com/publications/essays/archives/000385.php">Ajax</a> approach are chic. I've started to think about what it would be like to develop the view part of a webapp using the Ajax concepts.</p>

<p>In an Ajax web app the server sends back XML, and the XML is transformed to HTML in the browser. There are several ways to do this transformation:</p>

<p>One approach is to use <a href="http://www.xulplanet.com/references/objref/XSLTProcessor.html">XSLTProcessor</a> as described <a href="http://blogs.msdn.com/adioltean/archive/2005/02/09/370067.aspx">here</a>.</p>

<p>However, XSLT is problematic for a couple of reasons. First, not all browsers support it, and more importantly, most web ui designers don't speak XSL.</p>

<p>A second approach is to use XPath in JavaScript to pull out bits of pieces of the XML and modify small pieces of the DOM to fill them in.</p>

<p>A third (and new?) approach could be to use the familiar template approach (as in JSP, ASP, ERB, PHP templates) and generate bigger chunks of DHTML. This would make it much easier to develop nice looking views, since they can now be designed in a regular web authoring tool such as DreamWeaver or <a href="http://www.nvu.com/">NVU</a>.</p>

<p>But wait - the template engine now has to sit inside the browser! And this is where I discovered <a href="http://trimpath.com/blog/index.php?p=3">JavaScript Templates</a>.</p>

<p>JST templates could theoretically be rendered (and tested) in a build system, using <a href="http://www.mozilla.org/rhino/">Rhino</a>. Being able to test view rendering is something I consider very important, especially when systems start to get complex (which they do with Ajax).</p>

<p>I'm eager to try this out.</p>]]></description>
<dc:subject>Web</dc:subject>
<dc:creator>rinkrank</dc:creator>
<dc:date>2005-02-26T19:54:50+00:00</dc:date>
</item>


</rdf:RDF>
