Summary
In this chapter, we learned how to use two of the most common client-side templating libraries: Underscore.js
and Handlebars.js
. We also learned how they allow us to create complex HTML templates faster while making our implementations easier to read and understand. We then went on to analyze their conventions and evaluate their features and learned by example how they can be effectively and efficiently used in our implementations.
After completing this chapter, we are now able to generate complex HTML structures in a browser efficiently by using readable templates and utilizing the unique characteristics of the templating libraries.
In the next chapter, we will learn how to create jQuery Plugins as a way to abstract parts of our applications into reusable and extensible implementations. We will introduce the most widely used patterns for developing jQuery Plugins and analyze the implementation problems that each of them helps to solve.