Flex data services

A Flex data service is an object you insert in an MXML file to communicate with the business layer of a multi-tier application. You use data services to send and receive data from web services, HTTP URLs, and remote objects such as server-based Java objects.

In most enterprise applications, the presentation layer (the user interface) is separated from the business layer containing the code that implements the functionality or business rules of the application, and the data layer containing databases and other data stores. The presentation layer interacts with the business and data layers to produce an integrated application.

Note: The development of the business and data layers is beyond the scope of this guide. Flex is a presentation technology designed to work with existing business and data layers.

As a presentation layer technology, Flex does not support direct access to databases. The code contained in the business layer is responsible for communicating with databases. In other words, Flex must work with the business layer to get access to the underlying data.



The Flex presentation layer communicates with the business layer by using Flex data services, which are objects you insert in a Flex file. Specifically, you can use Flex data services to interact with the following:

A web service is a software system designed to support machine-to-machine interaction over a network. It has an interface described in a machine-processable format called WSDL. Other systems interact with the web service in a manner prescribed by its description.

An HTTP service is nothing more than an HTTP request to a URL. The primary purpose of HTTP services is to retrieve XML data from an external source.

A remote object is a Java object in the Flex application's classpath.

Related topics