Total Articles: 1

If you do a lot of client-side manipulation of the DOM using JavaScript or jQuery, you might want to consider using one of the many templating engines available. I'm sure you've built some HTML within a string in your JavaScript code. Using string concatenation to build a set of HTML elements leads to hard-to-read and hard-to-debug code. Instead of using string concatenation, take advantage of a templating engine. A templating engine separates the HTML to generate from your code and data, which makes your code easier to read and makes it much easier to locate bugs. As every programmer is aware, separation of concerns (SoC) is a best practice. When you employ SoC in your applications it immediately increases the readability and maintainability of your application. In this article, I'll show you several techniques to make your client-side scripting simpler, easier to read, maintain, and debug.