Posted On: Jan 12, 2023
Some common design patterns in object-oriented JavaScript are as follows -
Constructor pattern: This pattern creates objects with a constructor function that sets the initial state and methods of the object.
Module pattern: This pattern creates a singleton object that provides a private and public interface to a set of functions and data.
Prototype pattern: This pattern creates objects that inherit properties and methods from a prototype object.
Revealing module pattern: This pattern creates a singleton object that provides a private and public interface to a set of functions and data, with the added benefit of only exposing the methods and properties you want to.
Factory pattern: This pattern creates objects without specifying the exact class of object that will be created.
Command pattern: This pattern encapsulates a request as an object, separating the request from the object that handles it.
Never Miss an Articles from us.
Mean stack is combination four popular JavaScript-based technologies MongoDB, Express, AngularJS and Node that allows d..
Express is lightweight web framework for Node.js.It provides robust and scalable solutions to build single and multi-pa..
Mongoose is a MongoDB Object Data Modeling (ODM) library for MongoDB and NodeJS.It provides a straight-forward, schema-..