node.js - Why do we use server-side templating engines for Node? -


for example see node.js lot of peopple have been mentioning using jade or swig. building node.js app use restful interface communicating client. want able send , receive updates. lot of tutorials i've been seeing or apps have been seeing online use jade or other template engine.

what advantage of using templating engine on server vs. serving bunch of regular html/javascript , allowing client render pages based on information sent server? how server-side tmeplating engine improve use of restful interface? edit: there advantage or personal preference?

if advantageous in way, invest time learn before far in project rather wish had learned earlier :-d

here example uses jade-lang.

sgml-like markup languages hard both computers , programmers read. template engines speed programming using smaller tokens , syntax. also, if go through pre-processor templating requires, can add variables , logic usually.

the downside takes cycles render template. though isn't problem, projects hindered time-to-market , not lack of processing efficiency.

i use jade of projects, because it's easy transition html jade , intuitive. had hardly learning curve difficulties going html jade.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -