Question

My understanding of GWT is that it was first released with the concepts of Activities and Places to support the idea of the UI as a state machine, where each state is a bookmarable configuration of the UI.

My understanding is that GWT later released their suggestions to build GWT apps with the MVP architectural pattern for better separation of concerns and easier unit testing.

But when you download there sample apps and really look at the source code, although both ideas foster having client, server and shared package structures, their innerworkings are based on different concepts and different core types. Basically, it seems as though you have to choose between one or the other (is this true?).

Now I see GWTP (GWT Platform). This looks like it a solid blending of the Activities/Places paradigm as well as the MVP design. So I ask: if I choose to go with GWTP, is there anything under the realms of Activities/Places or MVP that I'll be missing out on? In other words, by going with GWTP am I limiting myself and being barred from utilizing any best practice or component of these first two items? Thanks in advance!

Was it helpful?

Solution

Google first came up with the MVP pattern to ease testing (AFAIK while developing Google Wave) and talked about it at Google I/O 2009 and 2010.

At the same time (actually, who knows? it was internal to Google before Ray Ryan's presentation), they came up with the concept of places as a type-safe, object-oriented way to navigate within the app, as an abstraction of the browser history (com.google.gwt.user.client.History). It's only quickly mentioned at the end of the 2009 talk, in the form of the place service.

Later on, they came with the concept of activities (partly inspired by Android's own activities AFAICT) and materialized it in GWT 2.1 (whose first milestone was released in July 2010).

Those two concepts are used together and best demonstrated in the Mobile Web App sample from the GWT SDK.

As for GWTP, it builds on Ray Ryan's 2009 talk (the concept of places for navigation, and MVP) and does not use the activities and places APIs at all (GWTP predates them). Have a look at http://code.google.com/p/gwt-platform/wiki/ComparisonWithGwtMVP for a comparison of GWTP vs. GWT's Activities and Places (which were first mistakenly advertised as being about MVP).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top