Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Hybridizing Java sounds sexy but learning ActionScript ... not so much. In this two-part article, Chet Haase gets you started toward the Great Migration, with a Java developer's perspective on what's different about ActionScript 3 and its flashy, scripty syntax. In Part 1: An overview of ActionScript 3 and how its basic syntax and class behavior differs from Java's. In Part 2: An advanced look at how ActionScript handles properties, dynamic behavior, and functions. Level: Intermediate
About a year ago, I packed up my things and moved dimensions. I went from programming full-time in Java to working on the Flex team at Adobe, where I now program in ActionScript 3. I was looking forward to the change because I think that an occasional radical shakeup usually works out well, unless you're talking about babies or champagne bottles.
But I wasn't quite so sure about the language barrier.
I'm not an expert in programming languages -- at all. I'm just a graphics geek who learns enough about languages to get the job done. And I figure we can all do what we need to in any language as long as we understand the rules and constraints. But I did come to the new platform with a just a tad of supercilious Java bias, thinking "Isn't ActionScript that toy language that designers use for sprinkling code into animations in the Flash authoring tool?" I mean, any language with script in its name is obviously going to be a step down from the mighty Java. (Or, as Neil Young put it in his surreal cameo appearance at JavaOne 2008, "The Jay-va.") Right?
I was therefore pleasantly surprised to find that ActionScript 3 is actually quite a powerful language, and was syntactically similar to Java in many ways (see Figure 1). Yes, it's a scripting language with dynamic behavior and less type strictness than we have come to expect from Java. But it also has a lot of similar type behavior, object-oriented structure, and package/class/method/field organization that makes it look, well, almost Java-like.
So while I'm not a language expert (I'll keep emphasizing that, to make sure that nobody sends me questions about lambda expressions or BNF grammars or anything else I can't answer), I thought that it would be useful to take a step back from both languages and compare them from this programmer's point of view. I'll compare various aspects of the languages to see what ActionScript 3 looks like to a Java developer. In so doing, I hope to help you avoid some of the pitfalls and misconceptions I encountered in my own migration to the Flex SDK.
The goal of this article is not to depict one language as better than the other. I think that all languages have their place (I could throw in an unkind jibe here about some older or untrendy languages, but I will pretend that I am above that). Instead, I just want to examine things that are similar and different about Java and ActionScript 3, and what these characteristics contribute to how we use each language.