Mmm, very interesting idea, Ben.  I was already a little distressed
that my Activity constructors are getting large (5+ parameters).
Bundling them up into an ApplicationBundle object is appealing.
Although since I'm using Gin, I guess the constructor size isn't
really a problem.

Do you use this ApplicationBundle object to pass presenter-specific
information?  I.e., a specific view or place provider?  If so, how do
you parameterize the bundle to work for all presenters?

Ryan

On Jun 10, 6:37 am, Ben Imp <benlee...@gmail.com> wrote:
> I use an object called ApplicationModel, that is passed to every presenter
> on creation.  It stores application state, as its name might suggest.  It
> also fires off events whenever any of the presenters modifies one of its
> values, which helps keep the application in sync.  Things like user roles
> and what the user has currently selected are stored in there.
>
> I should also mention that the ApplicationModel is actually handed off to
> the presenter as part of an ApplicationBundle, which is basically just a
> parameter object.  It holds the model, the ApplicationNavigationControl,
> ApplicationEventBus, ApplicationFactory, etc.  Wrapping it all up in the
> parameter object makes it really easy to add new application-wide bits.
>
> -Ben

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