Design Patterns & OOP/SOLID Principles
60 cards · 🇺🇸 English
The Gang of Four design patterns plus object-oriented and SOLID principles.
Study all 60 cards for free
Flashcards, quizzes, pixel-art games and a daily review that remembers for you.
Try the first 10 cards
1 / 10Abstract Factory (Creational)
Tap the card for the answer · swipe right if you knew it, left if not
Already have an account? Sign in
Cards
- 1Abstract Factory (Creational)Groups object factories that have a common theme. Creates families of related objects without specifying their concrete classes.
- 2Builder (Creational)Constructs complex objects by separating construction and representation. Allows step-by-step object creation.
- 3Factory Method (Creational)Creates objects without specifying the exact class to create. Defines an interface for creating objects, letting subclasses decide which class to instantiate.
- 4Prototype (Creational)Creates objects by cloning an existing object. Useful when creation is expensive.
- 5Singleton (Creational)Restricts object creation for a class to only one instance. Provides a global point of access to that instance.
- 6Adapter (Structural)Allows classes with incompatible interfaces to work together by wrapping its own interface around that of an already existing class.
- 7Bridge (Structural)Decouples an abstraction from its implementation so that the two can vary independently. Separates interface from implementation.
- 8Composite (Structural)Composes zero-or-more similar objects so that they can be manipulated as one object. Creates tree structures of objects.
- 9Decorator (Structural)Dynamically adds/overrides behavior in an existing method of an object. Wraps objects to add responsibilities.
- 10Facade (Structural)Provides a simplified interface to a large body of code. Hides complexity by providing a unified interface to a subsystem.
- 11Flyweight (Structural)Reduces the cost of creating and manipulating a large number of similar objects. Shares common state among multiple objects.
- 12Proxy (Structural)Provides a placeholder for another object to control access, reduce cost, and reduce complexity. Acts as a surrogate or representative.
- 13Chain of Responsibility (Behavioral)Delegates commands to a chain of processing objects. Passes requests along a chain until one handles it.
- 14Command (Behavioral)Creates objects that encapsulate actions and parameters. Turns requests into objects that can be queued, logged, or undone.
- 15Interpreter (Behavioral)Implements a specialized language. Defines a grammar and an interpreter for sentences in the language.
- 16Iterator (Behavioral)Accesses the elements of an object sequentially without exposing its underlying representation. Provides sequential access to aggregate objects.
- 17Mediator (Behavioral)Allows loose coupling between classes by being the only class that has detailed knowledge of their methods. Centralizes complex communications.
- 18Memento (Behavioral)Provides the ability to restore an object to its previous state (undo). Captures and externalizes object state without violating encapsulation.
- 19Observer (Behavioral)A publish/subscribe pattern, which allows a number of observer objects to see an event. Notifies dependents when subject changes state.
- 20State (Behavioral)Allows an object to alter its behavior when its internal state changes. The object appears to change its class.
- 21Strategy (Behavioral)Allows one of a family of algorithms to be selected on-the-fly at runtime. Defines a family of interchangeable algorithms.
- 22Template Method (Behavioral)Defines the skeleton of an algorithm as an abstract class, allowing its subclasses to provide concrete behavior. Defers steps to subclasses.
- 23Visitor (Behavioral)Separates an algorithm from an object structure by moving the hierarchy of methods into one object. Adds operations to objects without modifying them.
- 24Object-Oriented Programming (OOP)A programming paradigm based on objects - software entities that encapsulate data and functions
- 25First language with primary OOP featuresSimula, developed in Norway during 1961-1967, introduced classes, inheritance, and dynamic binding
- 26EncapsulationKeeping related fields and methods together, and hiding internal details from outside code
- 27Information hidingKeeping the internal details of an object hidden from outside code, exposing only public members
- 28ClassA blueprint that defines data (variables) and methods (logic) that objects of that type will have
- 29ObjectAn instance of a class created via a constructor, with its own copy of instance variables
- 30InheritanceA mechanism where a class (subclass) inherits variables and methods from another class (superclass)
And 30 more cards. Study the whole deck free
Articles about this deck
More Programming decks
See all- 🧱
Data Structures
95 cards · 🇺🇸 English
Arrays, linked lists, trees, graphs, hash tables and their core operations.
- 🧱
Estructuras de Datos
95 cards · 🇺🇸 English
Arrays, listas enlazadas, árboles, grafos, tablas hash y sus operaciones fundamentales.
- ⏱️
Notación Big O
44 cards · 🇺🇸 English
Análisis de la complejidad temporal y espacial de algoritmos y operaciones comunes.
- ✅
Testing: Unit & Integration
40 cards · 🇺🇸 English
Unit testing, integration testing, mocking, and testing best practices.
- 🧱
Datenstrukturen
95 cards · 🇺🇸 English
Arrays, verkettete Listen, Bäume, Graphen, Hash-Tabellen und ihre wichtigsten Operationen.
- ⏱️
Notation Big O
44 cards · 🇺🇸 English
Analyse de la complexité temporelle et spatiale des algorithmes et opérations courantes.
