First of all, thanks to everyone who contributed to this thread and
many thanks to folks who contributed to GWT!

Just wanted to comment on activities/view/presenters:

I actually like it that there is a separate concept of an activity
because it directly corresponds to user activity.  Activity is an
object that is providing some functionality when a user navigates to
some place in the application.  To support this concept, an
application uses a place-to-activity mapper.

A presenter is a bridge between a view and a model.  Depending on the
application, a presenter can be directly implemented by an activity,
but this is not necessary.

Similar to Nicolas' suggestion, my application has a View interface
with setPresenter() method, but there are cases where neither View nor
setPresenter() are required. As such, it appeals to me that GWT does
NOT provide a View interface with setPresenter() method.

Since it is Activity that responds to user's navigation to a place,
activities drive presenters and views.  Activity interface already has
methods that control its lifecycle (start(), mayStop(), etc), as such
I don't see a need for a separate Presenter interface in the GWT
framework that would duplicate lifecycle management.  But an
application can duplicate lifecycle management if it is required.

I do agree, however, that some documentation describing MVP approach
in more detail would be very helpful.

Thanks again,
Yuri

David Chandler wrote:
> Thanks for your thoughts, Nicolas. I believe the reason we've not
> created View and Presenter interfaces to date is because there are two
> different styles of MVP widely in use, only one of which allows the
> view to call the presenter as in your example. Which leaves us in the
> funny position that the new MVP framework is missing *formal*
> definitions of View and Presenter. Personally, I think it's a good
> thing that GWT Activities and Places are independent of views and
> presenters so as not to force you into one model. I think View and
> Presenter as you've described would fall in the category of things
> that are not quite core code, but are nevertheless useful abstractions
> that probably need a home in the GWT source somewhere for reference.
> We'll chew on this a bit for 2.1.1...
>
> /dmc
>
> On Wed, Nov 3, 2010 at 8:06 PM, Nicolas Antoniazzi
> <nicolas.antonia...@gmail.com> wrote:
> >> Thanks for your comments. Do you mind sharing with us what would go in
> >>
> >> the Presenter interface to allow you to "fully use" MVP? We're very
> >>
> >> much open to ideas from the community as to how to make it work
> >>
> >> better.
> >
> > Well, in my opinion, it would be clearer to create 2 new interfaces :
> > 1) a "Presenter" interface that contains
> > - start(ForIsWidget container)
> > - onStop()
> > then, Activity interface could extends Presenter and add mayStop()...
> > It would clarify that we can insert nested presenter into activity without
> > adding activity into activity since it is not really the same concept in my
> > opinion.
> > 2) Then, create an interface called "View<T extends Presenter>" that
> > contains
> > - setPresenter(T presenter)
> > they could be implemented by Composite or UiObject.
> > Maybe that it sounds a bit unecessary to you, but I think that it would
> > clarify things between Activities and Presenter/View just with those 2 new
> > interfaces.
> >>
> >> Activities are more tied to the concept of Places than of MVP, i.e.
> >>
> >> navigation and user experience rather than code structure ("developer
> >>
> >> experience"). Does that make things clearer?
> >
> > Yes, it is clearer. Thanks Thomas.
> > Thanks for all your great work on GWT.
> > Nicolas.
> >
> > --
> > 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-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to