Finally, a Working AS3 Code Coverage Technique!
March 29, 2008 on 7:37 am | In Flex, Programming | 9 Comments[Since this was posted, an initial version of the coverage tool has been put up on Google Code which can be accessed here.]
I’ve been pining for an AS3 code coverage tool for so long, I feel sick. I hate not being able to know how much of my code is actually exercised by test cases, whether automated or manual. So I’ve been playing with an idea on how to get AS3 code coverage working for the last few days and, somewhat to my own amazement, it actually works! Thanks to Adobe’s release of the compiler as an open source distribution, I’ve been able to hack mxmlc to instrument each line of code, adding a call to a global function that logs the line number and the function name.
I invoke the modified compiler on my test program like this (note the additional library for coverage support)
mxmlc.exe -library-path+=../fcov/bin/fcov.swc -coverage src/CoverageTest.mxml
-output bin/CoverageTest.swf
This generates a special debug version of the SWF that calls a special function in the fcov.swc library. As you can imagine, this piggybacks on the same compiler feature which supports breakpoints. However, the debugger is not involved in any way; there’s no need to run it.
The crude trace log looks like this: [Continued…]
ItDepends: Code Dependency Analysis For Flex/AIR Applications
March 26, 2008 on 5:56 pm | In Flex, Programming | 8 CommentsI’m pleased to be able to release a new open source tool to the Flex development community today, that comes out our work at Allurent. The tool is called ItDepends and is located on Google Code. It analyzes the dependencies between classes in a Flex application, using a link report generated by the Flex compiler, and shows this information in an easy-to-use visual browser UI. ItDepends can show you what classes and packages take up the most room in your application and how they depend on each other. It can also show you what results you might achieve by removing classes or partitioning your code into modules, without having to redesign or recompile your application.
It’s written in Adobe AIR of course! I find AIR a nice, productive environment for creating UI-driven tools quickly and easily.
Here are some screen shots. Please see the ItDepends project wiki for more information, and please do download the app and try it out. The UI is kind of clunky, as this tool was kind of a quick hack, but it does get the job done.
Boston Flex Users’ Group ready to spread its wings
March 21, 2008 on 3:40 pm | In Flex, Programming | 1 CommentIt’s official: at long last, Boston now has its own Flex Users’ Group! The first meeting will be on Tuesday April 8 at 7pm at Adobe Systems’ office in Newton, MA. Peter Farland of the Flex development team will be our first speaker, talking about the new Flex Open Source SDK. Check out the Boston Flex Users Group web page for more information from here on out, about this and subsequent meetings.
I’m really pleased about this. It’s been something that badly needed to happen, given that this is one of the major nexuses (nexi?) of Flex development in the country. A bunch of us Boston types had virtually the same idea at the same time, and since then we have been laboring to bring this users group into the world. I’m excited about the potential for great conversations, new connections and novel things to learn. We’re going to have us a good time, yes we are!
360Flex Presentation Posted
February 26, 2008 on 8:16 am | In Flex, Programming | 4 CommentsThanks to everyone who just attended my presentation at 360 Flex in Atlanta this morning, “Advanced Case Study: Building the Allurent Display Architecture”. For anyone who’s interested (including attendees of my talk of course), you can download it at:
http://www.joeberkovitz.com/presentations/AllurentDisplayCaseStudy.pdf
A Single Link for MVCS Resources
February 14, 2008 on 5:33 am | In Flex, Programming | 1 CommentA few folks have pointed out that it’s difficult to track down all the resources about my MVCS approach to building Flex applications. They were right, and in response I’ve consolidated everything into a single page accessible at this URL:
http://www.joeberkovitz.com/mvcs.
I’ve also included a few addenda to MVCS reflecting more recent thoughts and practices. As more materials become available, I will add them to the above location.
Thanks to everyone who prodded me into doing the right thing!
Too many TextFields and not enough beer makes FP9 crash
January 21, 2008 on 2:54 pm | In Flex, Programming | 1 CommentI’m working on an interesting and involved project (that I can’t say very much about right now), and it uses a ton of dynamic TextField objects on the screen. I thought things were going superbly, but my app started to crash the player at odd times as the display became more complex. I wanted to tear my hair out, but said hair is kind of short-to-nonexistent and it was hard to get a good enough grip. I tried to reproduce the crash, but each time I thought I knew what was causing it and made the “fix”, it would come back.
It was right around then that I recalled David Coletta of the Buzzword team mentioning at Flex Camp Boston that the Buzzword application uses a bunch of clever techniques to avoid creating and destroying TextFields as the user types (since they use lots of them to render what appears to be a unified display of a rich-text document). Among other things, he mentioned that they pool TextField instances offscreen — while keeping them on the display list — and reuse them by bringing them back onscreen to show stuff as needed. [Continued…]
Douglas McCarroll releases AS3 visual-comparison testing library
December 28, 2007 on 12:23 pm | In Flex, Programming | 1 CommentDouglas McCarroll has just released the first public incarnation of Visual FlexUnit as a Google Code project. I’m very excited about this project, partly because I think it’s going to be super useful to some people (myself included!) and partly because Douglas did a ton of great work on it during his internship this year at Allurent and it really is his baby.
I don’t want to recapitulate the whole project description, which you can read for yourself, but… what the heck is Visual FlexUnit? [Continued…]
Entries and comments feeds.
Valid XHTML and CSS.
All content copyright (c) 2006-2007 Joseph Berkovitz. All Rights Reserved.

