Skip to content

Comment on Twitter releases new JS template engine: hogan.jsparent

Comments

It really decouples the model (the data that's served in the json) from the view (the mustache template). This lets frameworks like ember and backbone do MVC on the client side where the server is really just there to serve up a model (in the same way that a database does for most current apps).

Making an http request is then equivalent to making a sql query.

I've been working with Backbone and mustache and unfortunately I have to munge my models a lot to get the right results - like passing the cid or converting dates, etc. How do you work around this? I have thought of initializing many of these, but then I'd need to bind on changes... I guess you could save lambdas as attributes?

Probably closer to a stored procedure or prepared statement :)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.