On Jun 20, 1:33 am, Ian Petersen <[email protected]> wrote:
> > My (limited) understanding of what Ray Ryan was saying (and what I
> > understand of MVP) is that the presenter is completely separated from the
> > DOM elements (in order to facilitate testing, and because the view is solely
> > responsible for the view so you can swap views in and out as you please).
>
> Your understanding of MVP is probably less limited than mine--I
> assumed it was a riff on MVC.  Anyway, couldn't you design an MVP
> framework to include "I'm done paying attention to changes" events,
> and use onUnload to trigger them when the presenter is using a widget
> and use some other means when it's using something besides a widget?
> Maybe we've drifted off into the weeds...

I'm also still wrapping my head around the presentation, but I agree-
Presenter objects are separate from the Widget hierarchy - the just
connect via the Widgets/interfaces exposed in the Display interface.

I think the way to have Presenter objects clean up after themselves
would be to have a Presenter superclass that registers itself with the
event bus to listen for 'Window Closing' events, and cleans itself up.
The main app would have an event listener for 'document.onUnload'
events that notifies the event bus and any Presenters can then tidy
up.

I'd love to see some code for the PlaceManager though...

David

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