News for hackers. Stuff that matters.
Re:The secrets of Node's success by bergie on Wednesday June 08, 2011 @08:51PM (#2635582)
I do that by using RDFa as the "templating language". This way the same templating information is usable on both client and server, and also external tools like search engines can benefit from it
Re:The secrets of Node's success by MatthewPhillips on Thursday June 09, 2011 @08:04AM (#2636807)
Could you explain? Right now I'm using Jade on the server and Jquery Templates on the client. I'd love to use the same templates on both.
Re:The secrets of Node's success by bergie on Monday June 13, 2011 @03:37AM (#2648398)
Most of templating is relatively simple rules: put attribute foo of object bar inside this div, repeat members of collection baz here.

These can just as easily be described using RDFa as using TAL or Jade or whatever. The benefit of RDFa is that the templating information stays with the page, so client-side can also utilize it.

The library I made for this is https://github.com/bergie/VIE

Re:The secrets of Node's success by aaronblohowiak on Thursday June 09, 2011 @06:47PM (#2639067)
Do you want me to explain Haml-JS shared across both or the parent of your comment to explain RDFa? If you email me - [email protected] - I'll write up a tutorial and send it to you when its ready.