Monday, February 02, 2009

The Case against Flex.

I saw an article written today trying to make the case against using Flex. The author seems to have mixed up coding and architecture practices with the actual Flex framework. While the article's headline seems to be promoting a campaign against Flex, I think there are some good points to note WRT coding and architectural practices. I wish to share the comment I left on the site. The original article is here.

In addition, I could have pointed out that Flex/Flash has strong accessibility on top of the points I made (Thanks to Ted Patrick for pointing this out to me).



Okay - glove thrown, challenge accepted. I will disagree. First I will voluntarily disclose to everyone that I am an Adobe employee. As a Technical Evangelist for Adobe, my job is often to work with large enterprise customers. While your arguments have some merit (bad coding styles can lead to nightmares in all programming and scripting languages), the Flex framework, combined with good coding discipline should be welcomed and not feared.


YOU: "They almost always violate web accessibility guidelines. Sure, many thin-client application interfaces are not compliant either, but at least you have the opportunity to make them compliant -- and many platforms (e.g., Plone) do so."

DN: This is an architectural decision that is in the hands of the developer. With Flex, as with any other technology, there are trade-offs. I could challenge you easily on your definition of "compliant" but will instead state that Flex has been developed in conjunction with what developers want. When you see large enterprises like SAP, Documentum and even our own LiveCycle Engineering team, moving to Flex, they have not made this decision lightly. They have fully evaluated and accepted the programming models of Flex as valid and have taken the time to lay out good architecture before coding. Can you provide specific examples of where the framework itself violates your definition of compliance rather than the coding or architectural styles? What specific "Web Accessibility Guidelines" are you referring to? Flex gives developers what they want and the power to choose their own paths.

YOU: "They create support nightmares. Things like automatic updates, license-checking, and incompatibilities with the underlying virtual machine lead to many a help-desk call. As my colleague Kas notes, with AIR instead of applets you are just replacing Sun's virtual machine with Adobe's. The potential for trouble remains."

DN: Why do you think automatic updates are "support nightmares"? They are used universally by most software vendors for convenience and ease of use. Same with automatic checking for incompatibilities. The Java platform uses the same mechanisms. I strongly challenge this statement.

YOU: "They are prone to performance problems. Flex applications are prone to the same memory leaks and CPU spikes that bedeviled applets for years. To be sure, I've seen some fat and ugly JavaScript-based interfaces too, but at least everyone can debug those openly. We've also had customers tell us that their Flex interfaces are unusually chatty on their networks."

DN: As with any technology, Flex's ease of use provides new developers an opportunity to get in over their heads. Poor coding practices notwithstanding, the Flex IDE (Flex Builder) has a Debugger, Profiler, the ability to set break points to see what is exactly happening with your code. At the risk of sounding antagonistic, I would invite you to take a few hours to do some actual coding or take a hands on course with Flex to see exactly what is possible with the IDE. CPU spikes and memory leaks are the bane of every language. If you know of any specific issues in the current Flex framework, please file a bug with via I am sure the millions of Flash and Flex Developers will vote for such a bug if you can prove a demonstrate able, repeatable issue.

YOU: "You can't easily modify them. The vendor sets a unified interface and all their customers have to live with it. That might work for a one-dimensional tool, like a Twitter client, but what about more heterogeneous, multidimensional environments?"

DN: Again, proper coding disciplines and styles will help anyone create a maintainable code base. We have multiple MVC frameworks developed (Cairngorm, Matte et al) and firmly believe this is a developer and architect choice to embrace the discipline as it is with any other language. I can create code in any programming or scripting language that is obfuscated and hard to maintain. By contrast, I can also separate concerns and keep related classes properly documented and laid out with a well defined architectural style to avoid maintenance nightmares.

To sum my arguments up, I firmly believe your arguments are valid against bad coding and bad architectural practices. My advice is that anyone building enterprise applications in Flex or even just starting out, take the time to properly document, plan and architect their applications.

Duane Nickull


  1. Thanks for posting an interesting response and challenge to this article Duane. You bring much clarity to the abstract matters.

  2. Regarding automatic updates - which do you think is less error-prone, less intrusive to the user, and more amenable to corporate desktop administrators: applications that require browser plugins and periodic updates, or web apps (HTML, DHTML, JavaScript, CSS)? I think it's pretty clear that at least in this aspect Flex, Silverlight, Flash, Java, etc all lose.

  3. @Bill

    Not sure I'd agree. HTML DHTML et al work great and in no way do I hate them but when the browser updates, developers often have to go back and check that their apps still perform as per spec. Both AJAX and CSS have had many issues WRT supporting many versions of many browsers.

    The auto update mechanism employed by Flash/Flex and AIR can be turned off so Adobe really doesn't advocate one over the other. We leave the choice to the users. Most other companies provide the choices to the end user too. It would be arrogant of anyone to say "XXX" works for all the people all the time.

  4. and I did not suggest auto updates are less error-prone. I stated "DN: Why do you think automatic updates are "support nightmares"? They are used universally by most software vendors for convenience and ease of use. Same with automatic checking for incompatibilities. The Java platform uses the same mechanisms. I strongly challenge this statement."

  5. Just to add a simple observation from practical experience. The problem with Virtual Machines comes when you have multiple applications that require it and they sometimes require different versions. Plus, many enterprises lock desktops so users can't utilize these updates.

    Don't get me wrong, I love Flex and I think it can make for a rich user experience. I agree with Toney andt think using it to make Enterprise Applications is risky and smacks of the old fat-client days.

  6. Flex/Flash has always been backwards compatible. Hence - multiple versions are not required. You only need to make the choice to upgrade if the app you are accessing requires the latest version.

    Again - the choices are in the hands of those who use the technology. There are no hard coded constraints from Adobe.


Do not spam this blog! Google and Yahoo DO NOT follow comment links for SEO. If you post an unrelated link advertising a company or service, you will be reported immediately for spam and your link deleted within 30 minutes. If you want to sponsor a post, please let us know by reaching out to duane dot nickull at gmail dot com.