# Thursday, December 07, 2006
« Hibernate and unit of work | Main | log4j with mock objects - message patter... »
I finally found out there's a name to a design pattern I've used previously.  The open closed principle: a class should be open for extension, but closed for modification. 

A co-worker was working a fairly complex presenter class that was originally difficult to test, had way to many responsibilities, and would need to be modified each time a new area of the application was completed.  After extensive refactoring it now is testable and passes the open closed principle.  Basically the presenter class was broken down into 6 other classes which implemented a strategy pattern.  Much more maintainable and easier to understand!

Thursday, December 07, 2006 6:47:44 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Related posts:
Fluently making a file temporarily writable
Fluent Interface for... File Writing?
Talking to myself
Presentation Layer Specific Objects

Comments are closed.