Skip to content

Implementation for learning design patterns based on Head First Design Patterns book.

License

Notifications You must be signed in to change notification settings

haiquangtran/DesignPatterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns

Repository for learning design patterns. Implementation for learning design patterns based on the book: Head First Design Patterns by Eric Freeman, Elisabeth Robson, Bert Bates, Kathy Sierra.

Strategy Pattern
  • Defines a family of algorithms, encapsulates each one, and makes them interchangeable.
Observer Pattern
  • Defines a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.
Decorator Pattern
  • The Decorator Pattern attaches additional responsibilities to an object dynamically.
  • Decorators provide a flexible alternative to subclassing for extending functionality.
Factory Pattern
  • The Factory Method Pattern defines an interface for creating an object, but lets subclasses decide which class to instantiate. Factory method lets a class defer instantiation to subclasses.
Singleton Pattern
  • The Singleton Pattern ensures a class has only one instance, and provides a global point of access to it.
The Command Pattern
  • Encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations.
The Null Object Pattern
  • A new class that is neutral or does nothing. A null object is useful when you don't have a meaningful object to return, and yet you want to remove the responsibility for handling null from the client (Elminates the need for null checks etc).

About

Implementation for learning design patterns based on Head First Design Patterns book.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages