Click here to Skip to main content
Click here to Skip to main content
Technical Blog

NDepend – final thoughts

, 7 Feb 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
Wrapping up this series summarising the information and adding some of my own thoughts.

Over the last 4 posts I’ve covered the different editions of NDepend, installing and starting off, the report and Visual NDepend and wanted to just wrap up this series summarising the information and adding some of my own thoughts.

The Product

I have to say that the fact NDepend offers a free version for individual developers is brilliant, there used to be several tools in the .Net world that did this but gradually they all seem to have become commercial and only offer time limited trial versions.

There is a small catch in that the version you download is time limited itself but there is nothing to stop you downloading the another trial edition (web page even tells you when the next free download will be available) but I can imagine this becoming a pain after a while and could lead people to looking for an alternative.

One thing that surprised me was the amount of help and documentation that is available on the NDepend website ranging from simple FAQ’s to video tutorials which will help with not only how to use NDepend but the information the NDepend provides.

The Functionality

As I mentioned in my post on the report when you first start using NDepend you are most likely to focus on the data in the report and although it contains a lot of information I still believe that the report is of most benefit in a CI situation allowing you to track the evolution of your code base.

In day to day work Visual NDepend or the Visual Studio AddIn is where I believe the most value is to be found for individual developers allowing them to identify the points to focus on.

Although you can use the stand alone application (Visual NDepend) in my opinion for most developers it is the visual studio integration that will provide the most value since you don’t have to leave the IDE to utilise the functionality.

The Code Query Language is what differentiates NDepend from other static analysis tools allowing you to understand how it identifies code that violates its rules as well as making it easy to customize existing or create new rules.

Configuration/Customization

The fact that NDepend provides a way for you to customise the rules that it runs against a code base is, I believe, one of its biggest strengths. You also get a fair amount of configuration over how it behaves and looks.

However, there is no easy way to share this customization/configuration between projects let alone other members of the team. For me this is probably the biggest failing of NDepend, yes you can manually alter each project and using source control if you add the ndproj file then when the next developer pulls/gets the code they will get the settings.

A couple of issues…

One issue is that you need to care about what NDepend is showing you about your code base. There is a lot of information it provides and with the amount of help on the website it is fairly easy to understand the various metrics that NDepend rules identify and use. Even with all this information you have to care about it, for example if you have methods with a high Cyclomatic Complexity although you may understand what it means if you don’t care then the the tool is of little use.

I feel I have to mention cost, for a larger enterprise organisation the licencing cost is unlikely to be a big issue but for smaller companies & individual developers, or hobbyists, the cost of the professional edition could be just too high.

I would also mention that I believe if you want the best results from NDepend you need everybody on your team to have it as just having it on a single machine, even if its the build machine, makes it hard to then follow up and fix violations.

Summary

As anybody who knows me will know I’m a big fan of SOLID clean code and I like to be able to use metrics to understand my code and where I may need to improve it, I find that NDepend helps me with this.

It is simple to get started with but there in lies its deceptive nature as it can not only tell you a lot about your code base but you can also learn more about various principles behind good code bases (I learnt all about the efferent & afferent coupling).

NDepend is a tool that you need to spend time with to understand what it can show you and how to get the most out of it, if you do decide to invest the time I believe it will repay you in cleaner code and increased knowledge.

Note: I was provided a copy of the professional edition to review back at the beginning of last year, this hasn’t effected what I have said about the product which hopefully you can see in this series of posts.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Nathan Gloyn
Nock Consulting
United Kingdom United Kingdom
Passionate developer, designer, Certified Scrum Professional, wanna-be architect, agile evangelist, and presenter.
Follow on   Twitter

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141216.1 | Last Updated 7 Feb 2012
Article Copyright 2012 by Nathan Gloyn
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid