The best practice for developing GWT applications is to keep the
server-side of your code as "Stateless" as possible.

In the past, with traditional web frameworks, there was not much you
could do on the client,
we only had basic html forms, which we asked user for input, and most
of the processing was done on the server.
Also, with traditional web frameworks and web apps, your application
was consisted of "Pages".
when our use cases were too big to fit in a single "Page", we had to
spread it across a number of pages,
and the challenge was to keep the data in consistent state as user
navigated from one page to another page within related pages for the
usecase.
JBoss Seam and Spring Webflow have the concept of conversation, to
deal with these scenarios.

However, with GWT, you have only ONE page. therefore you do not have
to maintain State between "Pages".
if your UseCase is complex, you do not need multiple pages for that.
you can have complex widgets, show/hide widgets as necessary.
and do much of the processing on the client. You can also cache data
on the client. and if you use RequestFactory it does that for you.

The only time you need to contact the server is Request for Data or
Updating the existing data. and it doesn't have to be stateful.

it is best only to keep only the user (session) id on the server, to
discern the current user making the request.

You can maintain as much state you want on the client, but
the recommended practice is to keep your application STATELESS on the
server.

Ryan

-- 
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.

Reply via email to