Chapter 15. How jQuery fits into large projects
This chapter covers
- Improving selectors for better performance
- Organizing your code in modules
- Loading modules with RequireJS
- Managing dependencies with Bower
- Creating SPAs with Backbone.js
If you’ve read all the previous chapters, you’ve hopefully learned how to write beautiful and concise code using jQuery, how to extend its features, and how to unit-test your code. Now that you know jQuery, you’re ready to learn when it isn’t enough and the use of another library or even a framework is required.
In this chapter, the last of this book, we’ll broaden our focus to several tools, frameworks, and patterns not strictly related to jQuery but that can be used to craft fast, solid, and beautiful code.
The main purpose of jQuery is to help you manipulate the DOM. DOM manipulation is usually slow, so you need to understand how you can tweak the performance of your jQuery code to perform operations as quickly as possible. You also have to understand how to easily integrate jQuery into large projects and how to correctly structure your code in modules to improve the maintainability of your code base.