Template Functions

2008/12/15 22:50:02 +0000

There's a feature coming down the CouchDB pipeline (no code yet, still planning) that will allow developers to generate HTML (or other mime-type) values from JSON documents. The output must run independently of any session information so it can be completely cacheable based on document ETag.

The function will receive a document and an argument and return an object with the response body and mime-type information. CouchDB will handle the bookkeeping of managing ETags etc.

This is cool because it will make serving Atom feeds and other non-JSON document representations simpler and more efficient. It will also be easier to build search-accessible web documents (as right now Google etc aren't really into running your Ajax code to see what the app does, before they can index it).

Anyway, pretty excited about the possibilities this opens up for unobtrusive CouchDB web-apps. I'm sure I'll keep you posted as things develop.

In other news - it really is icy and snowy in Portland this week. Kinda fun (and I found a new pizza joint I can walk to for lunch) so plus one for geography I guess.