Search code examples
gwtmvpgwt-mvp

GWT 2.2 MVP vs. GWT 2.1 Activities-Places


I'm starting to develop a large GWT application, and after reading a lot of articles and blog posts, I'm trying to understand what is the difference between the 2.2 Model-View-Presenter and the 2.1 Activities-Places design patterns? Which pattern do you recommend and why? Should I use MVP simply because it is "newer"? On the other hand Places-Activities seems to be more "intuitive"... Or am i totally missing the point and MVP is just an improved version of Activities-Places?

Thanks to all GWT gurus out there :-)


Solution

  • First I would recommend you reading this: http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html

    MVP - is a design pattern which will help you separate logic from your UI to make it easier to Unit test. It's pretty much derived from the MVC pattern.

    Activities - a concept in GWT analogous to the MVP pattern.

    I think activities are a bit more intuitive than View-Presenters but not that much. You could look at this framework to assist you in using the MVP pattern (I greatly recommend it):

    http://code.google.com/p/gwt-platform/