O'Reilly logo

jQuery Design Patterns by Thodoris Greasidis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required