On Tue, Jul 21, 2009 at 7:07 PM, Thomas Broyer<t.bro...@gmail.com> wrote: > > > > On 15 juil, 21:36, David Peterson <da...@randombits.org> wrote: >> >> Presenter Pattern API: http://code.google.com/p/gwt-presenter > > I wouldn't have made the "place" a part of the presenter (it isn't any > different than the presenter registering itself a change handler on > History). > The whole point of the "place" service is to decouple your "URL > patterns" from your components: the place service just: > - listens to history change events, "interprets" them and fire > appropriate events on the event bus ("please display the contact with > ID=12345", "please display the list of contacts") > - listens to events fired by other components and updates the URL > (History.newItem(newToken, false)); for instance, when you click on a > contact in the contact list, the list fires a "picked contact (the one > with ID=12345)" event, some component listens to it and updates the > display to show the contact info, and the place service listens to it, > maps it to a history token and updates the History. Or maybe the > component that displays the contact fires a "contact displayed (the > one with ID=12345)" event, and the place service listens to this one > instead.
Good point Thomas. So, the place service would directly call some presenter or talk to the presenter by events. Considering my sample application and the url ( http://host/bit.html#edit;issue=1 ): - the place service would fire an IssueEditEvent with the issue id=1 - the main presenter would take this event and call the appropriated method in the IssueEditPresenter Thanks for the feedback Mr. Broyer, I will make a mix of the gwt-presenter project and mine, implementing this place service as well. Best regards, > > Maybe this fits into your gwt-dispatch project instead, but that's how > I would model the "place service". > > > -- Eduardo S. Nunes http://e-nunes.com.br --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---