Monday, May 07, 2007

WEEK THREE - Strategy Pattern

Design patterns are an ever growing collection of tried and tested best practices for implementing software code. No matter if your language of choice is C#, Java, C++, or Visual Basic, design patterns present blue prints for development of common object oriented principles.

Most developers have used them in different development scenarios, some theorize about them, few people use them continuously in their day-to-day development. Why?

So, this series of posts is aimed at describing the most common patterns. This post in the series descries the "Strategy Pattern"...

The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable.

This pattern describes a way to abstract out most commonly changing code from code that never changes and encapsulate this commonly changing code so that it can be used or interchanged with other similar code to provide behavior like functionality.

No comments: