» Home and Blogs

  » Essays

  » Software

  » Prime Brokerage

  » Web Page Optimisation

  » Interviewing

  » Publications

  » Resources

  » Book Reviews

  » About Me




.

..

Design Principals

Software Design Principals                                            Printer Friendly Version

 

Design Principal

Comments

  1. Encapsulate what varies

 

e.g. the Strategy pattern.

  1. Favour composition over inheritance

 

e.g. the Decorator pattern.

  1. Program to interfaces, not implementations

 

 

  1. Strive for loosely coupled designs between objects that interact

 

e.g. the Observer pattern

  1. Classes should be open for extension  but closed for modification

 

e.g. the Decorator pattern.

  1. Depend on abstractions. Do not depend on concrete classes

 

e.g. the Factory pattern.

  1. Only talk to your friends

 

A given object should assume as little as possible about the structure or properties of anything else (including its subcomponents). more

 

  1. Superclasses should call subclasses. Not the other way around.

 

e.g. the Template pattern

 

 















This site is © Copyright BenStopford.com 2003-2005, All Rights Reserved