JAVA SCRIPT DESIGN PATTERNS

The Observer pattern provides a way to notify multiple subscribers on single event

Observer Pattern

The observer pattern is a software design pattern in which an object, named the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods

Lets say we run a ecommerce

Lets say when some one puts…

--

--

JAVA SCRIPT DESIGN PATTERNS

The Proxy pattern provides a proxy (duplicate ) object for another object and controls access to this other object

let see it by an example
lets say we have a user object like below

const user = {
userName:"neerajdana",
email:"neerajdana9@gmail.com",
age:32
}

now lets say we want to apply some constrains or validations when someone modify the object values as follows

  1. The username length should be min 4 and…

--

--

Neeraj Dana

Neeraj Dana

Experienced Software Engineer with a demonstrated history of working in the information technology and services industry. Skilled in Angular,React,React-Native,