Indispensable Developer Tools: NDepend Professional
Aug 21st, 2008 by AZuidhof
Let’s start off with a small disclaimer, just to keep things in the open: recently (dude! half a year ago…) I was offered a Professional license to the tool NDepend by Patrick Smacchia. Time went by, and I really wanted to give the thing a try. Had already seen some screenshots that blew me away. But as things go, time passes faster than intentions (i.e. writing a small review article). But. No longer. Here is my succinct NDepend review:
Cool interface
Flexibility and ease of use is key in NDepend. And this is absolutely necessary, as initially you will be blown away by the overwhelming amount of things to see.
See what I mean? Were this a hard-to-use interface, that would definitely scare you off, wouldn’t it? Fortunately, the developers have done a great job to prevent this, going to lengths to make everything ‘just work’ to an amount I seldom see. And – while not a complete tool-freak like Scott H -I’ve seen a lot of tools passing by. Look at the clean interface just after having created a new project:
NDepend is the number one must-have tool that should be in every developer’s toolbox (OK, maybe apart from ReSharper). It is really a pleasure to use, everything works smoothly out of the box. You can see a lot of thought was given to the flow of the application: load project/solution, press [F5], wait a couple secs, and the results appear instantly, both as an HTML report, and from right within the NDepend Viewer.
Metrics
Personally I like the Metrics window the most: it’s a zoomable graphical display of all classes/methods, with the ability to instantly check code (again, by calling Reflector). Code is shown using adjecent cubes, where size of cube is proportional to LOC. This immediately shows you where the big chunks of code live. Doubleclicking the cubes takes you straight to the code. You see which pieces of other code are used by this code and the other way around (”who uses me”, “who do I use”). Overall – after an initial warming up period – metrics is a very easy and convenient way to drill down to the deapest detail, or zoom out to get a view on your whole solution at once.
CQL
Another big thing in NDepend is the query language, called Code Query Language (CQL). Look at what the Help has to say about this
Basically, NDepend considers your code as a database and you can write some CQL statements to query and check some assertions on this database
This means you can literally write things like
SELECT ASSEMBLIES WHERE IsDirectlyUsing "BabySmash.InterceptKeys.WM_KEYDOWN"
which is generated by clicking “who is using me” somewhere in the Metrics interface.
Other good things NDepend offers:
- go to Reflector from everywhere, to review the current underlying source code
- everything can be exported to any of HTML, Excel, XML, Text, meaning you get the data in the format you want
- make a boxes-and-arrows dependency graph in one click
- you can do build comparisons, and have NDepend keep track of historical data. This way you can see how your project evolves in time
- slick ‘reset views’ when you accidentally have lost your way
- it has add-ins for both Reflector and Visual Studio, so that you can use NDepend right from within those applications
- another handy thing is the “Info panel” showing continuously updated information on the part of the code you have currently selected
- and many, many more good things that are like candy for any serious developer!
The only gripe is I was forced to do the test run on a 15” monitor. Given the abundance of information NDepend has to show, this is by far not an ideal situation.
OK, that leaves you with only one thing to do: quickly head over to the NDepend download page and learn more about your app than you ever knew!
Use NDepend yourself? Let us know your opinion in the comments!




Welcome dear visitor! I'm your host, Arjan Zuidhof. Have a look around on this opinionated linkblog, take a peek at the links, and if you like what you see, don't forget to subscribe to the feed (at the top, on your right) and receive fresh links daily in your reader.
Dutch? You might be interested in my -new!!!- link blog
[...] Indispensable Developer Tools: NDepend Professional (Arjan Zuidhof) [...]