apache-flexflashactionscript-3actionscript-2

What are the pros and cons of migrating an application from AS2 to AS3?


I have a client asking me "What are the pros and cons with upgrading from AS2/Flash to AS3/Flex?" He is having performance and maintainability issues with his app.

I sorta hate these questions because I just want to say "AS3/Flex is going to be faster and more maintainable," but I know I should be more specific than that. The application is close to 100,000 lines of code, poorly documented, and the UI seems to all be dynamically generated.

Obviously the migration from Flash/AS2 to Flex/AS3 will be expensive, but is it worth it to improve speed and maintainability? Does anyone know to what extent it will improve speed and maintainability? Is there anything you can't do in AS3 that you can in AS2? I would guess not. Are there really significant things you can do in AS3 that you can't in AS2?

I guess the second half of this question is how do I answer questions like these correctly when dealing with clients? Short of spending many many hours looking through the tens of thousands of lines of code, I'm not sure I can be very accurate.

Thanks!


Solution

  • Performance Since you have 100,000 lines of code, executing the code on a VM that is 10x faster (as adobe says) will definitely enhance performance. But how is the performance of the current app? if it's good enough, then you really shouldn't consider this pro.

    Maintainability and Reusability If the current code base is hard to maintain and is not reusable then it needs refactoring, not rewriting in a new language. AS3 does encourage coding practices that helps in maintainability and reusability, but that doesn't mean you and your team will follow them. It is also possible that with AS3 you will end up with a code base that is hard to maintain. It is also possible to refactor your AS2 code in a maintainable and reusable manner.

    New Technology I believe this is the only real pro here. Flex/AS3 is a new technology. It's a nice and clean one. A lot of people are strongly supporting it. Adobe is pushing everyone to switch from AS2 to AS3. It will become harder and harder to hire new AS2 developers. There will be less development tools that support AS2. And my guess you will have to make the switch sooner or later.

    So, IMO, with all the pros and cons everyone listed here, you need to let your client understand that this has to be done sooner or later if you are going to keep updating the app regularly. And I think you shouldn't rush doing that.