Current location: Brighton, UK

Fun with Flex2

Posted on Tuesday, June 06, 2006 @ 17:30 CET

Flex

Last week I finally had the time to play with Flex 2, after having Flex Builder Beta3 installed for a few weeks now. After going through the first few chapters in the documentation and playing with the tutorials I'm really excited. There are some great things here. More specifically:

  • Being able to use proper CSS to style the visual elements
  • Data binding is super simple - this has been an annoyance of mine with AS2. Doing this programatically has always been a pain
  • View States. Being able to change the appearance of the application is now really easy
  • Transitions. I love using Fuse with Flash, but Transitions seem pretty cool. Especially being able to group multiple transitions in <mx:Parallel> or <mx:Sequence> tags to define whether to perform all the transitions at once, or one after the other and managing callbacks with the effectEnd property.
  • URL headers
  • Events everywhere
  • The IDE itself. Based on Eclipse, this IDE feels solid. Adding containers and controls to the stage in design-view via drag-and-drop reminds me of VisualBasic and Expression Interactive Designer, but the IDE isn't over-done graphically (Expression gives me a headache and is slooow, granted my video card sucks). The code-view is great, combining great IntelliSense and code-hinting in both MXML and ActionScript modes.
  • View Source. Back in the day when I was picking up HTML/CSS/JavaScript one of the great features is always being able to view the source of others' work to pickup tips and tricks here and there. This is possible to do in Flash, but is built-in to the IDE allowing you to publish the source along with your app if you wish to do so.

I wish I could take a week off work and just dive into this, but sadly thats not an option. In any case, playing with the tutorials has gotten the juices flowing.

A couple months ago Expression, which is similar to Flex (xml-based layout XAML instead of MXML, C# for code instead of AS3), peaked my interest but there were a few too many drawbacks for my liking. But...

  1. First off was the over-done (IMO) and slow as hell (on my machine) GUI. Granted, it was written in Expression so high marks for eating their own dog-food, but that in itself doesn't make it great.
  2. Second was the WinFX runtime. Yes it uses DirectX which is great for 3-D, video, etc but so far its only available for Windows. Its supposed to be ported over to MacOS and Linux eventually. However, where is the .NET framework for these platforms? Mono is great, but its not feature-complete.
  3. Third is again the WinFX runtime. Suppose it gets ported to other platforms, I've only gotten it to work on Windows XP with Internet Explorer. That alone is a show-stopper. I should be able to use it with my browser of choice

So basically, the fact that with Flex I can continue to write ActionScript (with all the advantages of AS3 over AS2, such as speed and strictness) in addition to being able to plug-in Flash-built SWFs when needed makes this the next logical step. Im already psyched to rebuild some old projects in Flex and dive head first into AS3.

As Phil Heinz has written:

Flash programmers now have their own tool that separates the programming from the design. This is paramount for those of you who, like me, can't design their way out of a paper bag. A tool that has no timelines! A tool that produces SWFs with ActionScript 3.0. SWF files that run many times faster than ActionScript 2.0 in the new Flash Player 9. A tool that saves you so much time developing applications that it's (almost!) embarrassing.

- paulo

Post a comment:

You must have Flash and JavaScript enabled to post a comment.