Displaying multiple pop-up windows
Having more then six heavily populated pop-up windows open at the same time in a Flex
application can affect performance. The performance of Flash Player is limited by how quickly it
can redraw obscured windows. This is even more of an issue if each window has a complex
hierarchy of components within it. The more components that are obscured, the longer it takes
the player to redraw.
One possible way to work around this is to use Navigator containers to organize your pop-up
content so that it is spread out over multiple child views; for more information, see Chapter 7,
"Using Navigator Containers," in Developing Flex Applications. You can also organize multiple
pop-up windows in a dashboard application using Panel containers; for more information about
Panel containers, see Chapter 6, "Using Layout Containers," in Developing Flex Applications.
Using Flash Debug Player
Using Flash Debug Player can potentially slow an application. As Flash Debug Player processes
the application, it simultaneously writes out trace statements and warnings. If your application
runs quickly in Flash Debug Player, it will run as fast or faster in the standard Flash Player.
You can have both the Flash Debug Player and the standard Flash Player installed on your system.
Use query parameters and settings in the flex-config.xml file to control which player Flex uses to
execute your application. Ensure that you use the standard Flash Player during performance
testing. For more information, see Chapter 36, "Debugging Flex Applications," in Developing Flex
Applications.
Architecting an application
After you determine the purpose and general features of an application, you need to consider the
following topics:
•
What the object model should be
•
What types of Flex components you should use to represent the object model
•
What type of messaging strategy you should use to pass data between objects
This section uses a fairly simple e-commerce application called the Flex Store to illustrate general
ways to approach object models, component types, and messaging strategies. The application
demonstrates clear separation of model and view objects, and loose coupling of components. It
uses a combination of standard Flex components, MXML components, SWC components, and
ActionScript components.
The purpose of the Flex Store application is to display a catalog of items that the user can add to a
shopping cart, and then order. The following list includes some of the things a user can do with
the application:
•
Click a product thumbnail image to display a larger image and description.
•
Select a price range for products.
•
Add items to the shopping cart.
•
Place orders in a checkout form.
70
Chapter 4: Architecting Flex Applications
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