The module pattern

A module is a standalone software component implementing specific functionalities, and is easily reusable in different applications. It enables modular programming whose goal is to simplify the development, testing, and maintenance of large applications possibly involving many developers. Modules can also be packaged and deployed separately from each other, allowing changes on a particular module to be properly isolated from the rest of the code of an application. Splitting an application in multiple modules has many benefits: in addition to code reusability, it forces us to reason about the architecture of an application and to structure it so that it may result in becoming more understandable for people who aren't familiar ...

Get Mastering JavaScript Object-Oriented Programming 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.