Introduction to Adobe Flex
I'll start by introducing Adobe Flex and looking at the different options for developing Flex applications, in particular, the free Adobe Flex SDK. We can then look at the technologies used to create a Flex application: MXML and ActionScript.
Adobe Flex is a framework that allows you to create powerful Flash applications using traditional application development techniques. Flex includes a rich component library that allows you to easily create stunning Rich Internet Applications (RIAs). These applications can be developed using the open source Flex SDK and a basic text editor, such as Notepad. Adobe has a commercial IDE available called Flex Builder, which is based on the Eclipse platform. In this tutorial, however, we will simply be using the free Flex SDK.
The Flex SDK is an open source framework that can be used to develop Flash applications using a standards-based language that should be easy to learn for developers of all disciplines. The Flex SDK is available in two forms: the open source Flex 3 SDK and the Adobe Flex 3 SDK. Both are available free of charge, but differ in terms of the license. The open source Flex 3 SDK contains everything you need to develop Flex applications and is entirely licensed under Version 1.1 of the Mozilla Public License (MPL). The Adobe Flex 3 SDK contains everything in the open source Flex 3 SDK, as well as additional components such as the Adobe AIR runtime and the debugger version of the Adobe Flash Player. These additional components are licensed under the Adobe Flex SDK license.
This tutorial only covers the open source Flex 3 SDK. Whichever version you choose to download should not impact your ability to follow along with the sample applications. If you wish to install the debugger version of the Adobe Flash player, you will find a link to more information about doing so in the Resources section.
MXML is an XML-based user interface markup language that is mainly used to layout a Flex application and to add rich components to it, much like Swing in the Java language. MXML is also used to create data sources and to bind the user interface components to these sources. One of the greatest advantages of MXML is that it allows the developer to create animations, states, transitions, and styles very simply, resulting in reduced UI development time and greater productivity on the development of the application functionality itself. A very useful feature of MXML is its extensible nature, allowing developers to easily create reusable components.
MXML files are created with the extension .mxml and can include ActionScript in a
CDATA section within
Alternatively, ActionScript code can be stored in an external file, with the
extension .as. MXML and ActionScript code is compiled into Flash bytecode,
resulting in a .swf file. This file can then be included in HTML files or AIR
applications and deployed to the Web or to the desktop.