Wednesday, May 4, 2011

Where to store global (application) variables?

In my application I need to store in somewhere a variable "user" where
I want to store the session user data.

Should I do something like this:
http://stackoverflow.com/questions/3559461/gwtjava-globals-singletons-and-headaches

Or should I use GIN and should I do something like this?

public class MyAppClientModule extends AbstractGinModule {
protected void configure() {
bind(User.class).in(Singleton.class);
}
}

Or sould I use ClientFactory and ClientFactoryImpl and store in my
ClientFactory my session user data.
http://code.google.com/webtoolkit/doc/trunk/DevGuideMvpActivitiesAndPlaces.html#ClientFactory

I am using GWT 2.0 MVP framework.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate