Visualizing dependencies in the android framework

overall structure A small experiment to visualize dependencies between classes in the android framework. This effort generated some some neat pictures, and was a chance to play with svg.

All the classes within the android.jar file in the android-19 sdk are arranged in a circle and linked by a curved red line to the classes that use them. The size of the code in each class is indicated by a radial gray line. basic screenshot

Click on the image above to view the generated svg file. The file is pretty large, but you can then hover over the lines to see the associated class, or zoom your browser into specific portions of the circle.

Classes are sorted by their fully qualified name, so classes within the same package are adjacent to each other. You may notice clusters of tiny arcs, which represent clasess used within their own package. android.provider.BaseColumns is a typical example, it is primarily used within its own package. android.provider.BaseColumns

By contrast, some classes like android.os.Parcelable are used quite extensively everywhere in the framework. android.os.Parcelable

Some classes have a relatively enormous code size. android.view.View is one such class - in fact the code is large enough that it extends outside the limits of the drawing. android.view.View

The code to generate the svg is pretty rudimentary, just good enough to get the job done. I've put it up at this gist in case you feel like playing with it as well.

If you've made it so far, here's a very large (10000x10000) jpg image that displays each class so you can get a global, though static view of the dependencies. This even larger png version might be suitable to print up as a poster.