Flex: I’m Not Crazy About It
I’m taking an interesting three-day crash course in application development using Adobe Flex. If you haven’t heard of it before, Flex is essentially Flash geared toward application development instead of animation. It uses Actionscript (AS3) in addition to a presentation language based on XML (called MXML). My impression of the technology is honestly pretty neutral at this point, I wasn’t as blown away by it as I thought I might be.
For example, when we wrote this block of code I wanted to flip out:
It almost feels like you’re learning how to write an old variant of HTML, eh? Only the ‘convention’ is to place all the attributes for tags on their own line.
At one point we got on the topic of why we shouldn’t use inline event handlers. I was tempted to put up my hand and say “to separate application logic from presentation”, but as it turns out — that wasn’t the reason. I was a bit taken aback by that; It added to the whole retro HTML vibe I got from Flex.
This was the first day of a three-day course, though. So understandably we just looked at getting the basics down and hitting the ground running. I suppose it’s comparable to learning HTML:L it’s far easier to explain the font tag than it is to delve into stylesheets. (*Twitch*)
On that note, I got very excited when I heard that you can actually use CSS to style your Flex applications instead of using extremely irritating amounts of inline styles. It’s important to realize that Flex applications end up as compiled .swf files, eh? I think the CSS support make or break this technology for me, to be quite honest.
I’m as much of a designer as I am a developer, and I couldn’t shake this feeling that a Flex application is hard to control and style from a design perspective. It definitely requires a different approach to styling.
All in all, while I’m on the fence about Flex, I think it’s a cool technology and definitely worth looking at!

Jordan said:
Interesting writeup Mr. Watts. I like how the syntax seems really close to HTML. Enjoy reading that Flex dictionary.
Ben said:
You’d think that would be appealing and familiar, right? As of this moment (day two finished) I think I really dislike MXML a lot. The code looks terrible and there have been multiple occasions where I’ve thought “okay … but what we’re doing is easier with html and css”.
One thing I specifically dislike: THE LACK OF CSS SHORTCUTS. Gah.
*{ padding: 10px 5px 5px 5px}doesn’t work. You’re forced into
global{ paddingTop: 10px; paddingRight: 15px}(and so on). The CSS syntax is just slightly different too, it looks like CSS … but instead of * for all elements, you use global. Also, if you try to put a style on an element that doesn’t support the style, it won’t compile. I love how they say “supports a subset of CSS properties” (namely — in non-short form — fontFamily, fontSize, colour, [et al]). It’s on crack.
Maybe I’m just too used to having full control over my layouts, but everything in Flex is kind of like “automatic” or absolute positioning. I don’t find it intuitive or easily predictable. Granted, I’ve only used it for two days, but I dunno. It’s just strange to me.
Eric said:
Your opinion is basically “neutral” on everything.