MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guide de l'utilisateur Page 55

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 256
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 54
Developing applications 55
The data model supports automatic data validation. This means that you can use the Flex
validators, such as the ZipCode validator, to ensure that the value in a model field is a valid
ZIP code. If the data is invalid, you can display a message to the user so that the user can
correct the error.
How Flex fits the MVC models
The goal of the Model-View-Controller (MVC) architecture is that by creating components
with a well-defined and limited scope in your application, you increase the reusability of the
components and improve the maintainability of the overall system. Using the MVC
architecture, you can partition your system into three categories of components:
Model components Encapsulates data and behaviors related to the data.
View components Defines your applications user interface.
Controller components Handles the data interconnectivity in your application.
For example, with the MVC design, you could implement a data-entry form that has three
distinct pieces:
The model consists of XML data files or the remote data service calls to hold the form
data.
The view is the presentation of any data and display of all user interface elements.
The controller holds the user interface logic.
Although you can consider a Flex application as part of the View in a distributed MVC
architecture, you can use Flex to implement the entire MVC architecture on the client. A Flex
application has its own view components that define the user interface, model components to
represent data, and controller components responsible for the communication with back-end
systems. This client-side separation of task is not available in HTML.
Working with a web server
Your development and deployment environments typically include a web server, where you
use the web server to return a Flex SWF file in response to a user request. You use one of the
following types of web servers:
Simple web server
A simple web server only responds to static page requests to simple HTML pages. In this
case, you precompile your Flex applications and write a wrapper that embeds your Flex
applications SWF file in an HTML page.
Vue de la page 54
1 2 ... 50 51 52 53 54 55 56 57 58 59 60 ... 255 256

Commentaires sur ces manuels

Pas de commentaire