There are plenty of Flex tutorials out there, still why another one? Simple in my opinion most of the Flex tutorial I came across with goes too deep/complex without creating a base of understanding. Flex isn’t HTML
that you can just learn it through so called -Dumb guide to Flex. To be able to use full potential of Flex you should be known to one or more of these- PHP, ASP,JSP, CSS, XML etc. No need to be master of those but at least familiar with them makes Flex application building a lot easier. Adobe documentation/tutorial that comes with Flex 2.0 builder is quite self explanatory, but might be hard to grasp for a newbie.
Let us start the lesson by knowing the Flex a bit thoroughly than just overview.
What is Flex? Flex is neither a programming language nor a scripting language. Flex is an IDE (Integrated development environment) and as well as a SDK (Software Development Kit) for the development and deployment of cross platform, RIA (Rich Internet applications) generally based on Flash. Initially it was developed by Macromedia, which is now own by Adobe Systems inc. Since April, 2007 Flex SDK is open source, but IDE still commercial. Most recent version of flex is Flex 3 beta. Flex 2 SDK runs on Windows, Mac OS X, and Linux.
What is Flex builder? Flex builder is the IDE for Flex, which based on Eclipse IDE. In easy words Flex Builder enables developers to quickly build rich client-side logic that integrates with XML and web services. You can get a free trial version of Flex Builder 2 from Adobe. Supported OS: Windows and OSX.
Do you need Flex builder for building Flex applications? The answer is no. Though Flex builder 2 is a powerful IDE and greatly eases the development process, but you can do the job without that. But for commercial developer, who wish to live by developing Flex application, I would suggest get the Flex builder. You will need just the Flex SDK, you can code in ActionScript (MXML) in your development tool of choice.
Flex application only works if the browser is Adobe Flash Player 9 enabled (well that’s free, so nothing to worry about).
Flex applications structure: Depending upon applications complexity the structure might change but still a Flex application consist of six grand elements-
- Flex Framework- Even if you aren’t using Flex builder, this is included in open source Flex SDK. You can consider the framework as the library of all the components used/need for a Flex application.
- Data- Off course no application can be built without data (External or internal). In Flex you can use data models, external XML data sources, arrays etc. Since Flex applications do not directly connect to a database, you need to interact with data using 3rd party scripting service. For example- using PHP script to pull data from a MySQL database in XML format. Not necessarily it has to be PHP; you can use JSP, ASP, and ColdFusion etc. Believe me it’s a lot easier than it sounds, which I will discuss later part of the tutorial.
- CSS- Every Style attributes in visual components in an application from buttons to form are controlled by CSS stylesheet file linked to MXML. Though off course you can make styles defined in style blocks in an MXML file, or by setting individual style properties in the component instance itself, which is redundancy though.
- ActionScript: Flex uses ActionScript 3.0(similar to JavaScript) for giving your application’s components dynamic behaviour (for example- rollover, sliding etc.). Just like JavaScript you can code them directly into the MXML file or in a separate file and call them as a function.
- MXML: MXML is a mark-up language variant of XML, especially for building for Flex applications. Every Flex application have one or more MXML file, consider as main application file. The coding of MXML is almost similar to XML with some modifications, in some cases a lot easier.
The process is pretty straight forward. Always a Flex application is compiled into a SWF file, which runs in Flash Player (that’s why you need flush player 9.0 enable browser). When the source code is compiled into a Flex application it is converted to ActionScript classes and then combined into the SWF file along with other assets. At run time, the Flex application SWF file interacts with external libraries, services, and data sources (if your application has it). So here is what you are doing-
Design-> Compile -> Deploy the SWF.
That’s all about you need to know, to get started with Flex tutorial lessons. Suggested reading for further understanding- MXML Language Reference, Programming ActionScript 3.0.
Next lesson (Saturday-June 30) we will be discussing on how to build simple applications and what to watch out for etc.
Leave a Comment
If you would like to make a comment, please fill out the form below.-(See Privacy Policy)









[...] is the second session in the flex tutorial series. In “Flex 101: Knowing Flex“Â we just get to know Flex a bit closely. In this session we will focus on MXML basics, [...]
[...] write a great post which introcudes Flex and then follows up with some good explanations of [...]