Useful Links
Technology
Computer science
Object-Oriented Programming
Design Patterns in Object-Oriented Programming
Creational Patterns
Singleton
Intent and motivation
Implementation details
Pros and cons
Handling lazy initialization
Thread safety issues and solutions
Factory Method
Purpose and applicability
Implementation variants
Advantages over direct object instantiation
Use cases in large systems
Abstract Factory
Definition and structure
Use cases for creating families of related objects
Comparison with Factory Method
Builder
Purpose of separating object construction from its representation
Applicability in building complex objects with numerous configurations
Implementation using step-by-step construction
Real-world usage examples
Prototype
Cloning existing objects to create new instances
Deep vs. shallow copying
Use cases in reducing cost of resource-intensive creation
Structural Patterns
Adapter
Bridging incompatible interfaces
Object adapter vs class adapter variations
Practical applications in system interfaces
Bridge
Separating abstraction from implementation
Use in preventing proliferation of subclasses
Examples in graphic rendering systems
Composite
Treating individual and composite objects uniformly
Structure and hierarchy of tree-like structures
Applications in user interface frameworks
Decorator
Dynamically adding responsibilities to objects
Comparison with subclassing
Use in extending or modifying behavior of objects
Facade
Providing a simplified interface to a complex subsystem
Role in reducing client dependency on subsystem classes
Example scenarios in large-scale applications
Flyweight
Minimizing memory use by sharing common data
Ideal use cases for this pattern
Examples in managing large numbers of similar objects efficiently
Proxy
Controlling access and managing object creation
Types of proxies: Virtual, Remote, Protection, etc.
Implementation details and benefits
Behavioral Patterns
Chain of Responsibility
Passing request along a chain of handlers
Decoupling sender and receiver
Use cases in UI and event handling
Command
Encapsulating request as an object
Supporting undo, redo operations
Practical implementations for user actions
Interpreter
Defining grammatical representation for language and interpreter
Use in parsing and executing language syntax
Effectiveness in domain-specific languages
Iterator
Access elements of a collection without exposure
Various iterator patterns: internal vs. external
Examples in traversal of data structures
Mediator
Reducing complexity by controlling interactions
Decoupling colleagues through central mediator
Use in managing complex conversation logic
Memento
Capturing and externalizing object state
Supporting rollback operations
Usage scenarios where undo functionality is crucial
Observer
Establishing dependency and update relationships
Use in event-driven systems
Challenges with observer chains and performance
State
Allowing object behavior change with state variation
State-specific interface realization
Real-world applications in protocol design
Strategy
Defining family of algorithms and making them interchangeable
Encapsulating algorithm variation
Implementations in sorting algorithms and routing
Template Method
Defining skeleton of an algorithm in the superclass
Deferring implementation to subclasses
Use in code reuse and capturing invariants
Visitor
Adding new operations to complex structures
Double-dispatch mechanics
Applications in traversing composite structures and code parser
2. Object-Oriented Programming Principles
First Page
4. Object-Oriented Programming Languages