when should not use the factory pattern
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   pp_sunone
Posted On:   Tuesday, June 6, 2006 09:27 AM

Hi, All:
I want to know when should not use the factory pattern.
Using factory pattern can improve performance, but for some business object like TransactionSettlement class, shall us use
factory pattern? If there is only one TransactionSettlement created and used by a lot of other classes at same time, will this cause some problems particularlly on amount calculation?

Thanks

Re: when should not use the factory pattern

Posted By:   WarnerJan_Veldhuis  
Posted On:   Tuesday, June 6, 2006 04:20 PM

That pattern is not called the factory pattern, but the singleton pattern. There are no golden rules when it comes to patterns. Using too much (unnessecary) patterns will ruin your design.
About | Sitemap | Contact