I thought about the time we all spend on reading some well known patterns. I found this strange reading again and again the same logic. We all know the pattern but we doing it to be sure we use all the best practices.
Inspired by the book: Head First - Design Patterns, I rewrite the two basic patterns of Strategy and Observer. and create a snippets for your own use. so next time you won't need to get to Google it up.
Here are the snippets, for your own use: (right click & download)
Strategy.snippet
Observer.snippet
More to come on the next posts.
Remark: There could be a lot of variation for those patterns, those I wrote here were taken as a combination of the books samples and a few best practices I found out.