MACROMEDIA FLEX-GETTING STARTED WITH FLEX Getting Started page 63

Table of Contents

Advertisement

Laying out your application
You declare a Flex user interface by using tags that represent user-interface components. There are
two general types of components: controls and containers. Controls are form elements, such as
buttons, text fields, and list boxes. Containers are rectangular regions of the screen that contain
controls and other containers. Every user-interface component has a corresponding ActionScript
class that inherits common functionality from the mx.core.UIObject and mx.core.UIComponent
base classes. User-interface components contain properties, methods, and events. For more
information, see Chapter 1, "Using Flex Components," in Developing Flex Applications.
At the root of a Macromedia Flex application is a single container, called the Application
container, that represents the entire Flash Player drawing surface. This Application container
holds all other containers, which can represent dialog boxes, panels, and forms.
A container has predefined rules to control the layout of its child containers and controls,
including sizing and positioning. Flex defines layout rules to simplify the design and
implementation of rich Internet applications, while also providing enough flexibility to let you
create a diverse set of applications.
One advantage of having predefined layout rules is that your users will soon grow accustomed to
them. That is, by standardizing the rules of user interaction, your users will not have to think
about how to navigate the application, but can instead concentrate on the content that the
application offers.
Another advantage is that you do not have to spend time defining navigation and layout rules as
part of the design process. Instead, you can concentrate on the information that you want to
deliver and the options that you want to provide for your users, and not worry about
implementing all the details of user action and application response. In this way, Flex provides the
structure that lets you quickly and easily develop an application with a rich set of features and
interactions.
Organizing your data
The Flex data management tier consists of the features in the following table.
Feature
Data service
Data model
Data validator
Description
Accesses data from a remote location, and sends new or modified data to a remote
location. A typical way to send data to a data service is by sending data stored in a
user interface control to the data service. For example, a user fills in the fields of a
form and clicks a button to submit the form to a service. The user input data
becomes part of the service request. Data that the service returns is stored in the
service's
property.
result
Stores data in fields that represent each part of a specific data set. For example, a
person model stores data such as a person's name, age, and phone number. Data
services contain data models to store request data and result data.
Validates data in data model fields. For example, you can use a data validator to
validate the data in a form before submitting it to a data service.
Working with a multitier application model
63

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-GETTING STARTED WITH FLEX and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents