Overview of Flex

May 29th, 2009 by nishant.shah § 1

What is Adobe Flex ?

Adobe Flex is a software development kit released by Adobe Systems for the development and deployment of cross-platform rich Internet applications based on the Adobe Flash platform. Flex applications can be written using Adobe Flash Builder or by using the freely available Flex compiler from Adobe.

Adobe Flex takes you to the next level of web application development with the concept of Rich Internet Application(RIAs).You may have seen applications developed natively in Flash itself and realized that it offers a much more robust experience for the user where productivity is bolstered by ease of use,streamlined workflow,and real time interactivity that is impossible to accomplish in HTML itself. However developing rich applications in Flash for those who are core developers is daunting and unintuitive. The Flash development tool is geard for designers, and developing on a timeline is a strange concept. Flex removes that barrier entry by providing a programmatic way for developing these RIAs.

Flex is very prominent and familiar with professional developers. Flex is a set of products designed in an effective way based on efficient delivery of high performance.

Flex is a standard-based programming model for high performance rich internet applications. Flex application will take advantage of adobe flash player 9 and this will enable developer to extend the capabilities enables the client with richer applications in real time.

Flex is a cross-platform development framework for creating Rich Internet Applications(RIAs). A component based tool that you can use to develop apps that run using Flash player or Adobe Air. Adobe Flex Builder software is an Eclipse based IDE for developing RIAs.

Basics of Flex :

  • Runs in the Flash Player or AIR.
  • Tag based markup MXML serves as the basis for Flex Projects.
  • MXML is a custom XML namespace,looks like <mx:MyTag></mx:MyTag>.
  • Component based development : Containers / Layouts Components , UI Elements , Data Connectors.
  • ActionScript 3 can be used to add behaviors or other interactivity not covered by MXML.
  • Supports common OOP practices like MVC patterns,code behind,etc.
  • MXML components can be brought onto the canvas via the GUI similar to Dreamweaver or VisualStudio.
  • Markup can be written by hand with code assist, too. Again, similar to Dreamweaver or VisualStudio.
  • MXML components have attributes that allow for modification of appearance or behavior.
  • Components can be extended for additional capabilities or reuse via MXML or AS or a combo of both.
  • Containers control layout (Canvas, Vertical Box, Horizontal Box)
  • UI components display data, control interactivity or display states or other visual feedback (Datagrids, lists, buttons, selects menus,radio buttons, etc.).
  • Data components load or send data (Services, XML, Remoting, etc).
  • Other tags include: Script, Style, etc.
  • Tags can be nested similar to HTML/XML.

Release history :

  • Flex 1.0 – March 2004
  • Flex 1.5 – October 2004
  • Flex 2.0(Alpha) – October 2005
  • Flex 2.0 Beta 1 – February 2006
  • Flex 2.0 Beta 2 – March 2006
  • Flex 2.0 Beta 3 – May 2006
  • Flex 2.0 Final – June 28,2006
  • Flex 2.0.1 – January 5,2007
  • Flex 3.0 Beta 1 – June 11,2007
  • Flex 3.0 Beta 2 – October 1,2007
  • Flex 3.0 Beta 3 – December 12,2007
  • Flex 3.0 – February 25,2008
  • Flex 3.1 – August 15,2008
  • Flex 3.2 – November 17,2008
  • Flex 3.3 – March 4,2009

What is Flex Builder ?

Macromedia recently released Flex Builder (formerly known as “Brady”), an IDE based on Macromedia Dreamweaver MX 2004. Bundled with the Flex application server, Flex Builder provides a WYSIWYG environment for creating Flex applications, an integrated debugger, and code hinting for ActionScript and MXML (plus all of the features supported by Dreamweaver).

The IDE still shows some rough edges. For example, clicking “Help” in the “Manage Sites” dialog launches “Using Dreamweaver,” not “Using Flex Builder.” So, if you get stuck in the middle of defining a new Flex site, you won’t have access to Flex Builder’s excellent support documents. In test instances, opening any “On Demand” video tutorials launched Mozilla-even though it wasn’t set as the default browser.

Perhaps the best way to get a sense of the productivity benefits of Flex Builder is to compare it to Macromedia’s other Flash IDE, Macromedia Flash MX 2004 Professional. Both IDEs support a component called “Accordion” that provides a compact interface widget for showing and hiding information. A Flash developer can drag the Accordion component to the stage, but to populate it with data must use the ActionScript Accordion.createChild() method to instantiate a UIObject or link an existing symbol. It’s not rocket science, but it is time consuming. A developer working with Flex Builder, on the other hand, can simply drag an Accordion container to the stage and populate it with drag-and-drop controls such as form widgets or images. The difference in productivity is an order of magnitude. Think of Flex Builder as Visual Studio.NET Light for Flash.

Advantages of Flex :

  • Flex applications can be intuitive, easy to use, and almost have the feel of the desktop.

  • Easy to program and deploy.

  • Can be deployed right now on 50% or more of the world’s browsers, with ubiquity increasing daily.

  • Dedicated IDE based on Dreamweaver available now.

  • Doesn’t require a large client installation like the .NET runtime.

  • Extensive Visual component library.

  • Powerful coding tools.

  • Scalable and reliable solution.

  • Superb Flex programming model.

  • Easy Integration into a server application.

  • High performance data synchronization engine.

  • Interactivity due to video, audio, streaming and messaging components.

Disadvantages of Flex :

  • Macromedia has poor track record with servers and server tools.

  • Expensive.

  • No free developer download.

Examples :

  • To get record from DataGrid from particular row and column :

    • var SelectedData:String = DataGrid.dataProvider[event.rowIndex][DataGrid.columns[event.columnIndex].dataField];
  • To create Custome Menu on right click :

    • private var cm:ContextMenu = new ContextMenu();

      cm.hideBuiltInItems();

      var newMenu:ContextMenuItem =

        new ContextMenuItem(“View Item”,true);

      newMenu.addEventListener(ContextMenuEvent.Menu_ITEM_SELECT,

      doMenuFunction);

      cm.customItems.push(newMenu);

    • private function doMenuFunction():void

      {

        Alert.show(event.currentTarget.caption.toString());

      }

      It Shows Selected Menu Item.

Tagged: , , , ,

§ One Response to “Overview of Flex”

What's this?

You are currently reading Overview of Flex at Digicorp.

meta

Share