An interesting idea. A blog post suggesting abandoning Stateful layer in favour of completly Stateless RESTful approach.

http://www.peej.co.uk/articles/no-sessions.html

“Developers became used to having sessions available to them, so when systems grew, became more complex, and started spreading over multiple servers, more and more hacks had to be introduced to keep the session support working, when in reality, sessions should never have been introduced in the first place.”

Cart on the client

When you think about someone in real life going into a shop and placing items into their shopping basket, where is the basket? It’s with the user. So why don’t we model our online shop to mirror the real life scenario.
Web browsers used to be a document reader for displaying hypertext documents transfered over the HTTP protocol, but nowerdays they are an application platform thanks to the development and deployment of Javascript within the HTML document and the browser. So we can use Javascript to extend our clients browser to be able to store their shopping cart until they reach the checkout.”

Using web2.0 RIA clients such as GWT, Vaadin or Cappuccino fit just perfect. I would only disagree with using the REST as a remedy for everything. While REST is great general purpose service architecture, decision should rather be based per technology. GWT f.i. has its first class optimized RPC API, so it’s natural for GWT to use its RPC over REST JSON.