The whole point of using templates is to separate your presentation logic from the rest of your application - ideally, you can hand the templates over to a client-side developer/designer and they can re-jiggle everything on their own.
If your templating code works by performing manipulations against a DOM, even minor changes to your page structure require to to completely rewrite both the templates and the code that manipulates them. I'd much rather leave my "view" code alone and just alter the template.
With Django, I often find myself writing view logic to support specific presentation tasks (regrouping items in a manner more complicated than Django's {% regroup %} template tag allows, for example). This used to bother me, but then I decided that pragmatism beats purity if you actually want to ship anything.
When you start to build single page applications with lots and lots of states ( that are bound to a DOM ), this approach actually can become favorable since your "presentation logic" is browser-side JavaScript.
To my understanding, the server-side rendering aspect of this approach is really just an after-thought. You have your single page application, but you can still render a server-side snapshot of various UI states without requiring a browser.
While I wouldn't necessarily dive straight into DOM-based templating, I think there is a lot of room for interesting improvements in this area. I'm glad to see JSDOM maturing.
The README states "Use with whatever library you want, jQuery for example". Let's analyze that for a second.
Weld.js uses the following jQuery methods: - Sizzle selector ($) - first() - is() - val() - attr() - text() - map() - extend() - clone() - data() - remove()
These methods are used throughout the 249 lines of code.
This makes weld.js completely dependent on jQuery. Thus, you can't just use whatever library you want. And that would be allright, if the README would say that; but it didn't, and so it isn't.
There is an example using express and all kinds of cool business.
Here is a list which was put together & called "Push style template systems" which covers some of these modules/libraries (in different languages): http://www.perlmonks.org/?node_id=674225
Anyone have any pointers to other/better similar solutions?