yeha that's true i have used MVC in php, but not in java, i dont know how to implement it. Events are like controllers ? And separate object classes are models?
Model-View-ControllerThe ideas behind MVC are quite old, developed during the 1970s. The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time.
The idea is to break up an application into three parts:
- A model that holds part of the current state of the application. In this article the state of a model is represented by a set of properties. A property is implemented as a getter and a setter method, as in the JavaBeans concept.
- A view that is, for whatever reason, interested in knowing the current state of the application. A view registers itself with a model as a listener on the model. Whenever the state of a model changes, the model notifies its registered listeners. In GUI programming, a view often does nothing more than display the state of the model through some graphical component.
- A controller that changes the properties of the model. When and how a controller changes a property is at the discretion of the controller. In GUI programming, a controller is often something that takes input from the user; for example, a button or a text field.
http://www.enode.com/x/markup/tutorial/mvc.html and
http://www.onjava.com/pub...004/07/07/genericmvc.html these two links might help you to learn more about the mvc model. If you have any other questions let me know.