Chapter 5. Other Techniques for Talking to Servers

 

This chapter covers

  • Security issues for communications
  • Using GWT’s HTTP classes
  • Using Flash as a communication proxy
  • Using Java applets as communication proxies
  • The Comet technique for event-based communications

When I am working on a problem, I never think about beauty. I think only of how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong.

Buckminster Fuller

While GWT’s RPC mechanism, which we introduced in chapter 3, is great for greenfield development and can be used to proxy to other service implementations, sometimes it’s more valuable to have your application talk directly to an external service. For instance, if you have existing SOAP-based services that are not colocated with your web application, a two-stage proxy from the web application server can hinder performance and drive up bandwidth costs. Other times you might want to talk to public web services from Amazon, Google, Yahoo, or others. In this chapter we’ll address issues surrounding talking to servers. We’ll start with the security concerns and then look at several technologies—GWT and non-GWT—that enable data transmission and server communication.

5.1. Web development methods and security

5.2. Enabling REST and POX communications

5.3. Understanding Java-to-JavaScript interaction

5.4. Creating a cross-domain SOAP client with Flash

5.5. Incorporating applets with GWT

5.6. Streaming to the browser with Comet

5.7. Summary