Underscore JS template engine sample
11 Mar 2016
A shift in template rendering
The traditional way of rendering content has been shifted significantly with the personal computer becomes more and more powerful. Most of the old school framework relies on server side scripting for logic and composing the HTML content.
However, as the client side resource become more available with faster CPU and more RAM, we have seen a shift in delegating the front-end rendering duty to the client rather than processing it on the server, of course, if the logic allows.
There are quite a few JS front-end frameworks capable of performing front-end templating, to name a few
As I set myself on discover the framework that can deliver template engine, I also try to find a solution that help me de-couple and reduce the number of JS framework needed for my project. _.js qualifies that requirement with an extensive utlity library underneath and its templating engine. I find myself using its debounce, throttle, and of-course the loop functionality in a lot of situation.
Underscore sample usage
Let’s display a list of 5 English Premier League club and its manager.