
Architecting an application
73
ThumbnailView
The ThumbnailView object is a visual object that displays a set of ProductThumbnail objects.
This object must get the product data from the catalog object and pass it into ProductThumbnail
objects that represent the individual products contained in the catalog object. This requirement
are described in
“Determining component types and a messaging strategy” on page 73
.
ProductDetail
The ProductDetail object is a visual object that displays a large image, name, price, description,
and quantity selector for a selected ProductThumbnail object or a selected item in the
ShoppingCart object. This object also lets the user add a selected item to the ShoppingCart
object.
This object must get the index of the selected ProductThumbnail or ShoppingCart item and
display the corresponding product data appropriately in the user interface; this requirement is
described in
“Determining component types and a messaging strategy” on page 73
.
Checkout
The Checkout object is a visual object that contains a form for placing an order based on the
current items in a ShoppingCart object. This object must get the current data from the
ShoppingCart object and display it appropriately in the user interface; this requirement is
described in
“Determining component types and a messaging strategy” on page 73
.
Determining component types and a messaging strategy
After you establish an object model, you need to consider what types of Flex component to use
for each object in the model. For simple visual objects that use standard Flex user-interface
components, you can create an MXML component. For nonvisual objects, or to modify the
behavior of a visual component, you can create an ActionScript component. For complex visual
objects, you can create a SWC component in Macromedia Flash MX.
For more information about MXML components, see Chapter 15, “Building an Application with
Multiple MXML Files,” in
Developing Flex Applications
. For more information about ActionScript
components, see Chapter 18, “Creating ActionScript Components,” in
Developing Flex
Applications
. For more information about SWC components, see
Developing Flex Applications
.
When you have a plan for the types of Flex components to use in your object model, you must
start thinking about a messaging strategy for acquiring and manipulating application-specific
data. You need a way for the objects in the application to send and receive data. To solve this
problem in the Flex Store application, many of the objects contain data object properties, which
are ActionScript properties or
<mx:Model>
tags that you use to pass data into the objects.
This following sections describe the component types and messaging strategy of the Flex Store
application.
Содержание FLEX-GETTING STARTED WITH FLEX
Страница 1: ...Getting Started with Flex...
Страница 4: ...4 Contents...
Страница 22: ...22 Chapter 1 Introducing Flex...