Web Development Study Butte Texas

JavaScript Templates, Node.js Template Engines

By Web Development Study Butte Texas

JavaScript Templates, Node.js Template Engines

Web Development Study Butte Texas discusses client-side JavaScript templates and server-side Node.js templats for single page applications (SPA’s) using JSON.

“An alternative approach to XUL‘s own templating system is to use JavaScript templates… This approach also provides a separation of formatting and structure from content, but relies on a JavaScript templating engine to have JavaScript-side business logic inject content into a template. And this does not require any use of RDF/XML, etc.”

Continue to… JavaScript templates

“The open source community has created a huge number of client-side templating solutions. When we did our initial research, we came up with a list of 26 templating technologies. We eliminated 8 right off the bat, as they were either abandoned projects or wholly lacking any documentation or community usage, making it nearly impossible to properly test them out… This left us with 18 templating technologies to evaluate. We found that these could be broken down into two general categories: embedded JavaScript and logic-less.”

Continue to… The client-side templating throwdown: mustache, handlebars, dust.js, and more

“Instead of using a JSP, GSP, or ERB to assemble a page server side and send back HTML, we have the server send back just the dynamic data as JSON and have the page assembled in the browser using a static client-side template served from a CDN. Moving the view logic to the browser meant that our different tech-stacks could share UI code…”

Continue to… Leaving JSPs in the dust: moving LinkedIn to dust.js client-side templates

“There are lots of templating languages out there, but two flavors stood out as obvious prospects: the Mustache family, and the Django family. There are strong pros and cons for each. Mustache has unmatched cross-platform support, while Django-inspired templating languages provide a more robust feature set… We set out to compare implementations of slightly tricky tasks in both settings. Would we miss the extra features from the Django family? We used Node.js along with Swig (Django family) and Hogan (Mustache family) for our comparison.”

Continue to… Mustache vs Swig Templating Shootout!

Maybe you don’t need them for simple web apps, but it doesn’t take too much complexity before embracing JavaScript templates becomes a good decision. Like any other tool or technique, there are a few best practices that you should keep in mind, when using templates. We’ll take a look at a handful of these practices in this tutorial.

Continue to… Best Practices When Working With JavaScript Templates