Flex/Flash/Actionscript

There are 287,661 lines of code in the Flex 2 Framework SDK

I did a few calculations on the Flex SDK source code. By my count there are 788 files (.as or .mxml) for a total of 287,661 lines of code. Out of that, 87,216 lines are comments (about 30%).

The top 5 biggest classes are: UIComponent (8,407 lines), ListBase (7,414 lines), Container (5,056 lines), DataGrid (4,885 lines), and AxisRenderer (3,441 lines).

Why the hell did I figure this out? Well, I was preparing for my presentation about extending the Flex framework with custom components for tomorrow’s silvafug meeting, and I got curious just how much code there really was in the Flex Framework. If you’ve ever dug into the source code for the framework you know that there’s a lot there, dig deep enough and you’ll find some monster classes that must have taken a bazillion man-hours to write.

The totals above include every .as and .mxml file that is published in the SDK source. There are some classes that are intrinsic classes in the Flash Player, which were not written in Actionscript, and these are obviously not included in the count. Also not included are the Apollo component source files (in case you’re curious that’s another 9,100 lines of code).

I’ve put together an Apollo app that will scan the Flex SDK source directory and tell you these stats, along with breakdowns by class, so you can see wonderfully interesting things like how many private functions each class includes, or how many lines of whitespace are in each file. I’ll be releasing the Apollo app shortly that you can run on your own code. God knows why you’d want to. I guess this is what happens when I get curious, I make useless pieces of software. Woot woot.

Here’s a little screenshot of the Apollo app in action:
apolloapp2.jpg

Related:

  • This is a little Apollo app I whipped up so I could analyze the Flex SDK source code. It analyzes actionscript code and produces some basic stats: number of files, breakdown of lines of code (comments versus whitespace versus real code), and it counts functions and variables. Not really useful…
    Tags: code, app, flex, sdk, lines, apollo, source
  • UPDATE: Well shit, turns out that posting the source of the almost-open-source-but-not-quite-yet Flex SDK is a no-no for now. I assume once the Flex 3 SDK officially goes open source this will be OK, but for now I've been asked by Adobe to take it down. As you say master.…
    Tags: sdk, flex, source, code
  • I want to start off with a quick recap of the current status of the bug I wrote about a few days ago. The Flex 3 Panel bug that resulted in the content of a Panel overlapping the title bar of the Panel has been fixed. The fix will be…
    Tags: flex, sdk
Standard

2 thoughts on “There are 287,661 lines of code in the Flex 2 Framework SDK

  1. haha, I guess thats what happens when you go off on vacation. I’m surprised you didn’t write an app to convert these lines of code into nautical miles. 🙂

    How was the sailing?

    Cheers,
    -ewH

  2. Pingback: Interesting Stats: 788 files, 287,661 lines... « the WAY we THINK

Comments are closed.