MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Betriebsanweisung Seite 67

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 256
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 66
About the Flex coding process 67
Many times, the choice depends on your existing applications and how you choose to
integrate them with your back end server-side resources. The performance of web services
depends greatly on your application server’s underlying implementation of the web services
engine, so you should load-test to see how well it performs.
For more information, see Chapter 42, “Accessing Server-Side Data,” in the Flex 2 Developer’s
Guide.
Separating your data model from your view
To cleanly separate the user interface, application-specific data, and data services, you can use
Flex data models that store data between controls and data services. This type of three-tier
design is applicable to both input data and data service results.
When you plan an application, you determine the kinds of data that the application must
store and how that data must be manipulated. This helps you decide what types of data
models you need. For example, suppose you decide that your application must store data
about employees. A simple employee model might contain name, department, and e-mail
address properties.
A Flex data model is an ActionScript object that contains properties that you use to store
application-specific data. You can use a data model for data validation, and it can contain
client-side business logic. You can define a data model in MXML or ActionScript. In the
model-view-controller (MVC) design pattern, the data model represents the model tier.
You can define a data model in an MXML tag, ActionScript function, or an ActionScript
class. A model written in MXML is useful for rapid development and simple data storage, but
it does not provide any additional functionality, and you cannot set the data types of the
model’s properties. You should use an ActionScript-based class if you want to set data types
and provide methods for additional functionality. In general, you should use MXML-based
models for simple data structures and use ActionScript for more complex structures and
client-side business logic.
For more information, see Chapter 37, “Representing Data,” in the Flex 2 Developer’s Guide.
About the Flex coding process
When you develop a Flex application, you use the same iterative process that you use for other
types of web application files, such as HTML, JSP, ASP, and CFML.
Creating a useful Flex application is as easy as opening your favorite text editor, such as Flex
Builder, typing some XML tags, compiling the file to a SWF file, deploying the SWF file, and
requesting the SWF files URL from a web browser.
Seitenansicht 66
1 2 ... 62 63 64 65 66 67 68 69 70 71 72 ... 255 256

Kommentare zu diesen Handbüchern

Keine Kommentare