使用哪个 Flash/Actionscript IDE——如果应该使用一个? [英] Which Flash/Actionscript IDE to use -- if one should be used at all?

查看:25
本文介绍了使用哪个 Flash/Actionscript IDE——如果应该使用一个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I've always used the built-in IDE, but I've been gone from Flash since ActionScript 2.0 in Flash MX... I'm coming back to Flash, and I notice there's a number of IDE's (some of which cost more than the Flash upgrade). So... question for Flash/Actionscript 3 developers -- which IDE to use, if at all?

解决方案

Hands down, definitely use an IDE for ActionScript. We use (and I recommend) Flash Builder 4.

ActionScript 2
In older versions of ActionScript (like Flash MX that you're familiar with), an IDE was not as important. You could get away with most coding in the Flash Development Environment. In those days, most code was bundled with the FLA files that created the SWFs. With ActionScript 3, that changed because unlike AS2, ActionScript 3 is Object-Oriented and this makes all the difference.

ActionScript 3
Now, the best practice is to have next to zero code in Flash's FLA files. All code is now external in *.as files and broken into packages. This was not so much the case in AS2. Nowadays, 99% of the flash projects I create contain zero actionscript inside the FLA files. The exception is for occasional animation controls (like stop() or gotoAndPlay()) that sometimes don't make sense outside of the timeline. Even those, I try my hardest to pull into *.as files whenever possible. Today, code in a FLA is a sign you're probably doing something wrong.


Why Use An IDE?

Here are several reasons I believe one should use an IDE for ActionScript:

  • Debugging Possibly the #1 reason to use an IDE: stepping through the code as it's executing live
  • Stronger Variable Typing The core actionscript language doesn't require you to specify variable types, return types, etc. It can be very easy to code bugs that are difficult to track down. An IDE encourages stronger typing by highlighting code and displaying warnings when types are absent
  • Stronger Error Checking The core language also quietly ignores serious errors. Using only the code editor in Flash MX has generated some painful bugs for me in the past where the root cause was only a typo. The IDE as compared to the Flash Development Environment catches far more bugs at compile time so they don't ever make it into production
  • Code Completion Code completion is so valuable, I wish I could use an IDE just for this StackOverflow post! I type 50X faster in an IDE because I'm constantly using word completion and expanding macros and templates
  • Boiler Plate Code IDE's are great for doing all the crap you don't want to do like generating getters/setters for a field, comments, skeleton classes, etc.
  • API References When you type a method, an IDE will show you the signature of that method so you rarely have to consult online documentation to remember all the properties and methods of a particular class
  • Plugins Integration with Subversion is absolutely essential to our development process. IDEs manage this process for you with the help of plugins. Most essential processes (like unit testing) are supported by IDE extensions that make life easier.
  • Refactoring Most IDEs have built in, powerful refactoring tools which allow you to change your code easily and correctly
  • Project-Level Code Management an IDE lets you manage your code from the project level making it much easier to manage dependencies, link libraries, images, assets, css, source code from other projects and more. It also helps with managing annoying settings and preferences that are easy to forget like compiler settings, command line arguments, runtime configurations, etc.
  • Team Work IDEs are designed to function in the team environment and since they manage your entire project, they make it much easier for multiple people to work on the same set of code. They also encourage conventions, like a project's directory structure, which helps set standards for the community
  • Comparison and Navigation Another feature I use a lot is the built in diff/history tools that let me spot differences in code as well as navigation shortcts that let me jump to where a function is declared or search all references to a function
  • Syntax Highlighting last but not least, one of the obvious IDE benefits that makes code infinitely more skim-able and manageable. I would also lump in with this other visual features like code collapsing, line numbers, icons/alerts in the margians, error/warning highlighting, etc.

That's about all I can think of off the top of my head but I'm sure there are hundreds of other reasons.


Which IDE to Use?

If you or your company has the money, Flash Builder 4. Hands down. It is the defacto IDE from Adobe and it's based on a stripped-down version of Eclipse meaning many of the thousands of useful eclipse plugins work without modification (like Subclipse) and it's cross-platform. Many examples online use Flash Builder and it's hard to go wrong developing with it. One of the less obvious essential features is it's ground-level integration with BlazeDS and Flex--two things you're certainly going to use as you get back into ActionScript.

If your job is not footing the bill, then more cost effective solutions exist. FDT is an open source solution for eclipse. It's pretty good but it lacks the robust suite of features in Flash Builder, most notably the ability to debug code that's running in the browser.

I hope all this helps in some way,

--gMale

这篇关于使用哪个 Flash/Actionscript IDE——如果应该使用一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