« June 2006 | Main | August 2006 »
July 27, 2006
The Plan for ASDoc on Labs
Update: Flex now includes ASDoc. The documentation is here.We're hoping to release ASDoc, the Flex and AS3 documentation tool, to labs within the next month. As Matt Chotin already let the cat out of the bag on flexcoders, I figured I could get away with a post on this not-guaranteed-but-that's-what-we're-planning release.
ASDoc is the tool that was used to create the language reference. Current output from this tool looks very similar to the language reference. I'll give a little idea in this post on how the tools is used, but you'll have to wait until an actual release of the tool to get the full details.
The HTML files are created by entering a list of classes, sources or namespaces, as well as additional parameters for controlling the look of the output.
Creating comments in code follow the conventions shown in the Flex source. Here's an example of documenting a function:
/** * This is the typical format of a simple multiline (single paragraph) main description * for the myFunction function, which is declared in the ActionScript code below. * Note the leading asterisks and single white space following each asterisk. * * @param param1 Param1 description. * @param param2 Param2 description. * @return Return value described here. */ public function myFunction(param1:String, param2:Number):Boolean
Comments can be added to public class definitions, public function definitions (including getters and setters), public class-level variables, Event metadata, Style metadata, and Effect metadata. All other comments are ignored. There's a lot of tags, like @param and @return, that can be used to provide meta information to ASDoc. Some of the most popular are @author, @default, @private (no parameters, to hide a function/var/class), @see, @throws (two parameters, name and description).
This is the project for labs that I mentioned a few posts ago that I am working on. It's coming along well, with the integration into the core of the Flex compiler being surprisingly simple but with lots of time being spent on making the details work right.
Update: ASDoc is now out. See here for details
Posted by Brian at 10:27 AMJuly 24, 2006
Incremental Compilation from the Command-line
A not-well-known but powerful feature of the command-line compiler is the "incremental" parameter. You should add this parameter to any command-line compilation that you call frequently. Flex Builder uses a version of this feature to speed up its compiling. It's also similar to the FastMxmlc idea that I posted about for Flex 1.5, except that this one is built-in and faster.
You can read the documentation for this parameter here.
As a related aside, if you're trying to find the Java class names for mxmlc and compc, they're flex2.tools.Compiler and flex2.tools.Compc.
July 3, 2006
Updated performance tests for Flex and Flash Player 9
I saw a question about performance tests today, and so I looked around a found a nice set of performance tests by Mike Lyda. Performance numbers comparing Javascript and Flash Player 7/8/8.5 can be found here.
Curious to see the latest numbers, I updated the MXML tests for the latest version of Flex and Flash Player 9. You can get the updated source and SWFs here.
I'll leave the posting of a complete set of performance numbers for someone else. A few of my impressions:
Based on the relative speed of the Javascript tests, all but one (test 8) of the tests run faster than the Flash Player 8.5 (the beta for Player 9) numbers posted in October 2005.
Initial string concating is much faster than in the 8.5 numbers. (Alternatively, string interning doesn't give as much improvement.) The first half of test 3 and 4 are only twice as slow as the second half.
The harmonic, substring, and empty-for-loop tests (5, 6, 9) are blazingly fast now. 5ms, 10ms, and 60ms on my machine.
Lastly, I'll describe the changes made to the tests. The namespace in each MXML page was updated. Types were added to all variables, which should make the tests faster and clear up the warnings. Other simple warnings were cleared. The MD5 source was downloaded from the suggested site and quickly converted to AS3.
Update: The source and SWFs have been updated with a working test 10 from Mike. I've also updated the tests to clean up the MXML and remove the many warnings from MD5.as. Mike has also told me that he plans to update his page with the new results, and I'll update this page with a link when that happens.
Update 2: Mike has updated the numbers.
Update 3: Mike has updated the chart again, showing Java applets as well as the numbers for the latest version of Flash.


