Exploring NDepend v2023.2: Unraveling the Latest Features

Introduction:

For .NET developers and software quality enthusiasts, NDepend is an indispensable tool. NDepend v2023.2 introduces an array of new features that promise to streamline your development process and enhance the quality of your code. In this comprehensive article, we'll delve into the latest updates and enhancements.

Full .NET 8.0 Support:

  • With .NET 8.0's release, NDepend ensures seamless compatibility.
  • Analyze .NET 8 code quickly, covering project types like ASP.NET Core, Windows Desktop, Blazor, and Console applications.
  • Your .NET 8.0 projects are now within NDepend's scope for analysis.

C# 12 Support and Parsing Improvements:

  • NDepend v2023.2 embraces the new features of C# 12, including primary constructors for classes and inline arrays.
  • Achieve 100% resolution of code element declarations in your source code, from fields and enumeration values to abstract methods and more.
  • Source declaration line enhancements clarify your code, making issue identification more straightforward.

Performance Enhancements:

  • Say hello to a faster analysis process. NDepend v2023.2 reduces report generation time by a staggering 40%.
  • Even for extensive code bases with thousands of source files and millions of lines of code, report generation is now a matter of seconds.
  • NDependReport.html file sizes are halved thanks to new optimizations, ranging from one to 5MB. Sharing and usability have never been more convenient.

UI Enhancements:

  • The user interface receives significant improvements.

  • Loading code base snapshots with the baseline snapshot is now parallelized, resulting in a 40% reduction in loading time.

  • Lazy initialization of panels makes the UI instantly responsive once snapshots are loaded.

  • In Project Properties, the "Code to Analyze" panel now resolves all assemblies 41% faster.

    NDepend Dashboard
    Dashboard

    NDepend Report Dashboard
    NDepend Report Dashboard

    NDepend_2023_Report_Abstractness versus Instability Diagram
    NDepend Report - Abstractness versus Instability Diagram

Customizable Issue Explanations:

  • NDepend v2023.2 empowers users to define patterns for issue explanations.
  • This customization enables tailored issue explanations to meet specific project needs, enhancing insights into the codebase.
  • Issue explanations are integrated into the NDepend UI and source code views in reports, providing an in-depth understanding. 

    NDepend_2023_Report_Issues Improvement

Fewer False Positives:

  • Reducing false positives remains a top priority for NDepend.
  • In this release, various rules have been refined to minimize false positive issues, allowing developers to focus on genuine code quality concerns.

Conclusion: NDepend v2023.2 emerges as a powerhouse tool for .NET developers. With complete .NET 8.0 support, compatibility with C# 12, and substantial performance enhancements, it becomes a valuable asset for your toolkit. The UI improvements and customizable issue explanations elevate the code analysis experience. Bid farewell to false positives and embrace an accurate analysis.

In a world where software quality is non-negotiable, NDepend v2023.2 is necessary to ensure your .NET projects shine.

Final Thoughts: NDepend v2023.2 continues its commitment to delivering an exceptional code analysis experience. Its ability to adapt to the latest .NET technologies and enhanced performance makes it a crucial tool for any .NET developer. Dive into NDepend v2023.2 and watch your codebase reach new heights of quality and maintainability.

NDepend - Dependency Graph Navigating - Coupling Graph

Introduction

This is another post followed by NDepend - Improved Dependency Graph Feature. In this article, you will discover more about the Dependency Graph features e.g. focus on a node (double click a node in graph) or coupling graph (double click an edge in the graph).

Again, we going to use the same OrchardCore project used in the previous article on NDepend Dependency Graph. Open the project and then navigate to the Dependency Graph Zoom in a bit either using the mouse wheel or button in the toolbar. 

Focusing on a node

Select a node in the graph and double click on it. Now you will see that node will be in the center of the diagram and it is in the view of focus. Now you can see the element and paths of the selected node.

Transitioning to coupling graph

Coupling is related to the dependency between the modules. You can see the Dependency Graph by double click an edge in the graph. It is a great feature to go through the different dependencies path for the module node, you selected.

Here is the visualization of the navigation in the Dependency Graph

Conclusion

NDepend Dependency Graph has a smooth transition between the different dependencies and it is good that it is navigating to the coupling graph just by clicking on the edges.

NDepend - Improved Dependency Graph Feature

Introduction

This is another post related to the NDepend tool and Code Quality for .NET Core application follow by this

NDepend makes .NET code beautiful by measuring quality with metrics, generate diagrams, and enforce decisions with code rules, right in Visual Studio.

I have used this tool for analyzing the .NET Core project and it is a great and intuitive tool to work with. The new version NDepend  v2020.1.0 is available with the latest features e.g.  Dependency Graph Completely Rebuilt

What is new with the Dependency Graph

I have also used the Dependency Graph in the previous version of the NDepend. It was much useful to identify the dependency between the different assemblies in the solution.

This time the NDepend team improvise this feature and restructured to analyze large project architecture. Below features make it easy to analyze using the dependency graph.

New navigation system

You can drag and drop from Visual Studio solution explorer, Expand/Collapse parent elements, Search elements in graphs by name with the search windows, also provided Undo / Redo feature.

New layout options

  • Group-By Assemblies, Namespaces, Types, Clusters Filters to show or hide
  • Box size proportional to element size, Edge width proportional to the coupling strength
  • Color conventions instantly identify caller/callee elements
  • Complex graph simplified with Clusters
  • Export to SVG vector format or PNG bitmap format.

Let's explorer that how can we generate Dependency Graph by taking an example of the OrchardCore application which contains more than 143 projects. 

Open the application in the Visual Studio and create an NDepend project by attached to the Visual Studio solution.

Filter and select the project that you want to analyze.

Now a dialog box will open with options, View NDepend Dashboard, Show NDepend Interactive Dependency Graph. Click on the "Show NDepend Interactive Dependency Graph" button to see the dependency graph.

After a few seconds windows will open which is shown in the image below. It has the relationship between the projects and their dependencies.

You can also zoom in or out of the dependency graph to see a group of objects. See the below screenshot to know the zoom feature. you can move and see the project elements.

Conclusion

I genuinely think NDepend is very powerful and very easy to use for analyzing application architecture. The NDepend team and Patrick are very active and we can expect a lot of good improvements in future versions which help to create quality software.

NDepend enabled all features for .NET Core 2.0 Visual Studio projects..

Introduction

NDepend is a static code analyser for .NET projects. NDepend performs a range of analyses across a solution to make the projects better with code. Now day .NET Core stack is the hot stuff in the Microsoft development technologies due to cross platform development. Recently I found that NDepend also start analysing .NET Core 2.0, ASP.NET Core 2.0 and .NET Standard 2.0 Visual Studio projects from latest Version v2017.3.1.

What’s New

All NDepend favorite features now work seamlessly with any .NET Core 2.0, ASP.NET Core 2.0 and .NET Standard 2.0 Visual Studio projects.

clip_image002

Here is the web report for the .NET Core web application and it also includes all the previously support features for a .NET Framework project.

clip_image004

There are few another improvement in newer version of NDepend.

  • Guide Tooltip for Beginners and these guide tooltips now explain the basics of NDepend UI panels as you can see in below image:

    clip_image006

  • There are more than 50 improvements on the default rule-set to avoid matching false positives in various situations to make results Less False Positives and it also include ASP.NET, ASP.NET Core and WPF projects.
  • UI responsiveness has been improved in Visual Studio when running NDepend analysis or loading an analysis result.
  • More than 30 bugs fixed and dozen improvements done in this release.

Conclusion

NDepend has made good improvement in .NET Core projects analyses. In Visual Studio 2017, Dashboard and other reports are responsive. It is nice tool to Static Analyses for .NET and its successors .NET Core also.

Technical Dept Estimation with NDepend…

Technical debt is a concept in programming that reflects the extra development work that arises when code that is easy to implement in the short run is used instead of applying the best overall solution at once after few release of the application.  

