« How to use Flex without a server ASDT auto update, line numbers, code folding »

June 09, 2005

Flex is pimp

I've been chillin' with Flex for 2 weeks now, and I'm come to the only logical conclusion there is: Flex is pimp.

If you build RIAs and haven't looked at Flex yet, do yourself a favor and start playing with it. Here's some of the things I've noticed in the past 2 weeks:

  • It's very easy to get up to speed with Flex if you're already a Flash Developer. Once you get used to the tag based format, you can use your existing AS2 skills to hit the ground running. I've only been using Flex for 2 weeks, but because I've been developing with Flash so long I'd qualify myself as a pretty good Flex developer already. I'm not a pro with the Flex server side configuration, but I've been using Flex as a client-side compiler, so it's cool. I'll leave the server side for people who enjoy that kind of thing. By the way, my business / server side logic is all in ColdFusion, and I'm using good ol' Flash Remoting for the data transfers.
  • You'll love the components. The Flex component set is solid. The drag and drop features that come out of the box are sweet and easy to use. The charts are powerful and the effects provide some nice eye candy. Transitions help people visually in RIAs since there's no "refresh" concept, and Flex makes this simple. As a Flash Developer you're probably already an expert at these types of "RIA things". Flex lets you take your interaction design talent to the next level.
  • It's easy to integrate Flash content. Life is not just either Flash or Flex, you can successfully use both in the same project. Just loadMovie your Flash-created .swf into a Flex-created .swf, and you can do all of the stuff on the timeline that you normally would. Flex makes for a good container.
  • Shared libraries are very simple to use. I've rebuilt my shared library application architecture in a fraction of the time in Flex. In Flash it took me a long time to get it to work, required the use of some dummy "force share" movieclips, and just felt unstable overall. I cringed every time I had to add something to one of my shared libraries. In Flex, you just point your .mxml to a .sws definition and you're good to go. Solid, stable, reliable, quick, easy. There's no more _exclude.xml either - if a class is in a shared library it's excluded from the .swf automatically. This makes maintenance a lot easier (some of my exclude files were hundreds of lines long).
  • You'll drool over the layout classes. I hope I never have to write another line of layout code again. Using Flex, I don't think I ever will.
  • You can actually diff .mxml files in your source control solution. No more binary check-ins and wondering what changed if the comment in the changelog is "synching with repository."
  • Did I mention it speeds up development time and is easy to use overall?

I'm building a large Flash application at work, and I've been investigating using Flex as an alternative. It's an RIA, and I'm fully capable of completing it in Flash, but using Flex really makes a lot of sense after going through some of the motions. I can't believe I've waited this long to get into the technology.

I'm already pretty far along with the Flash app, but I've found that I can reuse about 95% of the code I've already written in the Flex conversion. Essentially, all I need to do is replace the separate .fla files, and the movieclip forms inside of them, with .mxml files. I'd say I could re-use 100% of my code, but I find that using Flex allows me to actually cut out large portions of the UI logic. Data binding makes things more readable which means less I have to write and wade through. I'll show an example of how Data Binding can improve code tomorrow.

Plus, as another bonus I can still use Eclipse to develop in. Add in a good XML plugin and you can get code hinting for .mxml files after pointing it to the schema.

Oh, and I've been talking with Jesse too much lately. We have something cool up our sleves re: Flex, which will hopefully be announced soon.

What are you waiting for? Go get the trial, and start playing. A word of warning though, once the Flex bug bites you it doesn't let go.

Comments

  • Hey Darron, what xml plugin in are you using with Eclipse? I've played around with the XMLSPY plugin and the built in Ant editor and both leave something to be desired in my opinion.

  • as soon as I saw the title, I knew you'd been hanging out with Jesse :p

  • For real.

    Just to be a di... er, I mean Devil's Advocate:

    - script tag goes 2nd == inheritance. You remember that, you can't lose. The server allows you to bypass Flash' security sandbox via registering services with it, and it gives you the default HistoryManager built into the custom returned HTML (of course, you can always write your own like Darron did).

    - PopUpManager has a bug if you deletePopUp from an event that is generated from the pop up. Use doLater(popUpInQuestion, "deletePopUp") instead.

    - true... true...

    - Shared Libraries? Hrm... well, if you say they work better than Flash's, I might just give' em a try in Flex because I gave up in Flash.

    - Damn straight. Just don't go crazy with the mx:Grid, kids.

    - No more, "Can I borrow the FLA real quick?" or "Dude, I gotta update the MovieClip..."

    - Naw, but say it again anyway... it bears repeating.

    Damn... that failed as a devil's advocate... wonder why. Anyway, yeah, I 2nd what Darron said!


  • Try using eclipse's web tools (http://www.eclipse.org/webtools/) or oXygen (http://www.oxygenxml.com/). oXygen is commercial, and I don't believe you can get the code hinting unless you buy it. There's also XMLBuddy (free and pro versions available - http://xmlbuddy.com/). I'm sure there are others as well - check http://www.eclipseplugincentral.com/Web_Links+index-req-viewlink-cid-22.html.

  • Yeah! Flex rocks and it's the perfect development model...I really love it...

    But it's a pitty that Flex's pricing model makes the product very difficult to sell in a project.

  • The only thing that keeps me from getting into flex is its pricing. I work in a moderate sized business and its just not possible to fork out that kind of money.
    Too bad, I hear all sorts of good stuff about it.

  • yeah, like a fat pimp ready to put the smack down on my monkey ass. i aint got the scrilla to see that game yet. they need to show us small shops some healthy dev-love so we san make a come up. we out here pimpin this media.

  • Does Flex really force women into prostitution, take all their money, and beat them down when they don't make enough?

    No?

    Can you name at least 4 rap songs that aren't made by 50 Cent or Eminem?

    No?

    Are you a white middle-class wannabe?

  • Crackbunny, thanks for the humor. Sorry you took the title seriously. :-D

    On your way out, don't forget to check out the urban dictionary: http://www.urbandictionary.com/define.php?term=Pimp&skip=70

Post a comment

Remember personal info?