Design

Design Patterns give you a shared vocabulary with other developers. Once you’ve got the vocabulary you can more easily 
communicate with other developers and inspire those who don’t know patterns to start learning them. 
It also elevates your thinking about architectures by letting you think at the pattern level, not the nitty gritty 
object level.

Patterns, like all forms of complexity, should be avoided until they are absolutely necessary.

GOF

-------------------------------------------------------------------------------------------------

1 Favour composition over inheritance
2 Encapsulate what varies
3 Program to interfaces, not implementation


-------------------------------------------------------------------------------------------------

4 Loosely coupled principle allows us to build flexible OO systems that can handle change because they minimize the interdependency between objects.


-------------------------------------------------------------------------------------------------

5 The Open-Closed Principle says Classes should be open for extension, but closed for modification.


-------------------------------------------------------------------------------------------------

6 Dependency inversion principle says depend upon abstractions not on concrete classes i.e: reducing dependencies to concrete classes in our code is a “good thing



-------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------

6 The principle of least knowledge says that talk to your immediate friends

-------------------------------------------------------------------------------------------------

7 The hollywood principle states, don't calls us, we'll call you

-------------------------------------------------------------------------------------------------

8 Single responsibilty principle asks a class to have only one reason to change


-------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------

Some more patterns

-------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------

Additional Reading

This contents of this repository are direct or indirect extractions from Head First Design Patterns

-------------------------------------------------------------------------------------------------

Code on GitHub