Sunday, 8 November 2009

Design Patterns: Classes should be open for extension, but closed for modification.

In today's post I would like to go once more over the common design patterns.
With Flex framework giving its developers more and more capabilities to build really complex and large systems it becomes extremely important for the developers to know the basic and best practices of using design patterns. It is even more important when there is a group of developers working on the same project and they need to be able to understand and extend code written by their team mates. Moreover if the project has been already deployed and there is a need for its further development, software engineers should be able to extend it without modifying and breaking the existing code. This is where the design patterns come to help.
In the next posts we will cover in details some of them which, in my view, it's worth to know for every software developer.

Here's a list of patterns that commonly used these days:
  • Factory Method Pattern
  • Singleton Pattern
  • Decorator Pattern
  • Adapter Pattern
  • Composite Pattern
  • Observer Pattern
  • Command Pattern
  • State Pattern
  • Strategy Pattern
  • MVC Pattern
  • Proxy Pattern
Not that big list, is it?
Of course that's not all. However, they cover most of the problems developers face on daily basis.
Good practical experience of using these common methods should give its users ability to build extensible classes without introducing bugs in pre-existed code and avoid tight-coupling or strong dependencies between classes.

And remember the main motto of the design patterns is: Classes should be open for extension, but closed for modification.

In the next article we're gonna be talking about Factory Method Pattern.

See you there!

No comments:

Post a Comment