Thursday, July 28, 2005

Rantings on Inheritance and Compositions.

There are two ways to vary behavior of a type. Either by inheritance or by composition each of this has a pattern associated. If you wish to vary by inheritance then use the template method else if you need to vary by composition then use strategy. Remember composition is better than inheritance because when it comes to maintenance of your application this is easier to change than too many inheritances in your application.
I am not stating Stratgey is better than Template. Both these patterns are usefull depending on the context.
Several projects are developed with no thoughts to maintenance in mind. This would be a problem to any new person doing the maintenance for the project and hence the project starts wobbling. In the lifecycle of a software product at least 60% of the time is spent on maintaining the application. Therefore this is a critical part of risk management.
When projects are planned and executed interestingly there are several methodologies and process suggested to improve the creation of the product but very limited to non existent for software maintenance.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home