Explore tens of thousands of sets crafted by our community.
Software Design Patterns
22
Flashcards
0/22
Prototype
Specifies the kind of object to create using a prototypical instance, and create new objects by copying this prototype.
Proxy
Provides a surrogate or placeholder for another object to control access to it.
Iterator
Provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
Facade
Provides a simplified interface to a complex subsystem.
Composite
Lets clients treat individual objects and compositions of objects uniformly.
Interpreter
Defines a representation for a language's grammar along with an interpreter that uses the representation to interpret sentences in the language.
Mediator
Defines an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly.
State
Allows an object to alter its behavior when its internal state changes. The object will appear to change its class.
Strategy
Defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
Template Method
Defines the scaffold of an algorithm in a method, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.
Abstract Factory
Provides an interface for creating families of related or dependent objects without specifying their concrete classes.
Factory Method
Defines an interface for creating an object, but lets subclasses alter the type of objects that will be created.
Flyweight
Uses sharing to support large numbers of fine-grained objects efficiently.
Observer
Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Singleton
Ensures a class has only one instance and provides a global point of access to it.
Builder
Separates the construction of a complex object from its representation, allowing the same construction process to create different representations.
Command
Turns a request into a stand-alone object that contains all information about the request. This allows the request to be queued or logged and provides additional functionalities such as undoable operations.
Decorator
Attaches additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
Adapter
Allows the interface of an existing class to be used as another interface.
Bridge
Decouples an abstraction from its implementation so that the two can vary independently.
Chain of Responsibility
Passes a request along a chain of handlers. Upon receiving a request, each handler decides either to process the request or to pass it to the next handler in the chain.
Memento
Allows an object to save and restore the previous state of an object without revealing the details of its implementation.
© Hypatia.Tech. 2024 All rights reserved.