Skip to content

LearningProcesss/DesignPatterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design Pattern

Tools for your Design Toolbox

OO Basics

Abstraction
Encapsulation
Polymorphism
Inheritance

OO Principles

Encapsulate what varies.
Favor composition over inheritance.
Program to an interace not implementation.
Strive for loosely coupled designs between objects that interact.
Classes should be open for extension but closed for modification.
Depend on abstractions. Do not depend on concrete classes.

OO Patterns

Strategy:

Define a family of algorithms, encapsulates each one, and makes them interchargeable. Strategy lets algorithm vary independently from clients that use it.

Observer:

The Observer Pattern defines a one-to-many dependency between objects so that
when one object changes state, al of it's dependents are notified and updated automatically.

Decorator:

The Decorator Pattern attaches additional responsabilities to an object dynamically.
Decorators provide a flexible alternative to subclassing for extending functionality.

Factory Method:

The Factory Method Pattern defines an interface (abstract or simply a class) for creating objec, but lets subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.

Abstract Factory:

Provides an interface for creating families of related or dependent objects without specifying ther concrete classes.

Singleton:

Ensures a class has only one instance and provides a global point of access to it.

List

Strategy Pattern
Observer Pattern
Decorator Pattern
Factory Pattern
Singleton Pattern

About

Most important Design Patterns

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages