While all variants of both MVC and MVP are an attempt to separate the various responsibilities of a screen into cohesive classes, they differ in the details. In a classic Model View Controller architecture, both the View and Controller have a reference to the Model. Both View and Controller "observe" the Model and directly manipulate the properties of the Model. There is typically little or no direct communication between the View and Controller.
In a Model View Presenter architecture the Presenter (basically the Controller) communicates directly with the View and tells the View what to do. The Presenter is also listening directly to events from the View and takes action when an event is raised from the View.
Interactive Application Architecture Patterns
没有评论:
发表评论