Saturday, January 31, 2009

2 to 3!

I was reading this blog entry on AS 2 to AS 3 migration @ WarmForestFlash blog a little earlier today and the thought has been floating in my mind for a long time. I migrated to AS 3.0 when AS 3.0 came into the world. I fought my battles and won the wars and I think it is well worth it. I've aired my opinions about the migration on various occasions too. A few of my friends still stick to AS 2.0, not because of the small learning curve, but, they are held by strict project coding platform rules setup in their companies. As I have experienced too, most of these "Coding platforms" have been developed in circa "those triple digit years". Those who have some authority on questioning higher level people have found the common answer – "The code has been developed over a lot of experience and has been tested to zero-error the current stage. We don't have the time to work on a new platform for this. Just do your work as is." I have worked on projects that had really primitive levels of coding and technology. The truth is, we can't really blame anyone for stepping backward or remaining there.

Recently, I was developing this simple widget for a client. To me, the obvious choice was using Flex 3 and AIR. After some discussions, had to realign my thoughts and use Flash and a projector application. I have used mProjector, Screenweaver and Zinc before, but, the version I had access to was very old. I had to look back a bit and hit the "Use AS 2.0" button. I began the coding and then couldn't really make much progress. My mind was shifting me to AS 3.0 – EventListeners, XML DOM models etc. In short, Resistance was futile. One of my buds had Zinc 3.0 on his machine and I smiled and delivered. "Once you have enjoyed the power of being a king, you can't really give up".

I've always loved technology and coding. I sleep well when I have written atleast 10 lines of code, especially AS (Call me NUTS! ). When I migrated from AS 1.0 to AS 2.0, it was tough. The concept of OOP was a bit hard for me, since, I didn't come from a computing background. The learning curve was really steep! AS 2.0 to AS 3.0 is a lot easier. I have told this a lot of times during my discussions – its only when you do, you learn. When you learn, you enjoy it. AS 3.0 gave me the pleasure I sought. I hit some rough patches and still hit many, but I try and overcome them. You don't really need to migrate official work to the newer. Learn as a personal thing. To those who want to migrate, here are a few tips:

  1. Get to know the new Event model. Keep the onReleases(), onPress() etc in the locker.
  2. Remove the "_" from object properties. _apha will be alpha for the record.
  3. UI components are more thrilling. Get to know them
  4. XML is also easier to parse and consume.
  5. Get used to the new Packages. Know what lies in which package.
  6. Check this page out: http://livedocs.adobe.com/flex/3/langref/migration.html

Happy learning!

No comments: