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.
http://www.cmswatch.com/Trends/1492-The-case-against-Flex-based-application-UisIn 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).
************REPLY************
Tim:
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.
Specifically:
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 opensource.adobe.com. 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