Hello everyone, I'm a little new to GWT, but I'm a quick study, and I've written a small application using some of the fun new concepts, such as MVP, GIN, Command-pattern-based RPC, and Activity and Places.
One question I have is how best to maintain application state in the client (prefer the server to be as sessionless as possible). For example, when I login* I need to store the username somewhere. It may get used in various other views, and possibly also on logout. I don't want to store it in the "presenter" (read: Activity) for the login page, because that object should be destroyed after the user logs in and arrives at the initial home page of the app. Likewise I would not want to store it in the view, since it could be reused elsewhere. So where should I store it? One suggestion I've seen several times is a variation of using a client-side singleton "catch all" class where things can be stored, sort of like session-scoped map of attribute in a servlet. Is this the best way to do it? What other patterns or approaches would you suggest? Many thanks! Ryan * I probably wouldn't use GWT for login credentials in a real production app, but instead use a 3rd-party security framework like Spring Security. But this is a hypothetical example and could apply to any number of types of application state. -- 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.
