Back to list
Views:   0
Replies:  0
Reply 1
You MUST re-factor your code on first place to make it clean and readable (though it may add more LinesOfCodes

I have seen plethora of similar spaghetti code in PRODuction env. where the coder had left the organization or it was the NEED of hour to publish such code.

DPattern choice depends how complex is the algorithm inside the if blocks is?

Strategy is the pattern where you can put Different Algo int saperate subclasses and use them independently (same as If blocks)

Note that you can NOT configure mix of these Algo - Builder does that

Shridutta Pachori, Sep 07, 2010
Reply 2

Without seeing your code, I would recommend you to take a look
at the strategy design pattern. There is a previous post on a similar topic
here (

Good Luck!
Robert Blixt, Aug 31, 2010
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