Tuesday, June 16, 2009

Getting Started with Flex – for .Net Developers

Though I would not recommend, but if you really want to do a comparison then you can compare Flex with ASP.Net. Like ASP.Net, Flex is also used to develop Rich Internet Application. Apart from the file format and programming language, the other main difference would be that ASP.Net runs at server and can access server side resources directly but Flex works only on client side and has no access to server side resources such as databases directly. However, Flex applications can access the resources such as images, xml files without any server side scripting.

.Net developers who want to learn Flex would be at ease in one aspect that Flex has similar IDE for development (if you are using Flex Builder) as you use in Visual Studio. Just like .Net, Flex development is also comprised of using controls and programming them if required. The difference is in the programming language. You will be using action script 3 for writing business logics.

I will be repeating some of the text from my previous post ‘Getting Started with Flex – for Flash Developers’ as this is applicable to .Net developers as well. 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. Unlike ASP.Net in which the output is html, the output of a Flex application is SWF which is targeted to Flash Player 9 or above. Flex has some effects and transitions which can be used to create cool interfaces. One can also extend and create his own effects in Flex.

As I said earlier Flex applications run on client side and have no direct access to database resources or other resources which are not allowed to be accessed by client applications. However, Flex applications do have a way to connect with such type server side resources with the help of Web Services or Remote Procedure Calls. As you are coming from .Net background, you can use .Net to write Web Services and access them in Flex to provide dynamic data.

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…

No comments:

Post a Comment