It includes those internal things that you choose not to do now, but which will impede future development if left undone. especially in the context of refactoring.

In 1992, at the OOPSLA conference Ward Cunningham describes this concept as follows:

"Shipping first-time code is like going into debt. A little debt speeds development so long as it is paid back promptly with a rewrite. Objects make the cost of this transaction tolerable. The danger occurs when the debt is not repaid. Every minute spent on not-quite-right code counts as interest on that debt. Entire engineering organizations can be brought to a stand-still under the debt load of an unconsolidated implementation, object-oriented or otherwise."

Technical Dept increase with every release if residual issues left over from the last released are addressed. In Agile method, each sprint take care about the standard process to make a quality product but code refactoring and other stuff are not controlled at the right time then futures releases cost more in refactoring rather than doing at particular release using shortcuts. It is reduced by measuring Debt at every release to reduce to cost of the continuous development.

NDepend provide Continuous Code Quality using Smart Technical Debt Estimation. It enables you to estimate the cost to fix and the severity through customizable C# formulas for each issues persist at each sprint or release of the software.

In newer version NDepend v2017.1.0, NDepend estimates the technical-debt of a code base.

image

The technical-debt is estimated from C# LINQ formulas embedded inside each rule source code. This makes the the estimations both smart and easily customizable to your needs. In the below screen you will see the queries written for the predefined rules provided with the NDepend.

image

There are rules which can be added and modified as per the requirement. Debt estimation parameters are also customizable through NDepend Project Properties panel. See below images:

image

image

As per my opinion this feature is quite worth of use to improve the quality of the product for future cost reduction and it is quite easy to understand the serious Code Quality control in the development process through NDepend. It makes the managers to control the return on investment made on quality.

Hope NDepend benefits others to reduce the Technical Debts for their products..

NDepend: New Feature “Technical Debt and Quality Gate”

What are the quality gates
Quality gates are basically acceptance criteria reviews that can be used throughout any project. Sure, managers of smaller, agile projects might say that this involves too much paperwork, but the nice thing about quality gates is that the strategy is fully customizable. It can be seen as a set of predefined quality criteria that a software development project must meet in order to proceed from one stage of its lifecycle to the next.

These are special milestone in a software project which are located before a phase that is strongly dependent on the outcome of a previous phase. They are especially useful between phases in which breaches in disciplines must be overcome.

How quality gates work:

You are not allowed to proceed the next gate until the previous gate has been completed successfully. It involves a checklist of deliverables, with some indication of the state of completion for each item. Checklist must be reviewed by the project manager (Manager) and a senior executive or stack-holders who is involved with the project. Quality gates therefore mean:

  • Formal checklists are used throughout the life of a project.
  • Formal sign-off and acceptance occurs at each gate.
  • Assessment of the quality and integrity of the product takes place.
  • Information is assured to be communicated to the correct stakeholders

Advantages of the Quality gates:
These are effective on any kind of project. There attractive because of the following advantages which includes:

  • Minimizes project failure risks through phase-by-phase checklists (or Gates)
  • Enables project managers to continuously communicate the process and build quality directly into the project
  • Reduces development cycle time—getting it done right the first time
  • Increases focus on a well-designed product

Now NDepend is equipped with this in v2017.1 and you will find default quality gates relative to technical debt and issues and issues, including Percentage of Debt, New Debt since Baseline or New Blocker / Critical / Major Issues. Quality gates relative to absolute technical debt value are disabled by default because the proper thresholds can only be defined in the context of a particular project.

Results of the applied rules are shown in the updated dashboard. This is quite new feature in NDepend for project management improvement.

image

You will find ratings and the status of passed rules.

image

HTML report has more details in a tabular format about the applied rules:

image

Then again the feature that I most like in NDepend is CQLinq which enables you to customize or add rules. CQLinq is much fast to run these rules and now much improved in case of performance.

image

There is a nice documentation is also available to know that how to Compute and Manage the Technical Debt with NDepend.