Flex 2 is not “all or nothing”

Tweet

Ever since Macromedia announced Flex 2 and made available pre-release versions, I’ve been gritting my teeth as more and more cool news has surfaced about what Flex 2 will be capable of.

Because Macromedia Adobe will not be offering free licenses for non-commercial users of Flex 2 as it did for Flex 1, I’ve avoided recommending the technology to people despite the steady stream of exciting news that has come with the successive pre-release versions (now Beta 2).

The latest exciting tidbit — which has forced me to grudingly give the platform another look — is that Adobe has developed the Flex-AJAX bridge. The name is slightly misleading, as it’s really more of a Flex-JavaScript bridge, but it does help Adobe fend off some of the perception of AJAX as a Flex killer.

This bridge is an extension library for Flex that, when loaded, allows JavaScript code in a page to communicate with a Flex application, getting/setting property values, manipulating user interface elements, and registering JavaScript event listeners for elements inside the Flex application that would otherwise only be accessible to the ActionScript code within the application. Likewise, the bridge allows the Flex application to reach out into the containing HTML document, get/set form field values, manipulate CSS properties, and register event listeners that will allow the Flex application to respond to JavaScript events.

Where previously Flex was seen as an all-or-nothing platform for web applications, where your Flex application just filled the browser window with a Flash movie containing the user interface, the Flex-AJAX bridge lets you build hybrid applications, with smaller components that can benefit from Flex’s flexibility while the rest of the user experience can continue to be presented using HTML and CSS, with all the added compatibility and accessibility that brings.

To try out the Flex-AJAX bridge, you’ll need the most recent beta release of Flash Player 8.5. You can then check out the simple hybrid store example that Flex developer Christophe Coenraets described in a recent blog entry. The application makes use of the slider component from the Yahoo! User Interface Library to provide some JavaScript-powered controls that allow you to filter a set of results displayed in the adjacent Flex application.

A more detailed example may be found on the Adobe Labs site, which shows off the remarkably simple JavaScript code required to communicate with Flex using the bridge.

I’m still not jumping on the Flex bandwagon just yet, but if the right project came along and the investment were justified… well, you never know.

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • bonefry

    I don’t know if you guys are aware of this, but there is an open-source alternative which is very capable …

  • bonefry

    Oups, forgot to post the link: http://www.openlaszlo.org/

  • rossriley

    Yes I was going to say that as well…. OpenLaszlo will soon have the option of deploying in either Flash or DHTML/AJAX. I doubt if flex will be any more interesting.

  • baron.pampa

    though open laszlo is very cool and capable to produce reat rich internet applications it is not an option for flash development.
    It is much more ‘all or nothing’ approach than flex. I have evaluated it for an application that should have rich flash interface and found following problems with laszlo:
    1) it uses it’s own javascript implementation that compiles directly to flash bytecode. It is NOT actionscript, you can’t use any 3rd party AS libraries.
    2) you can’t use the flash vm or any actionscript features directly in a laszlo application.
    3) you can’t import swf files that contain actionscipt (well you can, but laszlo developers strongly advise against it and you can’t interface with it from your laszlo code)

    I ended up using mtasc + swfmill with a simple widget library.

    The closest open source thing to flex is the combination of swfmill, mtasc compiler, ASwing or ActionStep UI library and amfphp on the server.

  • Joe Rinehart

    Hey Kevin,

    Your statement “Because Macromedia Adobe will not be offering free licenses for non-commercial users of Flex 2″ is somewhat misleading. Adobe has stated that the command-line compiler and SDK for developing Flex 2 applications will be released free of charge to anyone who wants it. You’ll have to pay to play with the Flex Data Services server, but the cost of entry for writing a SOAP, HTTP, or ColdFusion-based Flex app is now zero as far as I understand it.

  • bonefry

    though open laszlo is very cool and capable to produce reat rich internet applications it is not an option for flash development.
    It is much more ‘all or nothing’ approach than flex. I have evaluated it for an application that should have rich flash interface and found following problems with laszlo …

    Well, because Laszlo is not dependent on the underlying Flash VM. They already announced they want to provide an AJAX alternative this year, and are thinking about providing a Microsoft’s WPF

    Well … you are right that it is not an option for Flash development, but it can replace it succesfully.

  • http://urbanyukon.com Geof Harries

    I am getting back into ColdFusion and running through Flex tutorials these days. This is because while we can be somewhat confident that AJAX and DOM scripting will catch up with the RIA capabilities already built into Flex, I believe the next few years there will be a lot of very complex apps (with video, audio, etc.) that the traditional HTML combo just can’t handle, or at least display very nicely.

    Then again, I could be wrong. But it’s worth a shot if I’m right.

  • Matt

    The Flex 2 SDK will be free. There will be a limited-use (concurrent connections limited) version of the Flex Data Services also available for free. Yes, it’s free as in beer but I think many folks will find it sufficient.

  • Mike Chambers

    Your statement “Because Macromedia Adobe will not be offering free licenses for non-commercial users of Flex 2″ is somewhat misleading. Adobe has stated that the command-line compiler and SDK for developing Flex 2 applications will be released free of charge to anyone who wants it. You’ll have to pay to play with the Flex Data Services server, but the cost of entry for writing a SOAP, HTTP, or ColdFusion-based Flex app is now zero as far as I understand it.

    Yes. That is true, the SDK which among other things includes the compiler (MXMLC) and Framework libraries will be free.

    mike chambers

    mesh@adobe.com

  • http://www.sitepoint.com/ Kevin Yank

    Adobe has stated that the command-line compiler and SDK for developing Flex 2 applications will be released free of charge to anyone who wants it. You’ll have to pay to play with the Flex Data Services server, but the cost of entry for writing a SOAP, HTTP, or ColdFusion-based Flex app is now zero as far as I understand it.

    Thanks for clarifying this! I wish Macromedia had told me this when I spoke with them last year. I can stomach paying ~$1,000 for a powerful IDE for a free platform a lot better than I can stomach paying for a license to use the platform.

  • Niklas Richardson

    Hi Kevin,

    I suggest updating your posting with the new information you have about the Flex SDK being free and also there being a free version of Flex Data Services.

    It will help give the right information to people that read your blog.

    Regards

    Niklas

    Prismix Ltd

  • MrsCarey

    FYI your RSS seems to be broken.