Chapter 4. Divide and Conquer with the Module Pattern
In this chapter, we will be introduced to the concepts of Modules and Namespacing and see how they can lead to more robust implementations. We will showcase how these design principles can be used in applications, by demonstrating some of the most commonly used development patterns to create Modules in JavaScript.
In this chapter, we will:
- Review the concept of Modules and Namespacing
- Introduce the Object Literal Pattern
- Introduce the Module Pattern and its variants
- Introduce the Revealing Module Pattern and its variants
- Have a small dive into ES5 Strict Mode and ES6 Modules
- Explain how Modules can be used and benefit jQuery applications
Modules and Namespaces
The two main practices of this chapter ...
Get jQuery Design Patterns now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.