1. Open–Closed Principlehistorical

    The open-closed principle favors extension without modifying existing code, reducing the risks introduced by maintenance changes.

  2. Liskov Substitution Principlehistorical

    The Liskov substitution principle requires subclasses to preserve the meaning and expectations of parent-class methods. These notes examine inheritance and extension through it.

  3. Dependency Inversion Principlehistorical

    Dependency inversion favors interfaces over implementations and avoids direct high-level dependence on low-level details. These notes examine extensibility through that principle.

  4. Single Responsibility Principlehistorical

    The single-responsibility principle keeps a class's responsibilities focused. These notes examine readability and maintenance through that idea.

  5. Interface Segregation Principlehistorical

    Interface segregation keeps interfaces focused on clear responsibilities. These notes examine decoupling and readability through that requirement.

  6. Law of Demeterhistorical

    The Law of Demeter asks a class to know as little as possible about other objects' internals, reducing coupling.

  7. Composition Reuse Principlehistorical

    Composite reuse favors composition or aggregation over inheritance. These notes examine code reuse and extension through that principle.

  8. Object-Oriented Design Principleshistorical

    Object-oriented design principles aim to improve maintainability, extensibility, and reuse. This page links notes on the individual principles.

  9. Object-Oriented Design Patternshistorical

    Design patterns are reusable solutions to recurring problems. These notes organize patterns into creational, structural, and behavioral categories.

  10. Singleton Patternhistorical

    The singleton pattern restricts a class to one instance. Implementation examples examine how that instance is created and accessed.

  11. Proxy Patternhistorical

    The proxy pattern adds functionality through a proxy object without mixing unrelated logic into business code. These notes record implementations through examples.

  12. Template Methodhistorical

    When an algorithm's overall steps are fixed but details vary, the template method keeps the process in a parent class and delegates variable parts to concrete implementations.

  13. Factory Methodhistorical

    Factory methods delegate concrete-product creation to corresponding factories so callers depend on a creation interface. These notes compare them with simple factories through code.

  14. State Patternhistorical

    The state pattern chooses behavior according to an object's current state. These notes compare it with the strategy pattern through examples.

  15. Builder Patternhistorical

    The builder pattern assembles objects with multiple parts and complex construction steps, using a builder to organize construction.

  16. Strategy Patternhistorical

    When a task has several possible approaches, the strategy pattern separates the algorithms and selects an appropriate strategy.

  17. Observer Patternhistorical

    The observer pattern notifies observers when a target object's state changes. These notes introduce the notification relationship through those two roles.

  18. Decorator Patternhistorical

    The decorator pattern adds functionality while retaining existing code by wrapping an object with additional behavior. These notes record the approach through examples.

  19. Chain of Responsibilityhistorical

    A chain of responsibility links handlers for a type of request and passes requests along the chain. These notes illustrate it through scenarios such as Servlet filters.

  20. Adapter Patternhistorical

    The adapter pattern translates between interfaces so an existing implementation can work through a different interface. These notes record that compatibility approach through code.

  21. Prototype Patternhistorical

    When object creation requires substantial preparation, an existing object can be copied and adjusted. These notes introduce the prototype pattern through that idea.

  22. Abstract Factory Patternhistorical

    An abstract factory creates families of related products. These notes examine factory responsibilities through scenarios requiring multiple product components.

  23. Simple Factory Patternhistorical

    A simple factory separates object creation from usage, selecting and creating concrete instances. These notes illustrate that division through examples.

  24. Design Patterns I Have Usedhistorical

    Questions and answers review design patterns used in practice, starting with singleton implementation and linking code with usage scenarios.

  25. Flyweight Patternhistorical

    The flyweight pattern reuses many identical or similar objects to reduce repeated creation. These notes examine shared-object organization through examples.

  26. Facade Patternhistorical

    The facade pattern places a complex process behind a unified entry point so callers can access internal functionality through a simpler interface.

  27. Bridge Patternhistorical

    The bridge pattern handles class structures that vary along multiple dimensions. These notes use examples to show how to separate and combine those dimensions.

  28. Composite Patternhistorical

    The composite pattern represents parts and wholes in a tree so callers can access leaf and container nodes consistently.

  29. Mediator Patternhistorical

    Direct interactions among objects can create complex coupling. The mediator pattern places coordination in an intermediary, illustrated here through examples.

  30. Command Patternhistorical

    Examples involving courses and command interfaces demonstrate the command pattern and how requests are wrapped as objects for execution.

  31. Memento Patternhistorical

    The memento pattern stores an object's state for later restoration. These notes examine saving and retrieving state through scenarios such as undo.

  32. Visitor Patternhistorical

    The visitor pattern separates data structures from operations into different classes. These notes use code to examine how operations act on the structure.

  33. Iterator Patternhistorical

    Iterators provide a way to traverse aggregate objects separately from their structure. These notes record the pattern and its use in the JDK.

  34. Object-Oriented Programminghistorical

    This page collects object-oriented programming topics, connecting design principles with creational, structural, and behavioral patterns.