nDepend Review

There comes a time in every single “real world” project when its codebase becomes hard to manage, methods become too long, classes too complex and objects tightly coupled until it’s hard to tell where a functionality starts and where it ends. This is exactly the problem that nDepend is trying to solve. By putting all needed information at your fingertips it gives back the control to the project manager, architect and/or developer.

I’ve been using nDepend on and off since it was first created as a fledgling open source project that used to create an easy to understand call graph that I’ve used to understand how my code was called and what were its dependencies.

fast forward a few years and now nDepend still shows the same wellknown graph but packs a few (read: a lot) other features as well.

Running nDepend

Running nDepend is easy – just choose a project and pressing run.

To fully utilize all of this tool capabilities you want to learn a bit more about this tool. Luckily the good people that created nDepend supply tutorials and movies that teach all there is to know about this tool.

After the initial run a brief html report is created, the report includes the good old dependency graph as well as various data about the analyzed project (number of assemblies, number of properties etc.) and in case found – a list of warnings.

The warnings are where this tool shines, it comes with a bunch of predefined constraints:

and if you need to add checks of your own – for example if you need to check that all classes have at least one non-static method, nDepend has a special query language that enables writing these custom queries called CQL, it’s easy to read and write and can be used to create new checks to make sure that a software project does not misbehave.

After browsing the report we can take a look the the main program screen. As you can see from the picture below this program needs as much screen real estate as you can give it (I had to close several windows to take this screenshot).


There’s code browser and graph and metrics and calls between assemblies and data as far as the eye can see…

Comparing Revisions

But that’s not all. During the last month I’ve been away from the internet (and work) for two weeks, I was able to use nDepend to compare the project as it was before I left to the state it was when I came back in a matter of minuets. In fact since I’ve discovered this feature I begun to use it to review the changes between Isolator released to check if the overall quality of code increased or decreased and why.


Although nDepend is not a “must have” development tool I can’t start to imagine how could a development lead or architect of a .NET enterprise application begin to understand what is going in his project without it.

Small projects would also benefit if its developers would have access to nDepend results (via build server) so they can see how each commit impacts the code.

But don’t take my word for it, download the fully featured (time limited) evaluation and see for yourself.

Labels: ,