Chapter 3. Using BlazeDS as a Server-Side Proxy

A Flex client often needs to access external sources of data. It can access this data using one of the following two mechanisms:

  • It can request for data and get it as a response.

  • It can register interest in a certain type of data and receive it if and when such data is available.

The first of these two options is "pull" based, whereas the second option is "push" based.

Off the shelf, the framework includes three methods of pull-based communication and data interchange with external data sources:

  • HTTP request-response

  • Web services

  • Remote procedure calls involving objects

HTTP request-response is the most elementary of the three methods for external data access. It needs little preparation or prior knowledge to get started. I am assuming here that you know and understand the basics of the Web. Web services are not very complicated either, but they add a few additional protocols and semantics on top of the plain vanilla HTTP request-response. The last of the three, remote procedure calls using objects, is possibly the most complicated of the three. However, its complexity is often restricted to some initial configuration and the intricacies around the communication protocol, much of which is abstracted out for the application developer.

HTTP-based communication and web services can be leveraged by an application running in a Flash Player without BlazeDS or any such remoting layer, provided that the security constraints are satisfied. In ...

Get Professional BlazeDS: Creating Rich Internet Applications with Flex® and Java® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.