Flex 4 Explained – Spark Architecture’s Internals – Deepa Subramaniam’s Talk at Adobe Summit 2010

This is a summary of Deepa Subramaniam‘s talk about Flex 4 at the Adobe Flash Platform Summit 2010

What is Flex 4?
It’s the latest release of the Flex programming language released by Adobe.

Hey wait a sec, What is Flex , first?
It is a markup programming language. With this language, you can create visually stunning User Interfaces for your web application. These user interfaces will run in the flash player of the browser. The programs you write with Flex are in XML and contain little bit of ActionScript.

An XML file can create a User Interface! Awesome.
If its XML, then Does it have a syntax?
The XML part of the code doesn’t have a syntax per se,but it does have a structure. That is your XML tags will need to be in a certain order for your button to load in front of your background. Otherwise the background will load on top of the button and you can spend the rest of your life figuring out how to use such an application. So essentially, it has a certain format in which the xml files are to be written and there is a tag enclosed area within which all the actionscript code sits

How does it work?
You write your Flex code and run it through the Flex compiler. The compiler will generate a SWF flash player file and an HTML file which you can then run in a browser.

Does it have an IDE?
Yes it does. Adobe has developed its own IDE for  Flex. The latest IDE for Flex is called Flash Builder. It is based on Eclipse IDE.

How much does it cost?
The  Flex compiler and the SDK is for FREE. Yes. It is open source. But the IDE is not. You have to pay $699 to get the IDE.

So whats so special about Flex 4?
All components in Flex 4 are sum of two things – 1) The behaviour, logic and the data holders of the component coded in an ActionScript class + 2) the graphics,layout,animation,states and constituent parts(in case of a complex component) in MXML. The Adobe guys have named these sort of components as Spark components.

So you clearly know what to edit where in case you need a change in any of the above mentioned aspects ( behaviour, logic,graphics,layout,animation,states,etc)

What is MXML?
It is xml-based user interface markup language first introduced by Macromedia.

This sounds very logical, but werent the components modeled like this in the previous edition of Flex?
Well, no.  Flex 3 components were sort of monolithically modeled – Every component had  behaviour, logic,graphics,layout,animation,states all coded in an ActionScript class and there were MXML tags attached to them. And a few of the properties mentioned here were exposed as attributes of the MXML tags.  So a developer could manipulate the values for these attributes. If he wanted more, he would have to wade through the entire ActionScript class.

So, what else is new about Flex 4?
The compiler has been improved and now works faster.
The Effects like Swipe down,etc are improved, now they are smoother than before.
The layout system has been modified, now the layouts are assigned to the component’s MXML tags as attributes.
Earlier we used to have layout specific components, like Vbox,Hbox,etc.
Compile time optimization of images – so static graphics like images which get used only one or two times are separated out, which helps in making SWF files lighter.

What do all these things translate to?
You can create such visually compelling UIs that viewers/users wont be able to guess that it’s been built on Flex.

Cool. So is there anything that Flex 4 doesn’t do?
Yes. The components kit in Flex 4 doesn’t contain datagrids, charts,Tree, and a few others. This means, this components are still there in Flex  4 but in Flex 3 style.


About vatsalad

Hi, I'm Vatsala
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Flex 4 Explained – Spark Architecture’s Internals – Deepa Subramaniam’s Talk at Adobe Summit 2010

  1. Pingback: Flex learner | Blog | Flex 4 Explained – Spark Architecture's Internals – Deepa ...

  2. Great summary of the session.

  3. Bob says:

    Thanks for the article. I was recently interested in this topic. Very interesting and informative. I wish more such articles on this portal.

Comments are closed.