wcsf

What is the Controller for in WCSF?


I am still trying to get my brain wrapped around MVP. What should I use the controller class for? Is that where I access data resources?


Solution

  • The Controller should act upon a Model, perhaps populating a model via a service layer call to a database. Usually with requests from the view the controller performs actions on the model.

    The View is the presentation onscreen.

    The Presenter handles flow between view and controller.

    The reason for separating out presenters and controllers might be so that you can reuuse a certain controller with a different presenter etc.