One of my goals this year (I have several that I'll be blogging about) is to "Learn Design Patterns better". The idea is a good goal, but the wording sucks for a goal right? I mean how will I know if I have reached it? Well I have decided to change the goal to be "Be able to teach design patterns to a non technical person". Now this wording is a little better as long as I have a non technical person available ;) - which I do. So now I need to learn design patterns (going to start with the GoF patterns first) well enough to not only relate it to code, but relate it to real life....
My approach is going to be the following:
- Read the chapters (Design Patterns C#)
- Work with some code that I come up with (not examples in book)
- Search for other information on the web
- Come up with a way to teach the patterns to my test subject
This week's patterns are the Interface Patterns
| Pattern to use: |
If you inted to: |
| Adapter |
Adapt a class's interface to match the interface a client expects |
| Facade |
Provide a simple interface into a collection of classes |
| Composite |
Define an interface that applies to individual objects and groups of objects |
| Bridge |
Decouple an abstraction from its implementation so that the two can vary independently |
Seven John Metsker,
Deisgn Patterns In C# Page 17