Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Dependency Graphs

The diagrams provided are dependency graphs - not inheritance graphs. They show the relationship between modules, based upon what imports what. By doing so, they expose a number of useful attributes:

  • they provide an overview of the internal library structure, and indicate how modules are related within any given area of functionality.
  • they identify high-level versus low-level modules. High-level modules are usually toward the top of the diagram, whereas low-level are usually toward the bottom. Implementation modules are rendered in green, whilst interfaces are rendered in yellow.
  • shows there are zero instances of circular imports. This is important for a number of reasons - one of them being that the -cov option of the compiler is fully supported by all of Tango. Note that circular imports would show up as red nodes.
  • they identify hotspots within the library - those modules used frequently. HotSpots are identified by a larger number of terminating edges (arrows). A familiarity with hotspot modules will tend to open up the library very quickly.

  • the diagram nodes (modules) are clickable, and thus act as a convenient means of navigating related API documentation.
  • they clearly illustrate the nature of coupling (and decoupling) within the library.

What the graphs do not show:

  • they do not show class inheritance - although if one module does not import another, then it will not inherit from it (by convention).
  • These diagrams identify all imports, regardless of whether they are private or not. Thus, they don't convey a sense of private versus public. Tango typically makes all imports private, except for those declaring ctor arguments - we do this to minimize namespace pollution. However, the tradeoff is often more imports overall than perhaps otherwise. This tends to make some of the larger graphs appear busier (more edges) than they might otherwise be.

To illustrate, here are the diagrams for the File module, a logging example, and an HTTP client. Click on each of the module names for further detail.