Without BlazeDS (that is, without deploying any Flex-specific
component on the server side), Flex applications can access back-end data using
either the HTTPService or the WebService.
- You can use the HTTPService component to
send HTTP requests to a server, and consume the response. Although the
HTTPService is often used to consume XML, it can be used to consume other
types of responses. The Flex HTTPService is similar to the XMLHttpRequest
component available in Ajax.
- You can use the WebService component to
invoke SOAP-based web services.
BlazeDS is a series of data services that provide your Flex
applications with additional data connectivity options:
- The Remoting Service allows your Flex application
to directly invoke methods of Java objects deployed in your application
server.
- The Message Service provides a publish/subscribe infrastructure that allows your Flex
application to publish messages and subscribe to a messaging destination,
enabling the development of real-time data push and collaborative
applications.
- The Proxy Service allows your Flex application to make
cross-domain service requests in a secure and controlled manner. In other
words, it allows your Flex application to access a service available on a
domain other than the domain from which the application was downloaded (without
having to deploy a crossdomain.xml policy file on the target domain).
BlazeDS is deployed as a set of JAR files as part of your web application.
Like the Flex Software Development Kit (SDK), BlazeDS is an open source
project. More information is available here.
The objective of this test drive is to give you, in a very
short amount of time, an understanding of how the BlazeDS data services work
and what they can do. This test drive consists of a series of seven samples
kept as concise as possible (typically between 10 and 50 lines of code) to
clearly highlight features of interest.
This test drive is the same test drive available in the full
download of BlazeDS.
Requirements
Flex Builder 3 (contains the free Flex 3 SDK)
BlazeDS Turnkey Server
Java Development Kit (1.5 or later)
Install the BlazeDS Turnkey Server
Before running any of the sample applications, you will need
to install the BlazeDS turnkey server, a ready-to-use version of Tomcat in
which the BlazeDS data services have already been deployed along with sample
applications. The goal of the turnkey server is to give developers an easy way
to run samples and tutorials out-of-the-box.
To install the BlazeDS turnkey
server:
- Make sure that you have the
JDK 1.5 or higher installed, and that you have a JAVA_HOME environment
variable pointing to your Java Development Kit installation.
- Download blazeds-turnkey-<version>.zip.
-
Unzip
blazeds-turnkey-<version>.zip in /blazeds
Note: If you
unzip blazeds-turnkey-<version>.zip anywhere else, make sure you adjust
the path used in these instructions accordingly.
-
Start Tomcat
- Open a command prompt window
- Navigate to /blazeds/tomcat/bin
-
Execute the following command:
catalina run
- In
your browser, view http://localhost:8400/samples to make sure the installation
is successful. You should see the BlazeDS samples home page.
About the author
Christophe Coenraets worked at Powersoft—which then became part of Sybase—from 1994 to 2000.
He started working with Java in 1996 and became the technical evangelist
for the company's Java and Internet Application Division. Christophe then joined
Macromedia as the technical evangelist for JRun, the company's J2EE application
server. In this position, Christophe started working on rich Internet applications
(RIAs) and on ways of integrating Flash front ends with J2EE back ends. Christophe
is currently Senior Evangelist for the new developer-centric RIA initiative at Adobe. Christophe has been a regular speaker at conferences
worldwide for the last 10 years.