0% found this document useful (0 votes)
4 views1 page

Design Patterns Notes

Design Patterns are standardized solutions to common software design issues, categorized into Behavioral, Creational, and Structural patterns. Behavioral patterns focus on object interactions, Creational patterns emphasize object creation, and Structural patterns deal with assembling objects into larger structures. Examples include Observer and Strategy for Behavioral, Singleton and Factory Method for Creational, and Adapter and Facade for Structural patterns.

Uploaded by

asia495701
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Design Patterns Notes

Design Patterns are standardized solutions to common software design issues, categorized into Behavioral, Creational, and Structural patterns. Behavioral patterns focus on object interactions, Creational patterns emphasize object creation, and Structural patterns deal with assembling objects into larger structures. Examples include Observer and Strategy for Behavioral, Singleton and Factory Method for Creational, and Adapter and Facade for Structural patterns.

Uploaded by

asia495701
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Design Patterns – Quick Notes

Design Patterns are typical solutions to common software design problems. They are high-level
descriptions, general concepts, and act as a blueprint for solving recurring design issues.

Behavioral Design Patterns

Focus on interaction between objects, promoting effective communication and proper responsibility
assignment. These patterns help achieve loose coupling and avoid hard coding dependencies.
• Chain of Responsibility: Pass request through a chain of handlers until one processes it.
• Command: Encapsulates a request as an object.
• Mediator: Reduces direct dependencies; communication happens via mediator.
• Iterator: Traverse elements of a collection.
• Memento: Save and restore object state.
• Observer: Subscription-based notification mechanism.
• Interpreter: Represents grammar of a language.
• Template Method: Defines skeleton of an algorithm.
• State: Object changes behavior when internal state changes.
• Strategy: Choose algorithm at runtime.
• Visitor: Add new operations without modifying objects.

Creational Design Patterns

Focus on how objects are created. They improve flexibility and promote reuse of existing code.
• Singleton: Only one instance exists and is globally accessible.
• Prototype: Clone existing object instead of creating new one.
• Factory Method: Creates objects via factory method; hides creation logic.
• Abstract Factory: Creates families of related objects.
• Builder: Builds complex objects step by step.
• Object Pool: Reuses expensive-to-create objects.

Structural Design Patterns

Explain how to assemble objects and classes to create larger, flexible structures.
• Adapter: Makes incompatible interfaces work together.
• Bridge: Separates abstraction from implementation.
• Composite: Treat individual and group objects uniformly.
• Decorator: Adds new behavior dynamically.
• Facade: Provides simplified interface to complex system.
• Proxy: Placeholder or substitute for another object.

You might also like