Flex provides the following set of features for working with data in your applications: data services, binding, validation, and formatting. These features let you perform the following tasks using MXML tags:
Send data to server-side data sources
Receive data from server-side data sources
Pass data between client-side objects
Store data in client-side objects
Validate data before using it
Format data before displaying it in the user interface
Flex provides tags for connecting to server-side data sources. It also includes a simple syntax for providing input to data source requests and using the data returned from a data source within the client-side components that make up the application.
The following steps describe a simple scenario in which a user provides input data and requests information in a Flex application. A matching figure follows the steps.
User enters data in input fields and submits request by clicking a Button control.
(Optional) Data binding passes data to a data model object, which provides intermediate data storage. This allows data to be manipulated and passed to other objects in the application.
(Optional) One or more data validator objects validate the request data. Validator objects check whether data meets specific criteria.
Data is eventually passed to a data service request object.
The data service passes the request data to the appropriate method on a server-side object.
The server-side object processes the request and returns a result that is converted to a data service result object or a fault object if a valid result cannot be returned.
(Optional) Data binding passes data to a data model object, which provides intermediate data storage. This allows data to be manipulated and passed to other objects in the application.
(Optional) One or more data formatter objects format result data for display in the user interface.
Data binding passes data into user interface controls for display.