Review: Macromedia Flex and Flex Builder
Got something to say?
Share your comments on this topic with other web professionals
In: Reviews > Product Reviews
Published on September 22, 2004
The Debate: Whither Web applications?
Read any blog this fall and you’ll see that one of the most hotly contested issues is the future of applications on the Web. Most developers agree that HTML and JavaScript simply aren’t robust enough to build applications with the feel of the desktop (Gmail and Basecamp are notable exceptions). While Java programmers cling to Swing, some standards aficionados advocate Scalable Vector Graphics or XForms (formats with no widespread browser or plug-in support), and others wait for Microsoft’s Avalon, developers and designers agree: We just want something more, now.
A Solution? Macromedia Flex
Into this environment, Macromedia has introduced Flex, a presentation server that generates Flash movies from simple XML files; and Flex Builder, the accompanying integrated development environment. Flex applications are written in MXML—like any XML flavor, a tag-based language—and ActionScript, Macromedia’s variation of ECMAScript. When a visitor reaches a Web page, the Flex presentation server compiles the MXML into a Flash movie and posts the movie to the visitor’s browser.
To understand the challenge faced by Macromedia in creating Flex, take a step back and consider what makes an HTML form element so useful. Whether using Internet Explorer, Mozilla, or another browser, the visitor has an expectation that a text input field looks, feels, and behaves in a predictable way from site to site. Safari’s stubborn refusal to let designers style form buttons is the purest expression of this idea. Many Flash applications fail precisely because the designer reinvents the wheel and ignores user expectations for form widgets.
Unlike traditional Flash applications, Flex applications just feel “right” with very little effort on the part of the coder. Macromedia has obviously put a tremendous amount of work into creating components that behave like HTML form components, only better. Here’s an MXML sample that creates a simple form:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:TextInput id="src" width="100"/>
<mx:Button label="Copy" click="dest.text=src.text"/>
<mx:TextInput id="dest" width="100"/>
</mx:Application>
And here’s the form generated by the MXML:
In this sample, clicking the “Copy” button copies text from the source input (src
) to the destination input (dest
). The TextInput components respond to tabbing intuitively, and the button responds equally well to a mouse click or the space bar.
Flex’s closest direct competitor is the Laszlo presentation server. While it’s worth a look, it seems likely that a third-party server that compiles Flash movies will always be doomed to chase Macromedia for the most current set of features. What’s more, Laszlo applications tend to feel more like handcrafted Flash movies than extensions of the operating system. While this look-and-feel may be fine for small projects, it’s exactly the sort of handmade-Flash trap that Macromedia hopes to escape with Flex.
In the available Flex literature, Macromedia emphasizes Flex’s intended audience—the enterprise, and emphatically not small shops. According to Macromedia, the ideal Flex shop will have a large team of developers, already run a J2EE application server, plan a multi-year deployment, and use design patterns such as Model-View-Controller.
Flex pros and cons
Pros:
- 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
Cons:
- Macromedia has poor track record with servers and server tools
- Expensive
- No free developer download
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.
The Problem? Macromedia
With so much going for it, what’s not to like about Flex?
First, it’s not clear why Flex movies can’t simply be compiled in an IDE instead of on the server. By choosing to introduce a new server environment rather than adding to its existing tools, Macromedia requires that its customers not only learn new coding skills (MXML), but also learn new server administration skills and take on concomitant costs. According to Macromedia, future releases of Flex will tightly couple the current application core with server-centric features, including “enterprise portal integration” and “application monitoring,” but for now, Flex doesn’t appear to offer any advantage by compiling SWFs on the server instead of in an IDE.
Second, Macromedia targets Flex for multi-year deployments in shops with many developers, but Macromedia has a bad habit of subtly changing its APIs from release to release—just ask anyone who has written Dreamweaver extensions or programmed with Flash components for more than one version.
Third (and worst), Macromedia is a great tools company but has a poor track record when it comes to servers. The list of server products and server-related IDEs that have been abandoned by Macromedia is alarmingly long: Spectra, Aria, Kawa, LikeMinds, Drumbeat, ColdFusion Studio, and SiteSpring. It’s not even clear that Macromedia is aggressively promoting Flash Communication Server any more, and Flash Remoting appears to have escaped near-death with the release of Flash MX 2004.
It’s mystifying that, at a time Macromedia should be pushing Flex into as many developer hands as possible, the developer license must be purchased for $8.99 and shipped and is not available as a free download.
The experience of early adopters of Flash Generator, however, may provide some guidance to potential Flex customers. Several years ago, Macromedia released Generator, a templating engine for importing dynamic data into Flash movies—at a price of over $30,000. By the second version, Generator had dropped in price to $999 per server. Macromedia never released a third version of Generator but rolled the dynamic capabilities into the Flash client itself, which could be cheaply created and compiled in the Flash IDE. In Macromedia’s defense, current quarterly report claims that 40 new customers adopted Flex in the first 100 days of the product’s release, exceeding the company’s goals.
MXML, the language that drives Flex, is elegant, appealing and easy to learn, and Macromedia has beaten practical implementations of XForms, SVG, XAML and Longhorn to the punch by at least two years. Whether Macromedia can capitalize on this lead in the face of questionable pricing and a spotty server track record is an open question.
Flex currently starts at $12,000 for two CPUs. You can buy a developer’s edition for $8.99.
Got something to say?
Share your comments with other professionals (12 comments)
Related Topics: Flash, XML, Motion Graphics
Marc A. Garrett is an independent web developer and author who builds sites with ColdFusion, PHP, and C#. He publishes since1968.com and is a nice enough guy, once you get to know him.