I’m currently working on a project which has a Flex front-end talking to a ruby on rails back-end. Someone recently asked me what I thought of Flex, and my response is below. I’ve only been working with Flex for a couple of months, so it’s very possible that there are solutions to the problems listed below. If anyone knows a better way of doing it, please let me know.
Overall, I find the Flex (and ActionScript 3) world annoying and less productive than either ruby or java.
Testing is weak in AS3. FlexUnit doesn’t provide dynamic test suites (see my post on Dynamically generating FlexUnit test suite). Flex cannot create dynamic classes, so we cannot create dynamic mocks. We would like to mock out flash classes (such as DisplayObject), but instead, we are stuck with stubs and other work arounds. There is no way to run a single test, so we have to compile the whole thing and run the entire suite in the browser.
The main IDE is Adobe Flex Builder, which is based on eclipse. Flex Builder provides some nice features like syntax highlighting, autocomplete, and debugging. However, its compiler is slow and we constantly have to wait to run our code. Refactoring is limited to rename. There is no code formatter built in.
I prefer rake over ant, but FlexUnit provides a bunch of ant tasks instead of command line tools. We will probably move towards a rake/ant hybrid at some point. We were also seeing weird issues where test failures would fail the build on macs, but not on linux. The tools all seem immature.
Flex is new and sexy, and it is fun to see the output of what we make. However, whenever I switch from ruby/textmate to flex/flex builder, I groan a little. If you want to develop Flex without using an IDE, at least make sure you install the debug version of flash in your browser. That way, when things blow up, you will see stack traces. The regular version of flash will swallow all errors without any indication of what went wrong.