WIth the advent of Actionscript 3.0, Flash has taken yet another massive leap in its evolution. Even though it is still lacking a few things here and there, it undeniably bears a stronger resemblance to more “solid” OOP languages (the most compared-to being Java). Logically, it would follow that, the development standards, tools and processes associated with Java would quickly find its way in the Actionscript coder’s app-building environment. Although such tools are available, I regularly come across fellow Flash developers and companies (of all sizes) who do not implement version control, issue tracking, production tools, unit testing and other items which are not specifically geared toward making AS3 code but toward assisting the general process, standards, quality and flow.
AS3.0 has been around for roughly two and a half years (as at the date of this writing) There is a wide variety of tools to choose from that have proven their worth. We have no excuse.
I’ll just mention a few below.
Version Control
An absolute necessity for me. These tools help to easily revert to a previous version of a fileĀ whether the client requested it, or we screwed up the most recent version. It acts as a backup system and allows you to play on your local system without the worry of stepping on toes. It improves our communication an interaction with other developers by preventing overwrites and providing details on changes among other things.
A few version control options:
Subversion (SVN). If you’re more of a visual person, Tortoise SVN provides a visual interface to execute SVN commands and it integrates well with windows explorer.
CVS
GIT Warning: GIT isn’t as pretty as the other options. n00bs beware.
Read more about version control systems.
Bug Tracking Systems
An absolute necessity for any team who’s aim is to provide high quality products that meticulously follow specifications as detailed by the client or creative leads (or the slew of random account managers and designers who somehow end up giving us direction and requirements). A bug tracking system helps tracks errors, bugs, new and changed requirements and typically provides a framework for managing the quality control process with attention to accountability (assigning responsibilities to a team/individual) and good ol’ record keeping.
Bugzilla
JIRA
TRAC
Read more about bug-tracking systems
Also, check out mantis. The above article does not mention it.
IDE
Your choice of IDE can have tremendous effects on your productivity. Features such as code completion, live error highlighting, debugging, documentation tools, and auto-formatting make coding a pleasurable experience. It’s like comparing Notepad to Dreamweaver, for the web devs among us, and If you’ve used the .NET IDE, you already know what I’m talking about. I won’t go into all the potential benefits here but check out the following options.
Eclipse I recommend the FDT plugin but other plugins are available.
Flash Develop
SEPY
Debugging and Logging
No more trace statements!
Xray is easy to get up and running and has an interface that makes it easy to navigate through your swf variables.
Xray
Unit Testing
If you want testers to stop coming back to you because the change you made yesterday broke code you made 2 weeks ago, start unit testing. Do it now… or else the bunny dies. This isn’t a big factor in smaller projects but really helps in large ones.
The whole idea behind testing is as follows:
- Develop tests for success and develop tests for failure for each requirement that your code must include.
- Make sure all tests work as intended.
- Move on to the next requirement.
- Repeat the process.
As long as you run previous tests after code is changed due to refactoring or new additions to application functionality, you will catch regressions instantly. This process of developing your tests before actually coding also helps clear up any inconsistencies between functional specs and what the code actually does. Here is a good quickstart guide on unit testing.
ASUnit A simple framework for creating automated units
FlexUnit Ditto, for Flex
Production and build tools
Sometimes, publishing a file is enough for a functioning app; sometimes not.
Let’s take, for example, an LMS system with thousands of files and folders, whose production folder structure is different from its deploy folder structure.
- Version control would need to be updated as designers may have changed assets.
- Files would need to be copied into different locations, maybe zipped as per LMS standards.
- Text and XML files may need to be edited
- The full package would need to be FTP’d to a deployment server and
- QA may need a reminder that a new build is has been deployed.
Well, no way am I doing that manually and there are tons of scripting languages out there that can be used to automate such tasks.
In the case described above, I used PHP and/or the command line to automate each of the steps above. I also created an html interface, so that I can execute my script at the click of a button AND later provide a full fledged html driven admin tool for other automated functions (such as preparing new folders for production and executing JSFL commands (See below for more on JSFL).
The result: Deployment became a standard process, scores of hours were saved and hundreds more would be saved in the future. I didn’t have to lose valuable days on tasks unrelated to code, development hours spent on the project magically declined and most importantly, anyone could create a deploy package without bugging me!
There is more to Flash app development than just Flash. The idea is to start thinking about ways to solve problems by using and integrating various tools and the more you know, the more solutions are possible. This is one advantage a “Hack of all trades” has over a specialist… but that’s another story.
PHP (or other scripting languages) and the command-line (Don’t judge me PHP guys, It’s locked down)
Ant and MTASC and the command line.
JSFL
Create, augment and automate Flash’s functionality with JSFL. JSFL uses javascript syntax that looks alot like actionscript so the learning curve isn’t too steep. You can create new drawing tools, panels, and automated scripts to get tasks done faster.
See the JSFL reference on Adobe livedocs
A few apps, tutorials and discussions on JSFL:
http://www.devx.com/webdev/Article/20821
http://www.actionscript.org/forums/archive/index.php3/f-37.html
http://tush.wordpress.com/2006/03/16/batch-publish-command-for-flash/
http://www.ultrashock.com/forums/actionscript/jsfl-organizing-library-items-114650.html
http://www.adobe.com/devnet/flash/articles/invisible_button.html
Stay tuned for some jsfl samples.
Documentation tools
Documentation and commenting standards seems to be anything but standard.
Most IDEs provide support for documentation generation similar to Javadoc for Java. That means that we can create full API/class documentation at the click of a button by just following a few simple rules and conventions when we actually create and document our classes.
A look at these documentation standards should get you on your way to great documentation.
Tool hungry?
Head on over to OSFlash. THE premier location for Flash and ActionsScript tools.
Summing up
I initially started this post with the intention of discussing the lack of understanding, respect, proccess and general order that seems to plague the agency environment but it somehow turned into a discussion about tools and apps which improve our own proccess, as programmers. I guess if we want the place we work to be well organized, forward thinking and professional, we, ourselves must begin with a well organized, forward thinking, professional development department. Don’t look at me… Ghandi said it.
Tags: flash, agency, antipattern, Tools, jsfl, subversion, svn, cvs, git, version control, bug tracking, bugzilla, Jira, TRAC, mantis, IDE, Actionscript, as3, java, production tools, production, mtasc, apache ant, ant, command line deployment, eclipse, sepy, flash develop, FDT, documantation, debugging, logging, Xray, unit testing, qa, testing, automated testing, ASUnit, FlexUnit, php, automation, best practices, development tools, development, AS2
November 17, 2008 at 11:11 am
Don’t forget lots of coffee, smoke breaks and educating agency management on the process of software development, cause we all know that having the right tools in place is crucial, but management has to be on board as well. All PMs should read this http://www.bitchwhocodes.com/fitc2008/preso.pdf
November 17, 2008 at 12:37 pm
Don’t worry, that’s coming
Trust me, it’s coming, but remember that we are the first and most effective people who can make our own lives easier. Stay tuned.