bradyep.com

A Vanity Website

Thoughs on Flex

I just got done with a large project at work that had a very significant Flex component and thought I'd throw in some opinions of the platform. The first thing I'd like to toss out is that the learning curve was quite a bit more steep than I expected. I figured, "hey, I've written plenty of ActionScript code and done plenty of work with Flash, how much can there be to learn?". Turns out quite a bit. Flex attempts to reinvent the Flash player as sort of a platform for business applications, and it reinvents what we think of as the web in many ways. You can check out my first attempt to fool around with the platform here.

So now that I have a pretty good handle on the technology, I thought I'd briefly go over what I perceive to be its strengths and weaknesses.

Benefits

Good Looks

Probably the biggest advantage Flex has over HTML is that you have control over EXACTLY how everything looks, down to the last pixel. The standard components look good enough but if you are willing to put the time to do skinning you can make anything look just about as good as you imagine (or how good you are with Adobe's vector tools). Furthermore, everyone that accesses your work is going to see it appear EXACTLY the same way! This was a huge problem with web work during the bad old days of Internet Explorer 6, and although it is less of a factor today on desktops and laptops, a large amount of work often needs to be put in to make things also look good on phones and tablets.

Security

More than just control over looks, Flex allows you to lock things down to a greater extent than any other web technology can. You can stop people from selecting text, you can make it much harder for people to grab images, and you'll never have to worry about a search engine indexing something it shouldn't. This level of control goes pretty far in explaining why even in 2013 several financial and accounting institutions still rely on Flex.

Everything is in Memory

Flex runs in Flash, which is more like a self contained application then the series of requests and responses that drive the web. This means everything is always in memory. If you set a variable several minutes ago in another component, you can still gain access to it if you know how (and I'd argue that Flex makes accessing things in other components unnecessarily difficult).

Differences from HTML

This section goes over how Flex is differents from traditional web technologies (HTML, CSS, JavaScript) - most of these aspects can be taken as either a positive or negative.

Can kill off the browser "back" button

This is more an issue for developers and managers that have somewhat dated ideas of the web, but there are tons of these people that share a deep hatred of the "back button" feature found in web browsers. There are generally accepted and graceful methods of handling this "issue", but in Flex you can make this a complete non-issue by opening up your Flex app in a new window and laughing as any press of the back button does nothing at all!

Tied to a proprietary technology (Adobe Flash)

Open-source advocates may cringe at this not being in the negatives section, but there are benefits to having only one "word of God" that decrees what developers and users can and can't do with a technology. Look how long Microsoft fought against web standards and how much trouble that caused everyone for so many years. Of course the downside is the possibility of stagnation or even abandonment, which I will get into later.

Downsides

Convoluted architecture / event system

This one is up for debate, but coming from systems where there is an established design pattern (Fusebox, Asp.net MVC, Rails) you will quickly notice there is no standard, right way of doing things in Flex. I've seen many ways of doing simple things in Flex from different sources and the fact that you can do just about anything in Flex's MXML AND in ActionScript actually makes things more unwieldly than easy.

Litte access to third-party tools and plugins

Flex attempts to reinvent the web, but without the vast array of tools that have been developed over the years. JavaScript frameworks, tools and snippets outnumber similar Flex constructs many, many times over. A large issue is the shrinking Flex developer community.

Only one useful application for development

I don't even think this is up for debate, Flash Builder makes Flex development semi-sensible and it looks to have no future. Adobe gave the Flex platform to the Apache Foundation but what about the only tool that can expedite development on this platform? It seems to be dead and gone with the newest version not even supporting the quick drag-and-drop design view development that allowed Flex projects to get off the ground so quickly.

Just can't compete with the standard, existing web technologies

This is the big one, want your brilliant new Flex app to be usable by anyone with a phone or tablet? You might be in trouble. Whereas HTML5 technologies are pretty much viewable by anyone with any type of device, Flex runs on Adobe Flash which is not available on any modern phone or tablet - even the percentage of desktop and laptop browsers with it installed is shrinking. The future of Flex is simply not looking very good with Adobe seemingly tossing the entire platform aside. The one hope that it may have is Apache's claim of converting Flex to display in pure HTML5/CSS/Javascript. With the canvas element this might actually be possible. Although you would probably not be able to do much work outside the canvas, you MIGHT have that same pixel-perfect level of control over how your work is displayed. This seems like a long-shot though given the level of work that would be needed to make this a reality and how large the Apache Foundation is. But, it is at least a glimmer of hope for a platform that seems to be fading very quickly.