Tags: air flex

Getting started with Flex - what you should know.

Okay, so like me you've done a lot of web development with scripting languages ala Ruby, PHP, Perl etc and you've decided to try out Flex for a front end. What do you need to know ? This is just my own humble opinion - take it with a grain of salt, but for those looking to jump in you should find something valuable. This is all encompassed with the caveat that you are using the right tool for the right job, now what ? We know the advantages of using Flex - I'm not going to reiterate them. What I am going to tell you is the things to be aware of - not critiscims. Be prepared to invest time. Considering I had a working app with rails in one all night code marathon, I feel that I've only just waded in with Flex - granted this is apples to oranges comparison - however of everything I've jumped into, Flex is the one that takes the most time - mainly because it is developing interfaces, not yet another scripting language/framework stack. Beyond the basics you will spend a lot of time figuring out the nuances of what you need to do to get something working. You will have moments of happiness, and moments of wanting to heft your computer off a cliff.... Flex is not flash. Flex is a very real grown up interface language / architecture. Sure Flex is rendered via the Flash Player, and gets compiled down to a SWF but thats where the similarities start and end. [As a side note, I personally can't help but wonder if they just rebranded the flash player etc whether that would help Flex adoption...] Flex requires compilation of the runtime swfs. No biggie, but if you happen to be in Mac land on a Dual Core G5 (or worse) machine you might want to talk to your tech department about an upgrade. Compared to pure web scripting it can put a dent in your workflow, code-compile-refresh vs the time honoured code-refresh. If you're not going to break out the cash for Flex Builder lookup the Flex Compiler Shell (FCSH) on adobe labs. This dramatically cuts compilation time. Break out your OO skills. You're going to need them.. Actionscript 3 is strongly typed. If you've come from a dynamically typed background ala Ruby, this can hinder you - you have to consistently be aware of the types of objects your dealing with and what they can/can't do. Time and experience will render this issue obsolete. Event based programming - say hello to your new friend dispatchEvent. Everything is event based, and a solid part of learning flex, is realising when and where to send events and listen to events. You have to change your mindset to look at every possible combination of things the user can do in your app. Learn how to get events into your custom components and use them wisely. Learn how to use the Flex Builder Debugger. This is exceedingly powerful and useful for figuring out why your apps aren't doing what you expected them to do. Adobe can expect my money when they release Moxie for this feature alone. Code Completion. Again another life saving feature of Flex Builder is the code completion / inspector. An advantage of the strong typing this helps in your coding by seeing the correct properties/methods on objects - which in turn saves a lot of time referring back to the livedocs. More than one way to a skin a cat. For everything you try to achieve there normally multiple of ways of doing so. Keep persevering and find the one that works and is most suitable for the problem at hand.  You're not on your own - Adobe developer support is fantastic. Case in point the giant wall posters that I scored from Adobe for free - great for me but scary for the general populous walking into my office. You can see that Adobe want this to succeed and they're doing all they can to do so. A free SDK, good documentation, free PDF book downloads (for AIR), onAIR tour events, videos.onflex.org, open sourcing... you name it they're trying to do it - which gives me the warm fuzzies about investing my time in this technology. Above all, keep persisting it all pays off ! You can produce beautiful works of interface-art, that work as you expect them to, consistently and repeatedly. Pixel perfect and cross platform, beyond any interactivity possible with AJAX (unless you're a sadomasochist)
blog comments powered by Disqus
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.