We have a very complex pricing engine that must price incoming objects based on a dosen parameters.  Some are global, some are set depending on the specific transaction request.  I am cleaning up the code that seems to be setting various pricing parameters from random places in the code.
 
As part of the refactoring, I am introducing an abstract configuration object (PricingConfiguration) that contains global parameter settings for the transaction, and has a static factory method that creates specific concrete private subclasses of the PricingConfiguration object (TransactionOnePricingConfiguration for example) that also sets transaction-specific attributes.  So far this works very well and code is as clean as can be.  However, I am curious if this is a common software design pattern.  I am sure many people have done something similar in the past.
 
If you've come across any Configuration Object Design Patterns, or similar, let me know.  Although it's nice to know that I can shoot well from the hip, I am always on the look out for state of the art best practices.
 
Thanks!
 
Greg
---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk

Reply via email to