3 ms·
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
by bergie 15y ago
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
- MatthewPhillips 15y agoCould 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.
- aaronblohowiak 15y agoDo you want me to explain Haml-JS shared across both or the parent of your comment to explain RDFa? If you email me - aaron.blohowiak@gmail.com - I'll write up a tutorial and send it to you when its ready.
- bergie 15y agoMost 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 https://github.com/bergie/VIE