I think it really depends on the type of application you are writing. If you have a page that basically serves single pages and fits in a typical CRUD / MVC form, this might not be a problem. However, if you write something dynamic with a ton of ajax, this is the problem :-)
I feel your pain - I was bitten somewhat in different piles. In the end, I just completed all the bindings of lists with asynchronous calls in the browser that are performed after loading the main page. This stinks because you like this first request that comes with the data page of the pre-linked list, but the subsequent page needs to be driven by ajax calls. I just do not want to write the template material once for the server and once for the client.
I do not think / think / Jade supports this client-side binding. The good news is that there are several popular template languages ββthat work both on the server and in the browser. These two I know:
I havenβt seen anyone using express plates since it belongs to the flatironjs project, in which its own growing frames continue. There are many examples of using mustaches and ejs with an expression:
On the side of the note, here is a list of template templates for node on the Joyent website:
https://github.com/joyent/node/wiki/modules#wiki-templating
My suggestion is to start with EJS - it's a bit more than on earth, with non-HAML-esque syntax, supports client and server binding and seems to be well received on the express stack.
Happy coding!
source share