Back to list
Views:   0
Replies:  0
Archived
,
Reply 1
Great question..  As usual with patterns, there are always more than one pattern that may seem to solve a specific case (definitely each has it own intent).

Prior to applying any patterns, the  first thing you can do is abstracting away things  that change (which I think you already did some analysis on).

From the GoF... the intent of interpreter is 
"Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language."
Take this requirement for e.g.  

" I have a catalogue of products that I want to make available to specific clients. "  
The above is one of your business requirement or rule which relates to how your catalog of products is constructed and may be while constructing different rules may apply..

This may indicate you need to analyze creation pattern like 'builder"....
Go4....
definition Separate the construction of a complex object from its representation so that the same construction process can create different representations. 

The above is just an example.. Check the intent of the pattern with the problem you are trying to solve and then nail down the closes patterns to see which fits the best...

Since the scenario is more to do with business rules, which may change based on some criteria you may also look at "Strategy" and "Decorator" as well...

But the most important is first apply the SOLID principles which you may already be doing, and then further nail down 2/3 patterns which may best solve your problem at hand...

Also, think through the overall complexity of introducing more patterns than required.

All the very best for your work.

Rajesh Pillai, Mar 30, 2012
Thanks for clarifying the layer vs pattern aspect. The many layers as shown in the original post helps low coupling and high cohesion. That helps to unit test each layer. The effect of change requests to one layer has direct or indirect impact to other layers. So, I think you have to make sure all unit tests have passed instead of just a single unit test, and correspondingly a regression test is necessary of the whole software.
May 16, 2011
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas