Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT 2.2 MVP vs. GWT 2.1 Activities-Places

Tags:

mvp

gwt

gwt-mvp

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 :-)

like image 914
Tom Teman Avatar asked Mar 17 '11 16:03

Tom Teman


2 Answers

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/

like image 77
code-gijoe Avatar answered Nov 01 '22 01:11

code-gijoe


Places Activities is a framework provided by gwt for the MVP architecture. MVP is the concept, and one of the ways to do it is the places-activities framework. You should definitely try their new places- activities framework.

Before 2.1 (need to confirm), gwt just gave the architecture. you had to develop the framework.

like image 21
Jai Avatar answered Nov 01 '22 03:11

Jai