Logo
Pattern

Discover published sets by community

Explore tens of thousands of sets crafted by our community.

Design Patterns Overview

12

Flashcards

0/12

Still learning
StarStarStarStar

Singleton Pattern

StarStarStarStar

The Singleton Pattern ensures a class has only one instance and provides a global point of access to it. Example use case: Logger classes that handle logging for an entire application.

StarStarStarStar

Flyweight Pattern

StarStarStarStar

The Flyweight Pattern uses sharing to support large numbers of fine-grained objects efficiently. Example use case: Text editors that use a character object instance for each character glyph that appears frequently in the document.

StarStarStarStar

Prototype Pattern

StarStarStarStar

The Prototype Pattern creates new objects by copying an existing object, known as the prototype. Example use case: Duplication in a graphic editor where the object's data is costly to recompute or requires a lot of configuration.

StarStarStarStar

Abstract Factory Pattern

StarStarStarStar

The Abstract Factory Pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes. Example use case: Cross-platform UI elements creation.

StarStarStarStar

Composite Pattern

StarStarStarStar

The Composite Pattern composes objects into tree structures to represent part-whole hierarchies, allowing clients to treat individual objects and compositions uniformly. Example use case: Graphic drawing applications that treat individual shapes and groups of shapes as objects that can be manipulated in the same way.

StarStarStarStar

Facade Pattern

StarStarStarStar

The Facade Pattern provides a unified interface to a set of interfaces in a subsystem, making the subsystem easier to use. Example use case: Simplifying client interaction with a complex multimedia library by providing a simple play/pause/stop interface.

StarStarStarStar

Adapter Pattern

StarStarStarStar

The Adapter Pattern allows incompatible interfaces to work together by converting the interface of one class into an interface expected by the clients. Example use case: Legacy code integration with new system interfaces.

StarStarStarStar

Proxy Pattern

StarStarStarStar

The Proxy Pattern provides a surrogate or placeholder for another object to control access to it. Example use case: Lazy-loading of heavy objects in a software application.

StarStarStarStar

Factory Method Pattern

StarStarStarStar

The Factory Method Pattern defines an interface for creating an object, but lets subclasses alter the type of objects that will be created. Example use case: Frameworks that allow overrides for component creation.

StarStarStarStar

Builder Pattern

StarStarStarStar

The Builder Pattern constructs a complex object step by step, allowing you to produce different types and representations of an object using the same construction process. Example use case: Building a complex meal from a menu of options.

StarStarStarStar

Bridge Pattern

StarStarStarStar

The Bridge Pattern separates an abstraction from its implementation so that the two can vary independently. Example use case: GUI frameworks that separate high-level window styles from low-level OS drawing operations.

StarStarStarStar

Decorator Pattern

StarStarStarStar

The Decorator Pattern attaches additional responsibilities to an object dynamically, providing a flexible alternative to subclassing for extending functionality. Example use case: Adding scrollbars to windows in a graphical user interface without altering the window's core code.

Know
0
Still learning
Click to flip
Know
0
Logo

© Hypatia.Tech. 2024 All rights reserved.