Skip to main content

28 docs tagged with "design patterns"

View All Tags

Abstract Factory - Design Pattern

The abstract factory pattern is a creational design pattern that produces families of related objects without specifying their concrete classes.

Adapter Design Pattern

Adapter is a structural design pattern that facilitates the collaboration of objects having conflicting interfaces.

Bridge Design Pattern

The bridge pattern is a structural pattern used in web development to decouple an abstraction from its implementation so that the two can vary independently.

Builder Design Pattern

It lets you build complex objects step by step. The builder pattern allows you to produce different object types and representations using the same builder code.

Chain of Responsibility Pattern

The chain of responsibility pattern allows a client request to be received by multiple objects. JavaScript Frontend Phone Interview Question

Command Design Pattern

Command Pattern is a behavioral JS design pattern that aims to encapsulate actions or operations as objects. JavaScript Frontend Phone Interview Questions

Composite Design Pattern

The composite is a structural pattern that composes objects into trees and then works with these structures as if they were individual objects.

Constructor Design Pattern

The constructor pattern is a class or function-based pattern used in the creation of specific types of objects. JavaScript interview questions and answers.

Decorator Design Pattern

The decorator pattern is a JS structural pattern that promotes code reusability. They, like Mixins, can be viewed as a replacement for object sub-classing.

Defining a Pattern

Pattern-ity Testing, Proto-Patterns & The Rule Of Three - A pattern that has not yet passed "pattern"-ity tests is called a proto-pattern.

Facade Design Pattern

The Façade design pattern creates an interface that protects clients from complex functionality in one or more subsystems.

Factory Method - Design Pattern

The factory pattern offers an interface for producing objects in a superclass while allowing subclasses to change the type of objects created.

Flyweight Design Pattern

Can you explain the flyweight design pattern? The Flyweight pattern gets classified as a Structural design pattern. JavaScript interview questions.

Interpreter Design Pattern

The interpreter pattern offers a scripting language that allows end users (developers) to customize their solutions.

Iterator Pattern

An iterator is a behavioral design pattern that allows you to traverse elements of a collection without revealing its underlying representation.

Mediator Design Pattern

The mediator pattern is a structural pattern that enables one item to alert another group of objects when an event or action occurs. Interview Questions

Memento Design Pattern

The memento pattern is a behavioral pattern that allows you to save and restore an object's previous state without revealing its implementation details.

Module Design Pattern

Another popular JavaScript design pattern for keeping our code tidy, segregated, and organized is the Module Pattern.

Observer Design Pattern

The observer pattern allows you to define a subscription mechanism that will notify multiple objects about any events on the object we attempt to observe.

Prototype Design Pattern

The prototype is a creational design pattern that allows you to replicate existing objects without relying on their classes. Interview Questions and Answers

Proxy Design Pattern

A proxy is a structural pattern that lets you provide a substitute for another object. The Proxy Pattern acts as a placeholder for another object.

Singleton Design Pattern

Singleton is a creational design pattern that lets you ensure that a class has only one instance, while providing a global access point to this instance.

State Design Pattern

State is a behavioral design pattern that lets an object alter its behavior when its internal state changes. It appears as if the object changed its class.

Strategy Design Pattern

The strategy is a behavioral pattern that allows an object to shift its way of responding to changes in its internal state.

Template Method Design Pattern

The Template Method pattern recommends breaking down an algorithm into a series of steps and then turning these steps into methods.

Visitor Design Pattern

A visitor pattern is a behavioral pattern that enables you to decouple algorithms from the objects on which they operate.

What is a Pattern?

A design pattern is reusable code that acts as a solution to recurring problems in JavaScript. A design pattern can be a template for solving a problem.