incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vlad GURDIGA <>
Subject Re: Javascript templating for shows/lists
Date Sat, 05 Dec 2009 01:19:50 GMT
Did anyone try E4X?

I'm not sure it counts here, but it is kinda working* for me so far...


On Thu, Dec 3, 2009 at 11:13 PM, Roger Binns <> wrote:
> Hash: SHA1
> Can anyone recommend Javascript templating engines that can be used within
> the CouchDB server side for implementing shows and lists?  The Sofa weblog
> app (also described in the book) uses a nice small one from John Resig.
> Book section:
> Engine:
> I am looking for something a little more complex such as handling
> conditionals and automatically HTML escaping all values unless told
> otherwise for specific ones (ie make XSS harder to happen accidentally).
> I can find several engines that will only run in the browser, or depend on a
> DOM being present, or load the templates from a URL, or require a complete
> HTML document to be present in the template (lists build row by row).  These
> are all deal breakers. Some are many kilobytes of code and require other
> libraries such as jQuery.  Will this much code be a problem for show/list usage?
> My plan is for the output to be somewhat plain but functional - ie usable on
> a mobile phone.  Then client side Javascript runs and adds functionality,
> increases information detail, improves formatting etc.  An example of this
> in sofa is that the CouchDB side formatting provides dates in output which
> client side Javascript then reformats and the client side also knows what
> the local timezone is.  Similarly client side javascript can add in icons,
> previews of next items, tooltips etc.  This all points to a simpler CouchDB
> server side templating engine.
> I'll summarise responses in the wiki.
> Roger
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -
> iEYEARECAAYFAksYKeIACgkQmOOfHg372QTh2ACeK4yirwjIqvlEaXx+ki6tegLM
> /PcAn0SVnuFHFhkl0TWwUDYoWIXH6oAy
> =jc5m

View raw message