Exploring NDepend

Recently, I was looking for tools to improve code readability as well as tools which can help me to write better code. There are many tools. And then I met NDepend – often called as ‘Swiss Army Knife for .NET developers’. And glad that I could try it out. This tool can check your code on many parameters, for example coding standards, code quality, dependencies and what not.

Here, let me give you a glimpse of what it can do. However, I’m covering just 1% of what it actually does and what I understood. There are many things, which I’ve yet to explore.

To start with, when I open my project in NDepend, it analyzes it and gives a detailed report. One part of it is basic details about app statistics. It is like a dashboard.

image

This report shows, number of lines commented, assemblies and its member count and other parameters.

This tool also shows violated rules and how they can be fixed

image

On clicking on those violations, you will be taken directly to that code where it can be fixed.

One of the best and most important thing about this tool, also the one that I liked is it shows dependency graph. This can help you if you want to improve the app architecture. Basically you need to know your app’s dependencies when you’re deploying/publishing it. Lesser the dependencies, better the product Smile

image

One more thing, which I think as the key feature of NDepend is Treemap Metric View. In this case rectangles represent method and the size depends on the number of lines. However, this view can give more details. Read more about it here

image

As I mentioned before, I haven’t got a chance to explore all the features of this tool. But this post can give you the idea about what it can do and how it can help you. As and when I’ll explore more features of it, I’ll write it down here. Meanwhile, do give it a try here: http://www.ndepend.com/ 

Happy coding
Mayur Tendulkar

Advertisements

Published by

Mayur Tendulkar

Working as a Program Manager for Xamarin in Microsoft. More details at: https://about.me/tendulkar

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s