For everyone following this thread, I would recommend to take a look in the presenter's implementation created by David http://gwt-presenter.googlecode.com
I'm taking a look on it too, and it seems to be very interesting. I will port my little application as a proof concept. As soon as possible I will post here a feedback. Best regards, Eduardo S. Nunes On Wed, Jul 15, 2009 at 4:43 AM, Thomas Broyer<[email protected]> wrote: > > > On 13 juil, 11:18, Kwhit <[email protected]> wrote: >> I'm following your work with interest Eduardo, I'm in the process of >> building a 'dream-team reference application' myself including RPC, >> EasyMock, GIN, Guice, ... so I can unit test and hack end-to-end >> without deploying on a server. >> >> Here's question / comment... >> >> I don't understand the go() method on the presenter impl classes. Take >> for example mainPresenter.go(): it does a bit of widget composition >> adding the menu and returns the view which is the job of getView(). >> Then in go() you call menuPresenter.showMenu() which doesn't actually >> show the menu but instead it returns the view which is again the job >> of MenuPresenterImpl.getView(). >> >> My guess is you are (like me) having some problems in the last metre >> of the 100m just glueing the application together. I don't have a nice >> answer for that yet... > > Just a thought: how about building *some of* the "view hierarchy" via > DI too and inject the very same views (widgets) in both their parent > widget (for "view compositing") and presenter? (only in the case of > singletons of course, and use providers and/or these getView/getWidget > methods we've talked about otherwise). > > E.g. in Eduardo's sample: inject a MenuWidget instance into both the > MainWidget constructor and the MenuPresenterImpl (MenuWidget is laid > out by MainWidget and controlled by MenuPresenterImpl); and in the > case of the IssueDisplayXXX and IssueEditXXX, use providers as of > today for lazy-init (inject Provider<IssueDisplayWidget> and > Provider<IssueEditWidget> into MainWidget), but use singletons though, > so that the view and presenter are correctly associated while still > using two distinct, unrelated providers. > > And only in those cases where you need several instances of a > component (presenter/view) you'd have to use the getView/getWidget > methods so that you get/create a presenter instance from the Ginjector > which gets injected its own view. > > It's just an idea, feel free to reject it with whichever argument > comes to your mind ;-) > > > > -- 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 [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 -~----------~----~----~----~------~----~------~--~---
