I've used the method here (http://www.amateurinmotion.com/articles/
2009/11/02/async-with-gin.html) to handle services.

It is a mixture of 1 and 2, you inject the services into the presenter
(Is it is Guice best practice to inject what you need instead of
injecting the service registry), but you also have a service registry.
Then when you have another GINjector you can pass the services
registry to that and use the service methods as providers for the
services.

On Jan 20, 4:09 am, Yaakov <yaakov.chai...@gmail.com> wrote:
> So, in the case where you might end up needing more than 1 service, it
> seems from what I've read, there are 2 approaches out there:
> 1) Pass ALL services (via their interfaces) to the presenter. This can
> also be done by injecting them.
> 2) Have a global service registry which initializes all the services
> in the entire app and can be reached throughout the app, i.e.,
> EditContectServiceAsync GWTServiceRegistry.getEditContactService().
>
> Anyone care to comment which way is better and why? Both approaches
> seem to be valid and have their pros/cons.
>
> Also, are there any other approaches to this that anyone knows about?
>
> Thanks,
> Yaakov.
>
> On Jan 16, 8:43 pm, ojay <oliver.ja...@googlemail.com> wrote:
>
>
>
> > Hi,
>
> > i agree with Julien .... it would be interesting how his case would be
> > handled. Does somebody has an idea?
>
> > Hope somebody will response to this topic
>
> > On 10 Jan., 14:30, Juju <funkybre...@gmail.com> wrote:
>
> > > Hello,
>
> > > There is one thing that I don't understand very well. I'm building an
> > > application with multiple services (imagine something like
> > > contactService, teamService, etc). Is there multiple AppController? In
> > > yourexample, the AppController is link with one service (the
> > > ContactService). It's a little dark for me.
>
> > > Thanks,
>
> > > Julien
>
> > > On 3 jan, 20:48, Flemming Boller <flemming.bol...@gmail.com> wrote:
>
> > > > Hi Chris
>
> > > > Thanks for you input around the dividing of presenters and views in 
> > > > bigger
> > > > apps like Gmail.
>
> > > > Do you have any brief input on how  runAsync andMVPplay together?
>
> > > > /Flemming
>
> > > > On Sun, Jan 3, 2010 at 8:36 PM, Chris Ramsdale <cramsd...@google.com> 
> > > > wrote:
> > > > > Yaakov,
>
> > > > > Having multiple presenters driving a single view would be a bit 
> > > > > strange.
> > > > > Typically want to the presenter to define the display interface that 
> > > > > the
> > > > > view will implement. Having multiple presenters drive a single view 
> > > > > means
> > > > > that either a) the display interface is defined in some parent 
> > > > > presenter
> > > > > class, or b) one of the presenters is responsible for defining the 
> > > > > display
> > > > > interface. Either way, it decouples the presenter->display 
> > > > > relationship that
> > > > > is inherent to theMVParchitecture.
>
> > > > > For applications with large UI frontends, you could consider breaking 
> > > > > the
> > > > > UI up into smaller presenter/view pairs that are managed by some 
> > > > > controller
> > > > > class. Take forexampleGmail; the folder list would be one presenter 
> > > > > with
> > > > > an associated view, the inbox list another, the Google Talk interface
> > > > > another, and so on. All of these would then be managed by some
> > > > > MainViewController class.
>
> > > > > Keeping widget-based code out of the presenter for ease of testing is
> > > > > golden. Beyond that it's really a question how much code you want to
> > > > > maintain within a single presenter and view.
>
> > > > > On Sun, Jan 3, 2010 at 9:20 AM, Yaakov Chaikin 
> > > > > <yaakov.chai...@gmail.com>wrote:
>
> > > > >> Chris, or anyone else with experience onMVPin GWT...
>
> > > > >> Practically, do you always have 1 view as the user sees it, i.e., the
> > > > >> whole GUI, or if your GUI has many components (as most GUIs do), do
> > > > >> you have multiple views, and most importantly, multiple presenters,
> > > > >> presenting 1 coherent view to the user? In yourexample, this would be
> > > > >> similar to splitting the GUI into a view that has the buttons and the
> > > > >> GUI that has the list.
>
> > > > >> How would that be handled inMVP?
>
> > > > >> Thanks,
> > > > >> Yaakov.
>
> > > > >> On Wed, Dec 30, 2009 at 2:43 PM, Chris Ramsdale 
> > > > >> <cramsd...@google.com>
> > > > >> wrote:
> > > > >> > While I see that someone has already found it, I just wanted to let
> > > > >> everyone
> > > > >> > know that it's officially there.
>
> > > > >>http://code.google.com/webtoolkit/doc/latest/tutorial/mvp-architectur...
>
> > > > >> > We're looking to put together parts 2 and 3 shortly. So far I have 
> > > > >> > UI
> > > > >> Binder
> > > > >> > and Code Splitting integration as topics of interest. Let us know 
> > > > >> > what
> > > > >> else
> > > > >> > would be of help.
> > > > >> > - Chris
>
> > > > >> > On Tue, Dec 29, 2009 at 1:00 PM, jpnet <jprichard...@gmail.com> 
> > > > >> > wrote:
>
> > > > >> >> I really like this article:
>
> > > > >>http://code.google.com/webtoolkit/doc/latest/tutorial/mvp-architectur...
>
> > > > >> >> However, it's almost useless without the entire source package. 
> > > > >> >> Are
> > > > >> >> there any plans to post the source code?
>
> > > > >> >> Thanks,
>
> > > > >> >> JP
>
> > > > >> >> --
>
> > > > >> >> 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<google-web-toolkit%2Bunsu
> > > > >> >>  bscr...@googlegroups.com>
> > > > >> .
> > > > >> >> For more options, visit this group at
> > > > >> >>http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > > > >> > --
>
> > > > >> > 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<google-web-toolkit%2Bunsub
> > > > >> >  scr...@googlegroups.com>
> > > > >> .
> > > > >> > For more options, visit this group at
> > > > >> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > > > >> --
>
> > > > >> You received this message because you are subscribed to the Google 
> > > > >> Groups
> > > > >> "Google Web Toolkit" group.> >> To post to this group, send email 
> > > > >> togoogle-web-tool...@googlegroups.com.
> > > > >> To unsubscribe from this group, send email to> 
> > > > >> >>google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2Bunsu
> > > > >>  bscr...@googlegroups.com>
> > > > >> .
> > > > >> For more options, visit this group at
> > > > >>http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > > > >  --
> > > > > You received this message because you are subscribed to the Google 
> > > > > Groups
> > > > > "Google Web Toolkit" group.> > To post to this group, send email 
> > > > > togoogle-web-tool...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to> 
> > > > > >google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2Bunsub
> > > > >  scr...@googlegroups.com>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/google-web-toolkit?hl=en.

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