Does anybody out there use a pattern for a large if-else set code in Java? I read an article in JavaWorld that's using Visitor pattern but I felt that it's too complicated. any comments would be appreciated in advance! Cindy
Desai Sandeep
Ranch Hand
Joined: Apr 02, 2001
Posts: 1157
posted
0
Hi, To remove conditional logic,Polymorphism GRASP Pattern could be used.The variations of Polymorphism (like State and Command pattern) has been explained with examples in Craig Larman,Applying UML and Patterns.
Hope this helps, Sandeep [This message has been edited by Desai Sandeep (edited June 14, 2001).]
<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
Junilu Lacar
Ranch Hand
Joined: Feb 26, 2001
Posts: 3008
posted
0
Cindy, If possible, post some of the code that you want to refactor and maybe we can make some suggestions.