Geeks With Blogs


View Anthony Trudeau's profile on LinkedIn

Add to Technorati Favorites

Anthony Trudeau

Last week version 4.0 of NDepend was released.  NDepend is a Visual Studio add-in designed for intense code analysis with the goal of high quality code.  A month ago I wrapped up my evaluation of the previous version of NDepend.

The new version contains many minor changes, several bug fixes, and adds about 50 new code rules.  The version also adds support for Visual Studio 12, .NET Framework 4.5, and SilverLight 5.0.  But, the biggest change was the shift from CQL to CQLinq.

Introducing CQLinq

The latest version replaces the CQL rules language with CQLinq (CQL is still an option although the editor is buried).  As you might guess CQLinq is a flavor of Linq designed specifically for the code rules.

The best way to illustrate the differences is with an example.  I used the following CQL example in Part 3 of my review:

WARN IF Count > 0 IN
WHERE IsInterface AND !NameLike “I”

This same query looks like this when implemented in CQLinq:

warnif count > 0 from t in Types
where t.IsInterface == true && !t.NameLike(“I”)
select t

I like the syntax and it is a natural fit, but I found writing the queries frustrating in the Queries and Rules Edit window.  The Queries and Rules Edit window replaces the CQL Query Edit window.  The new editor has the same style of Intellisense as the previous editor.  However, it has a few annoyances.  The error indicator is a red block.  It has the tendency of obscuring your cursor.  Additionally, writing CQLing queries is like writing plain old Linq queries, so the fact that the editor uses Enter to select from Intellisense instead of Tab is jarring.  These issues can be an obstacle to writing queries quickly.

CQLinq makes it possible to write rules that weren't possible before.  Additionally, a JustMyCode domain is now possible making it easy to eliminate generated code from the analysis.

Should you Buy?

I recommend NDepend overall.  It has some rough points for me that I have detailed in my earlier evaluation (starting here).  But, it’s definitely worth the money.  The bigger question is: should I pay for the upgrade to 4.0?  At this point I’m on the fence, but I would go for it if you need support for Visual Studio 2012, .NET Framework 4.5, or Silverlight 5.0; or if you need one of the many rules that weren't possible before CQLinq.

Disclaimer: Patrick Smacchia contacted me about reviewing NDepend. I received a free license in return for sharing my experiences and talking about the capabilities of the add-in on this site. There is no expectation of a positive review elicited from the author of NDepend.

NDepend Release Notes

Posted on Sunday, May 27, 2012 10:03 PM NDepend | Back to top

Comments on this post: NDepend 4.0 Released

# re: NDepend 4.0 Released
Requesting Gravatar...
Very interesting and useful point. I just found your site while searching on Google. Thanks for sharing this.
Left by abcd on May 29, 2012 2:29 AM

# re: NDepend 4.0 Released
Requesting Gravatar...
thankies for the article post.Really looking forward to read more. Really Cool.

Thank You
video testimonial
Left by Mark on Jul 25, 2012 6:10 AM

# re: NDepend 4.0 Released
Requesting Gravatar...
I believe it is worth going for 4.0. In my experience software run quicker and more efficient when newer,
Left by Questions on Aug 23, 2012 12:10 AM

Your comment:
 (will show your gravatar)

Copyright © Anthony Trudeau | Powered by: