"Large scale application development and MVP" tutorial / no Places or Activities

79 views
Skip to first unread message

cri

unread,
Nov 30, 2010, 9:03:04 AM11/30/10
to Google Web Toolkit
I've used the articles "Large scale application development and MVP" I
and II to model our MVP application. I notice that these tutorials
don't use either of the "Place" or "Activity" classes made available
by GWT. I'm wondering why this is. Does anyone know? Thanks

massimo malvestio

unread,
Nov 30, 2010, 10:14:58 AM11/30/10
to google-we...@googlegroups.com
They introduce the basic concept of MVP approach, but they don't reflect GWT implementation of MVP pattern

John Rellis

unread,
Nov 30, 2010, 10:11:44 AM11/30/10
to google-we...@googlegroups.com
If you read the API it states that these classes are :

Experimental API: This class is still under rapid development, and is very likely to be deleted. Use it at your own risk.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
John Rellis
@johnrellis

David Chandler

unread,
Nov 30, 2010, 11:40:43 AM11/30/10
to google-we...@googlegroups.com
There are two reasons for this, actually:

1. The MVP tutorials were written months before Activities and Places
became available in GWT 2.1.0.
2. The concepts are somewhat orthogonal, that is, Activity != Presenter.

I think some of the reason for the confusion around Activity vs.
Presenter has been that the community has different definitions of
what is a presenter. In the first version of the gwt-presenter
framework (and perhaps Ray Ryan's MVP talk at I/O '09--I'd have to go
back and listen to be sure), a presenter was associated with a place,
and this is the way many continue to think about presenters. Others
take the more narrow view that it's just the biz logic behind a view
or widget and is not tied to the concept of a place at all. In the
latter concept, an Activity might load a view which consists of
multiple sub-views or widgets, each backed by a presenter. Only the
Activity itself is mapped to a Place.

HTH,
/dmc

> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

--
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.blogspot.com/

Ray Ryan

unread,
Nov 30, 2010, 11:51:38 AM11/30/10
to David Chandler, google-we...@googlegroups.com
+1

I think the community has inferred a linkage between place and presenter that I never meant to imply. The MVP pattern is a lot more generally useful than the place notion — it's all about decoupling view and app logic, a pretty universal concern. IMHO Place is mainly useful for apps that are about navigating around an object graph, like AdWords and most most simple CRUD apps, a much narrower set. A concrete example: Wave made great use of MVP, but never used the place notion because it was too limiting for them. For details see Dan Danilatos's presentation from I/O 2010, which I never get tired of flogging:


The activity and place packages in GWT 2.1 are pretty minimal first stabs, kind of rushed out the door. One focus of GWT 2.2 will be improving their flexibility and reducing the boilerplate they require. 

Brian Reilly

unread,
Nov 30, 2010, 1:15:00 PM11/30/10
to google-we...@googlegroups.com
The fact that the Activities and Places documentation is under the heading "MVP Framework" in the GWT documentation and contains statements like "An activity in GWT 2.1 is analogous to a presenter in MVP terminology" (recently discussed in another thread: http://groups.google.com/group/google-web-toolkit/browse_thread/thread/8cd8e6180fc957f8/03eace027a3bd9d4?lnk=gst&q=analogous#03eace027a3bd9d4) doesn't help clear up the confusion. I'd actually say that Thomas Broyer's blog (http://tbroyer.posterous.com/) is required reading along with the MVP Framework docs.

-Brian

PhilBeaudoin

unread,
Dec 1, 2010, 12:58:30 PM12/1/10
to Google Web Toolkit
This conceptual leak between activity, presenters and places has also
confused me quite a bit. Now that I understand it (slightly) better I
think part of the confusion is caused by the fact that GWT expects you
to build your own presenter/view separation and doesn't provide base
classes or interfaces for presenters themselves. Instead it expects
you to use composition (with an EventBus, with an Activity, etc.) to
build the functionality you need when you need it.

This is a contrast to previous MVP frameworks. For example, gwt-
platform offers two different concepts:
- Presenter
The base class for a presenter that is also an activity (and
optionally a place).
- PresenterWidget
The base class for a reusable presenter that is only meant to
separate logic form view.

There are advantages and drawbacks to offering base classes for
presenters, but my guess is that most people using GWT's MVP will need
to build at least a small scaffolding of base classes similar to the
above.

Cheers,

Philippe


On Nov 30, 10:15 am, Brian Reilly <br...@ireilly.com> wrote:
> The fact that the Activities and Places documentation is under the heading
> "MVP Framework" in the GWT documentation and contains statements like "An *
> activity* in GWT 2.1 is analogous to a presenter in MVP terminology"
> (recently discussed in another thread:http://groups.google.com/group/google-web-toolkit/browse_thread/threa...)
> doesn't help clear up the confusion. I'd actually say that Thomas Broyer's
> blog (http://tbroyer.posterous.com/) is required reading along with the MVP
> Framework docs.
>
> -Brian
>
>
>
>
>
>
>
> On Tue, Nov 30, 2010 at 11:51 AM, Ray Ryan <rj...@google.com> wrote:
> > +1
>
> > I think the community has inferred a linkage between place and presenter
> > that I never meant to imply. The MVP pattern is a lot more generally useful
> > than the place notion — it's all about decoupling view and app logic, a
> > pretty universal concern. IMHO Place is mainly useful for apps that are
> > about navigating around an object graph, like AdWords and most most simple
> > CRUD apps, a much narrower set. A concrete example: Wave made great use of
> > MVP, but never used the place notion because it was too limiting for them.
> > For details see Dan Danilatos's presentation from I/O 2010, which I never
> > get tired of flogging:
>
> >http://www.google.com/events/io/2010/sessions/gwt-continuous-build-te...
>
> > The activity and place packages in GWT 2.1 are pretty minimal first stabs,
> > kind of rushed out the door. One focus of GWT 2.2 will be improving their
> > flexibility and reducing the boilerplate they require.
>
> > On Tue, Nov 30, 2010 at 8:40 AM, David Chandler <drfibona...@google.com>wrote:
>
> >> There are two reasons for this, actually:
>
> >> 1. The MVP tutorials were written months before Activities and Places
> >> became available in GWT 2.1.0.
> >> 2. The concepts are somewhat orthogonal, that is, Activity != Presenter.
>
> >> I think some of the reason for the confusion around Activity vs.
> >> Presenter has been that the community has different definitions of
> >> what is a presenter. In the first version of the gwt-presenter
> >> framework (and perhaps Ray Ryan's MVP talk at I/O '09--I'd have to go
> >> back and listen to be sure), a presenter was associated with a place,
> >> and this is the way many continue to think about presenters. Others
> >> take the more narrow view that it's just the biz logic behind a view
> >> or widget and is not tied to the concept of a place at all. In the
> >> latter concept, an Activity might load a view which consists of
> >> multiple sub-views or widgets, each backed by a presenter. Only the
> >> Activity itself is mapped to a Place.
>
> >> HTH,
> >> /dmc
>
> >> On Tue, Nov 30, 2010 at 9:03 AM, cri <chuck.irvine...@gmail.com> wrote:
> >> > I've used the articles "Large scale application development and MVP" I
> >> > and II to model our MVP application. I notice that these tutorials
> >> > don't use either of the "Place" or "Activity" classes made available
> >> > by GWT. I'm wondering why this is. Does anyone know? Thanks
>
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> Groups "Google Web Toolkit" group.
> >> > To post to this group, send email to
> >> google-we...@googlegroups.com.
> >> > To unsubscribe from this group, send email to
> >> google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs cr...@googlegroups.com>
> >> .
> >> > For more options, visit this group at
> >>http://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> --
> >> David Chandler
> >> Developer Programs Engineer, Google Web Toolkit
> >>http://googlewebtoolkit.blogspot.com/
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs cr...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages