Ramp Up in a New Code Base

A usual task for a developer is to discover a new code base to start working on it. The best way to ramp up in a new codebase is to understand the dependencies between its modules and then follow critical paths.

NDepend offers the most powerful code structure visualization tools available in the software industry. When the code is well visualized it can be understood, explained and mastered at a deeper level than ever before.

Dependency Graph

No matter how large and complex is your code base, the NDepend dependency graph will help visualize it and understand it.

The NDepend Default Application Map with around 1.000 elements

The NDepend dependency graph proposes various tools to navigate and understand your code. To quickly understand the interactions in a complex set of classes, files and directories can be drag and dropped from the Visual Studio Solution Explorer to the graph:

The larger the code base the more difficult it is to understand it. This is why the NDepend graph is optimized. For example it handles live all the complexity of the 15,000+ classes of the .NET base class library.

Call Hierarchy Diagram

To follow the critical paths and easily call hierarchy diagram can obtained with a single click:

This 6 minutes video below presents a tour of scenarios that can be handled with the NDepend dependency graph.

Dependency Matrix

NDepend also proposes a Dependency Matrix to visualize and understand code. In most scenarios the dependency graph is more intuitive and more informative than the matrix but there are some situations that are better handled by the matrix.

For example in the NDepend OSS Power Tools documentation it is valuable to visualize which power tool uses which NDepend API type. The best way to present this architecture information is the dependency matrix:

  • Rows are classes, interfaces and enumerations of the NDepend API consumed.
  • Columns are namespaces: each namespace is a power tool.
  • Numbers in cells represent the number of members of the row type used by the column namespace. If a cell number is 0 it means that only the type is used. Examples of such situation (a type used without using its members) are IList<APIType> or typeof(APIType) usages.
Power Tools Usage of NDepend.API Classes, Interfaces and Enumerations

You can watch this 5 minutes video to get started with the NDepend dependency matrix:

Case Study: Exploring the Clean Architecture of an ASP.NET Core solution

This blog post Clean Architecture for ASP.NET Core Solution: A Case Study relies on various NDepend features (graph, matrix, metrics, rules...) to present and validate the clean architecture of an ASP.NET Core application.