How Flex Applications Work
Flex applications deployed on the Web work differently than HTML-based applications. It’s important to understand how Flex applications work in order to build them most effectively. When you understand how Flex applications work, you can know what elements are necessary for an application and how to build the application for the best user experience.

Every Flex application deployed on the Web utilizes Flash Player as the deployment platform. That means that a fundamental understanding of Flash Player is essential to understanding Flex. Additionally, all Flex applications use the Flex framework at a minimum to compile the application. As such, it’s important to understand the relationship between the source code files, the compiler, and Flash Player.
Asset files such as MP3s, CSS documents, and PNGs can be embedded within a .swf, or they can be loaded at runtime. When an asset is embedded within a .swf, it is not necessary to deploy the file to the production server, because it is compiled within the .swf file. However, since embedding assets within the .swf often makes for a less streamlined downloading experience and a less dynamic application, it is far more common to load such assets at runtime. That means that the asset files are not compiled into the .swf, and much like an HTML page, the assets are loaded into Flash Player when requested by the .swf at runtime. In that case, the asset files must be deployed to a valid URL when the .swf is deployed. Data services are requested at runtime. That means that the services must be available at a valid URL when requested at runtime. For example, if a Flex application utilizes a web service, that web service must be accessible from the client when requested. Media servers and Flex Enterprise Services must also be accessible when used by Flex applications.
Introduction to Flex
The Flex framework is synonymous with the Flex class library and is a collection of ActionScript classes used by Flex applications. The Flex framework is written entirely in ActionScript classes, and defines controls, containers, and managers designed to simplify building rich Internet applications.
The Flex class library is the subject of much of this book. It consists of the following categories:
Form controls
Form controls are standard controls such as buttons, text inputs, text areas, lists, radio buttons, checkboxes, and combo boxes. In addition to the standard form controls familiar to most HTML developers, the Flex class library also includes controls such as a rich text editor, a color selector, a date selector, and more.
Menu controls
Flex provides a set of menu controls such as pop-up menus and menu bars.
Media components
one of the hallmarks of Flex applications is rich media support. The Flex class library provides a set of components for working with media such as images, audio, and video.
Layout containers
Flex applications enable highly configurable screen layout. You can use the layout containers to place contents within a screen and determine how they will change over time or when the user changes the dimensions of Flash Player. With a diverse set of container components you can create sophisticated layouts using grids, forms, boxes, canvases, and more. You can place elements with absolute or relative coordinates so that they can adjust correctly to different dimensions within Flash Player.
Data components and data binding
Flex applications are generally distributed applications that make remote procedure calls to data services residing on servers. The data components consist of connectors that simplify the procedure calls, data models to hold the data that is returned, and data binding functionality to automatically associate form control data with data models.
Formatters and validators
Data that is returned from remote procedure calls often needs to be formatted before getting displayed to the user. The Flex class library includes a robust set of formatting features (format a date in a variety of string representations, format a number with specific precision, format a number as a phone number string, etc.) to accomplish that task. Likewise, when sending data to a data service from user input, you’ll frequently need to validate the data beforehand to ensure it is in the correct form. The Flex class library includes a set of validations for just that purpose.
Cursor management
Unlike traditional web applications, Flex applications are stateful, and they don’t have to do a complete screen refresh each time data is sent or requested from a data service. However, since remote procedure calls often incur network and system latency, it’s important to notify the user when the client is waiting on a response from the data service. Cursor management enables Flex applications
to change the cursor appearance in order to notify the user of such changes.
State management
A Flex application will frequently require many state changes. For example, standard operations such as registering for a new account or making a purchase usually require several screens. The Flex class library provides classes for managing those changes in state. State management works not only at the macro level for screen changes, but also at the micro level for state changes within individual components. For example, a product display component could have several states: a base state displaying just an image and a name, and a details state that adds a description, price, and shipping availability. Furthermore, Flex provides the ability to easily apply transitions so that state changes are animated.
Tool tips
Use this feature of the Flex class library to add tool tips to elements as the user moves the mouse over them.
Effects
Flex applications aren’t limited by the constraints of traditional web applications. Since Flex applications run within Flash Player, they can utilize the animation features of Flash. As such, the Flex class library enables an assortment of effects such as fades, zooms, blurs, and glows.
History management
As states change within a Flex application, the history management features of the Flex class library enable you to navigate from state to state using the back and forward buttons of the web browser.
Drag and drop management
The Flex class library simplifies adding drag and drop functionality to components with built-in drag and drop functionality on select components and a manager class that allows you to quickly add drag and drop behaviors to components.
Style management
The Flex class library enables a great deal of control over how nearly every aspect of a Flex application is styled. You can apply style changes such as color and font settings to most controls and containers directly to the objects or via CSS.
PHP 5 Tutorial – __get() Magic Method
This tutorial will guide you through the __get() Magic Method. The __get Magic method in PHP5 gets called when accessing the value of an undeclared or undefined attributes of an class. With this method the programmer can keep track on the variables which are not defined inside the class.
PHP 5 Tutorial – __set() Magic Method
This tutorial will guide you through the __set() Magic Method. The __set() Magic method in PHP5 gets called when setting the value to an undeclared or undefined attributes of an class. With this method the programmer can keep track on the variables which are not defined inside the class.
New satellite to sharpen Google Earth
DigitalGlobe, provider of imagery for Google Inc’s interactive mapping program Google Earth, said a new high-resolution satellite will boost the accuracy of its satellite images and flesh out its archive. The new spacecraft, dubbed WorldView I, is to be launched on Tuesday.
Yahoo introduced new social networking site, MASH
Yahoo has launched its second social networking sites YAHOO MASH to compete its rivals after ‘Yahoo 360’, the first social networking site of Yahoo that has failed.
Yahoo claimed that its social networking is different from others since it allows its user to create profiles of their friends and also allow them to open their profiles […]
-
Recent
-
Links
-
Archives
- April 2009 (2)
- June 2008 (4)
-
Categories
-
RSS
Entries RSS
Comments RSS