Hey Brian, I am going to be updating a new example and will look into your comments. I would also like to include Code Splitting while still using DI/Gin which I think will change things slightly.
I will try to have some more example code on GitHub by next week Thanks! On Nov 19, 11:43 am, Brian Reilly <[email protected]> wrote: > Ashton, > > It's good that you're doing this. I think we need some good examples of how > to put together a GWT application using GWT 2.0/2.1 features, GIN, etc. > > I took a quick look at some of the code (still planning to look more) and I > have a couple of comments. > > * I almost did the same thing as you to get a singleton PlaceController... > creating a provider class and binding PlaceController to that in singleton > scope. I had started out with a simple @Provider method in my GIN module, > but then adding bind(PlaceController.class).in(Singleton.class) was > overriding that. Finally, I found that I could just use a @Singleton > annotation on the method as well, so putting this in my GIN module works > beautifully: > > @Provides > @Singleton > PlaceController providePlaceController(EventBus eventBus) { > PlaceController placeController = new PlaceController(eventBus); > return placeController; > } > > * I notice that you're injecting instances of your activities into your > activity mapper. Activities are meant to be fairly lightweight objects, as > opposed to the views that represent them, so they don't need to be > singletons (which they effectively are since you have a single app with a > single injected activity mapper). It's probably not necessarily a problem > unless your activities have state associated with them (such as the entity > that the user is currently working with), which you have to be careful to > clear out between uses with different data. The same can be said about > places. > > There are probably some flaws with how I'm thinking about activities. I'm > still trying to learn how best to do all of this myself. I'm looking forward > to seeing the finished version of your example. > > -Brian > > > > > > > > On Thu, Nov 18, 2010 at 10:38 AM, Daghan <[email protected]> wrote: > > Hi Ashton, > > > Have you figured out a way to pass anything but SimplePanel objects to > > activityManager.setDisplay() function? > > > I am trying to figure out how to pass > > activityManager.setDisplay(composite) > > > Thanks. > > > On Oct 28, 6:52 am, Ashton Thomas <[email protected]> wrote: > > > I will definitely try to post a video. It just puts the pressure on to > > > actually do a good job! > > > > Thanks very much, > > > -Ashton > > > > On Oct 28, 2:12 am, StrongSteve <[email protected]> wrote: > > > > > Very nice idea. Thanks a lot for your effort. > > > > > Will there be a recording of the seminar for all of us on the other > > > > side of the pond? ;) > > > > > Greetings > > > > Stefan > > > > > On Oct 28, 4:19 am,AshtonThomas<[email protected]> wrote: > > > > > > Here is a direct link to the source code: > >http://github.com/ashtonthomas/gwt-seminar > > > > > > I will continue to update the code for this site as well as the > > > > > content on this app. Over the next few weeks I will post a lot of > > > > > different sample code. > > > > > > Hopefully it will help others get started quicker! > > > > > > On Oct 27, 8:16 pm,AshtonThomas<[email protected]> wrote: > > > > > > > Hey Everyone, > > > > > > > I am working on a seminar for GWT 2.1 that will happen in late > > > > > > November. But I will be putting together a lot of sample code. I > > have > > > > > > already pushed one app to github: > > > > > > >http://gwt.acrinta.com/ > > > > > > > I am still working on this, so expect updates > > > > > > > Cheers! > > > -- > > 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]<google-web-toolkit%2Bunsubs > > [email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-web-toolkit?hl=en. -- 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.
