Hi All,

I think I get MVP and many of the Ray Ryan application design
concepts.

One thing I'm struggling with is an elegant design pattern for
managing state across presenters.  Take the Contact List example where
the user can create/update Contacts.  So for my "state" issue, the
user can create/update many Contacts before anything goes to the
server and then there's a big "Save" button at the top of the page the
user would click to send all their created/modified Contacts to the
server.

In this case, the ContactDetail Presenter should not really be
interacting with the RPC Service, right?  Even if the RPC Service has
the "Caching" decorator, it still doesn't seem like a good fit.  Do
people introduce a "StateService" in to the mix that's more local to
the page and then have that interact with the RPC Service when the
user clicks "Save"?

Another idea is there is no "StateService".  It's just the
PagePresenter that holds the state, Contacts, for the page and injects
it in to the Contact Detail Presenter as needed.   Then the
ContactDetail Presenter doesn't have a handle to the RPC Service; it
just gets a Contact injected in to it by the PagePresenter.  I'm sort
of leaning this way, but want to make sure I'm not missing something.

Hope the question makes sense.  Any feedback is appreciated!

Thanks,

Eric

(I know this isn't all that usable for Contact List, but for our
application it will make sense that things aren't sent to the server
every time a user finishes with a Presenter.)

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

Reply via email to