The Woes of Flex

I've been working on a big Flex project for a while now, and boy is it a pain. I have to give Adobe credit for making straightforward quite simple (linked DataGrids with drag'n'drop selection is a snap), but once you get past the basics of the framework, it gets cumbersome quickly. Flex 3 (now that it's public – though still beta) promises to alleviate a number of the nagging problems, but from what I've experienced over the past few months, HTML-based UIs are faster to develop, are easier to maintain, and enormously easier to control the presentation of.

In particular, styling a Flex app is a joke. CSS stands for Cascading StyleSheets, but Flex has no cascade. You can't do contextual selectors. You can't have multiple class selectors on an element. And you can't even use existing CSS tooling, because all the style names are different (e.g. fontFamily instead of font-family). Very frustrating. Visit this website for more details.

Flash does provide some nice things, like automated history management, and very straightforward use of view stacks (to use the Flex term). Not having to think about plumbing those is definitely nice, as they're cumbersome to get right. But by the time I got to wishing that AxisRenderer actually had a decent API for extending it's behaviour (instead of a pile of private helper methods), or DataGrid supported 'colspan' (which it does in Flex 3 via AdvancedDataGrid), etc., the benefits are a bit overshadowed. And that's even before considering the fact that a huge amount of base plumbing for HTML-based apps is available from various toolkits (just as it is for Flex).

Hopefully we can get things squared away to use Flex 3 for the project, as that'll ease a lot of headaches. Because I don't know how much more suffering I can take.

8 responses to “The Woes of Flex”

  1. Matt

    Hi,

    Definitely file the issues that you find frustrating at http://bugs.adobe.com/flex. Maybe there are things we can do about them. Styling is definitely something we would like to improve, though as you know from Flex 3 we haven't changed the model that much in this release.

    Matt
    Adobe

  2. jnorm

    I wonder if the lack of cascading isn't somewhat intentional. I have heard Ajax developers saying "love the styles/ hate the cascade".

  3. Gonzo Bork

    Well, the grass is always greener…. Have you actually used any of the javacript toolkits like Backbase, SmartClient, Dojo Widgets, or ExtJs?

    With these, you get a whole new set of problems to solve. Don't give up on Flex.

  4. Ben

    You should be happy. You can use font-family. :)

    I agree with what you say, the Flex framework can get annoying pretty fast if your application requirements do not fit exactly to the framework.

  5. Jake Munson

    GASP! Somebody said something bad about Flex!!

    Seriously, I have never heard anything but glowing reviews from all the rabid Adobe fans who think Adobe is God and can do no wrong. I'm glad to hear a down-to-earth unbiased point of view. I don't think your statements would necessarily steer me away from Flex, but at least I'd be more willing to wait for version 3.

  6. Mike Brunt

    Barney, it is always good to read your posts and comments and I wonder what will emerge out of all this evolution of web apps? There is no doubt that we need more functionality than HTML can provide and there is not that much choice yet; Ajax and Flex.

    Flex can be awkward to use in comparison to HTML but done well the end user experience is usually worth any difficulties in coding. Let's see what Flex 3 evolves into.

  7. cifey

    Spent quite a few hours debugging somebodies implementation of the colspa n in flex2. Not sure it's really possible to use cell padding and get the lines right. Anyway flex3 here we come. I prefer javascript except for the cross browser annoyance. So flex should be a solid upgrade in that regard if they can keep all the styling and scripting uniform.

  8. Tech Tuesday: Skinning Flex Components - Part 1: CSS | Inside the Nerdery

    [...] The Woes of Flex CSS in Flex is not real CSS at all Adobe Bug [...]