Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Google Web Toolkit Applications book

 
Ken Boyd
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ryan,
I would like to know if your book throw some inside on GWT to backend connectivity. Many applications were written in JSP/Servlets combo and replacing JSP with GWT you need more information about converting JSP page into GWT. I mean how to map session variables from JSP to GWT. Does your book cover any of this topic or it is purely UI base?

Thanks,
Ken

BTW: I am evaluating GWT for new project.
 
Ryan Dewsbury
author
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The book covers backend connectivity in great detail. Chapter 3 is an overview of the techniques you can use for connecting to a backend server. Chapters 6-10 are example applications, each dealing with a different type of backend. The application in chapter 6 looks a a serverless application that saves it's state as a browser cookie or using Google Gears offline storage. The application in chapter 7 connects to four different third party servers using JSONP as the method of communication. The application in chapter 8 connects to the Blogger web service which uses GData and Google's AuthSub. In chapter 9, the application connects to a Java servlet using GWT RPC implementation. Chapter 10 looks at connecting to backends with an action based approach to connect to backends that may have been used with HTML forms previously, a REST approach for connecting to a stateless backend, and a typical Java approach using GWT RPC, a Servlet, and Hibernate.

I talk about how by using GWT you can shift your application away from a stateful server implementation towards a stateless server. GWT lets you put more application state in the client instead of on the server. Instead of making many round trips to the server for each action, as you would with a JSP based approach, you can manipulate the model through many actions in the client and commit the changes to the server in batches. Tis is a fundamental architectural difference between GWT and JSP which means that you will rely much less on session variables.

Of course you may still need session variables. The application in chapter 9 uses session variables to hold the currently logged in user's identity. But you will probably think less about translating session variables to GWT than you will about creating a programmatic interface for your GWT application to talk to your backend (using GWT RPC, XML, or JSON). Your GWT application is effectively decoupled from your server implementaton so any session variables will have to be sent over this type of interface.
[ November 13, 2007: Message edited by: Ryan Dewsbury ]
 
Ken Boyd
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ryan for great post. You have provided pin point explanation to my problem. If I win the book or not most probably I will use it for my project. After long time some technology excite me to code..

Thanks,
Ken
 
George Sanchez
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ryan,
Do you think GWT is a good scalable framework ?
 
Ryan Dewsbury
author
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
George, very much so.

It's mostly client side and it scales much better than many JavaScript frameworks I've used.

I've used it on the server for GWT RPC. The RPC implementation scales well. I've used it on a single server serving about 300 calls per second with low CPU.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic