lundi 26 janvier 2015

Java MVC: multiple use of the same event for different actions


I am working on a large Java project which employs the model-view-controller pattern. Should I use a different event for each action (to let the views communicate with their respective controllers)? Or is it better to use the same event multiple times to reduce overhead? The events I am talking about are only triggers, i.e. they do not carry additional information. I tend to implement the first option, but have a lot of similar (except for the name) event classes now.


What is considered "good" programming practice?





Aucun commentaire:

Enregistrer un commentaire