Wednesday, May 13, 2009

Getting Started with Flex – for Flash Developers

The good news is that you are at your brother’s home if you are coming from Flash AS 3 background. As it happens with siblings, there are many similarities as well as differences between the two. Flash started as an animation tool and grew up to RIA development. Flex on the other hand has born with the objective of providing an integrated environment to develop RIA with ease.

Flash developers who want to get started with Flex need to unlearn few things along with keeping few things from Flash development experience. One of the major differences between Flash and Flex is that Flex does not have the concept of timeline. It does not even give you any tool for designing a simple line. All it has is components which are called controls in Flex. There are various types of controls such as layout controls, UI controls, charting controls, data connectivity controls etc. These controls can be either visual or non-visual. The application development in Flex is done with the help of Flex provided or custom controls.

In Flex, there are two ways of developing an application, MXML or/and ActionScript 3. MXML is an xml based language developed by Macromedia before Adobe Systems acquired Macromedia. There is no official meaning for the acronym MXML, but the backronym used by some developers is “Magic eXtensible Markup Language”. MXML is primarily used to layout the application interface (which can be done in Design View of Flex builder which eventually generates MXML tags). However, MXML can also be used to write business logic or application behavior for small applications. MXML can be used in conjunction with Action Script to write complex business logic for the applications. It gives an opportunity to a person with not very strong in programming background to be able to develop RIA with ease.

Developers can create their own controls in MXML or Action Script to write the business logics or application behaviors. The output of a Flex application is SWF which is targeted to Flash Player 9 or above. Anyone coming from Flash needs to understand that Flex is an application development platform. It does not give any environment to create animations as created in Flash. However, Flex does have some effects and transitions which can be used to create cool interfaces. One can also extend and create his own effects in Flex.

Application development in Flex can be done by using free open source Flex SDK or Flex Builder 3 (Flex 3 is the latest version of Flex and the next version will be called Gumbo) Software provided by Adobe. Flex Builder can help a developer accelerate application development. If you are looking forward to develop RIA in Flex, there are many nice books available along with the resources/tutorials provided on Adobe site. Some of the books you may consider are McGraw Hill’s ‘Flex 3 A Beginners Guide’ or ‘The Essential Guide to Flex 3’ by friends of ED.

Happy Learning…

Tuesday, May 5, 2009

Can Flex be used in e-learning?

...And my first reaction to this was WHY NOT? Flex gives me many reasons to use it for developing e-learning solutions. E-learning is not just limited to page turner today. RIA has made an entry in e-learning industry as well. Well, one may argue that Flash can also be used for developing e-learning solutions with RIA at its heart. True and it has been used quite successfully until now. But Flex has certain advantages over that. The biggest reason why I would prefer Flex over Flash is that it distinguishes between a programmer and designer. They both can focus on their specialized areas while working for the common goal.

One of the most exciting features of Flex is its layout controls which give me immense flexibility and ease to create templates for an e-learning solution. Layout controls is revolutionary addition in Flash platform. While I talk in favor of Flex, I do not want to disgrace Flash. After all it’s Flash which made it possible to have a wonderful tool like Flex. Flash is an awesome tool with its own capabilities. But Flex takes over advantage when it comes to programming a solution. Actually, Flex and Flash both complement each other really well. The integration between Flex and Flash is amazing. Skinning has been made so easy with Flash being integrated so nicely with Flex. We anyways need Flash for developing animations which will further be integrated with the solution built in Flex.

Flex has some more exciting features such as transitions, effects, CSS support, enhanced XML support, wide range of UI controls, Accessibility support and many more to make it a suitable candidate for developing e-learning solutions. Even a non-programmer can also develop complex solutions by just using MXML.

In a nutshell, Flex and Flash do complement each other. These need to be used together to develop an overwhelming e-learning experience. Flex helps programmer and Flash helps designer to exhibit their capabilities and creativity while giving immense flexibility and ease.