I'm developing an email client/server java application with RMI. I designed client based on MVC architecture. In particular, I've registered the Controller as a View event listener so that, for example, if I press the "inbox" button of the View, the Controller can download incoming emails from the server through a stub of the server itself.
The consequence of all this is that the controller is full of conditional code blocks on the name of the button pressed, which is very bad. Can anyone recommend me a way for replace conditional blocks? I thought about using some design patterns but I'd not know which is the best in this case.
Thanks!!
Aucun commentaire:
Enregistrer un commentaire