Sunday, January 16, 2005

On Software Patterns

Recently..I began to wonder about "Software Design Patterns".I began to wonder ,what are they based on?.Arent they afterall someone's experiences.For instance lets say we are talking about designs in civil engineering.The design, the engineer in that domain uses ,makes, are based on the solid foundations of mathematics.Lets assume that he has to construct a door,he will defintely follow a pattern based on usability and proper dimensions,he will know that the door has to be of 'x' feet high and 'y' feet wide(the maths of numbers again!!!).Proved and consistently proved mathematical formulas are the basis for the designer there, to determine what the dimensions of his structure are going to be.On the contrary when a software designer steps out to design something,what has he, to base his design on ?.Today I know that a code i had implemented long ago ,actually is a pattern..and I had done it without even having been aware of the fact that i had implemented the ADAPTER pattern.And to add to it,in most of the cases it has been found out that the design is more or less incomplete ,without its implementation in code bringing about some changes in the design again.And to think of it more than 60% of a project life cycle goes into planning and designing.So are we still very far from knowing what should be foundations of our designs ?.

Turning my thoughts elsewhere,I have been lately wondering of a particular use of Aspect oriented programming or Adaptive programming(call it AOP for simplicity).Its been a well known fact the features of a AOP could be used for logging et cetra..It is also a well realized fact that, database connections are a precious resource,and should be used as prudently as possible.In fact the shorter you hold the DB connection the better and the shortest we can try to hold a DB connection as programmers, could be at a method level.It is here that we could use the features of AOP to turn on the DB connection(get a hook to it) at the entry point of the method and release the same at the exit of the method.This sure follows a pattern,so we can as well, call this a pattern.
Links you may find useful :
Martin Fowlers ideas
IBM DeveloperWorks


1 Comments:

At 9:22 PM, Anonymous Anonymous said...

Hi,
Your thoughts on design patterns are good. But i beleive AOP and Agile programming are not related, Agile programming is more about the methodology and managment of software projects. I dont know much about AOP, but it is style of programming rather than how to handle software projects

 

Post a Comment

<< Home