News for hackers. Stuff that matters.
Re:Modern Web Applications are Here by mattmanser on Tuesday November 15, 2011 @06:58AM (#3237922)
TBH there's no reason it needs to be node, you just need to use a template that could work on both client and server.

Not that I know of any yet.

Re:Modern Web Applications are Here by vidarh on Wednesday November 16, 2011 @04:07AM (#3242410)
Mustache (http://mustache.github.com/) has implementations in 20+ languages including javascript. The templates themselves are entirely declarative - any logic is contained within a separate object.

If you don't need any custom logic at all, you can easily use JSON to pass that object between client and server with no further changes. If you do need some custom logic, it'd be slightly more work, but then again you could just opt to use javascript for any small pieces of logic, as there are V8 and/or Spidermonkey wrappers for most or all of the languages supported by Mustache.

Re:Modern Web Applications are Here by stdbrouw on Tuesday November 15, 2011 @09:56AM (#3238364)
Jade (very HAML/Slim-like) can do both client- and server-side rendering, and it can also precompile your template into pure JavaScript so users don't need to download a bulky template engine for it to work.
Re:Modern Web Applications are Here by pilgrim689 on Tuesday November 15, 2011 @07:28AM (#3237988)
Zappa with CoffeeKup can do server and client template sharing. Or jsdom and jsviews if you find Zappa too fancy.