NDepend

Improve your .NET code quality with NDepend

SOLID Design: The Open-Close Principle (OCP)

The Open-Close principle (OCP) is the O in the well known SOLID acronym. Bertrand Meyer is generally credited for having originated the term open/closed principle, which appeared in his 1988...
Patrick Smacchia July 30, 2019

SOLID design: The Liskov Substitution Principle (LSP)

The Liskov substitution principle is the L in the well known SOLID acronym. The original principle definition is: Methods that use references to base classes must be able to use...
Patrick Smacchia July 23, 2019

Identify .NET Code Structure Patterns with no Effort

The two pillars of code maintainability are automatic testing and clean code structure. Testing is used to regularly challenge code correctness and detect regression early. Testing can be easily assessed...
Patrick Smacchia July 16, 2019

Ensure that your classes are declared as sealed when possible

Inheritance is one of the pillar of OOP. However, in the real world, most classes are not designed to be properly inheritable. Properly designing a class to be inheritable is...
Patrick Smacchia July 10, 2019

The continuous adaptation of Visual Studio extensions

One could think that developing an extension for a two-decades+ product as mature as Visual Studio is headache-less. Not really. Visual Studio is a big big beast used by millions...
Patrick Smacchia July 4, 2019

Simplifying a Visual Studio extension menu: A Case Study

NDepend version 2019.2.1 has just been released. This new version proposes a simplified menu for the NDepend Visual Studio extension. Before going further I underline that we didn’t get rid...
Patrick Smacchia April 2, 2019

An in-depth analysis of .NET Core 3.0 support for WPF and Winforms APIs

.NET Core 3.0 will be RTM soon and it supports WPF and Winforms APIs. In my last post I’ve been exploring .NET Core 3.0 new APIs by comparing compiled bits...
Patrick Smacchia February 28, 2019

Exploring .NET Core 3.0 new API

.NET Core 3.0 is representing a major step for the .NET community. It is interesting to analyze what’s new in the API directly from the compiled bits. In this post...
Patrick Smacchia February 21, 2019

Advanced Code Search : A Case Study

This morning I stumbled on a complex test to write. The need was to create and show a custom Form (written with Windows Form) that relies on the System.ComponentModel.BackgroundWorker to do...
Patrick Smacchia January 16, 2019

Service Oriented Architecture: A Dead Simple Explanation

Service-oriented architecture (SOA) has been with us for a long time. The term first appeared in 1998, and since then it’s grown in popularity. It’s also branched into several variants,...
Eric Goebelbecker January 8, 2019

C# Features: An Exhaustive List of the Best Ones

The first post I wrote for the NDepend blog was about C# 8.0 features. That post inspired a sequel, followed by the series’ final chapter. Those posts dealt with the...
Carlos Schults December 18, 2018

REST vs. RESTful: The Difference and Why the Difference Doesn’t Matter

What’s the difference between a REST API and a RESTful one? Is there a difference? This sounds like the kind of academic question that belongs on Reddit. But then you...
Eric Goebelbecker December 11, 2018

Coupling in Programming: What This Means and How Not to Get Burned

What is coupling in programming? Is it something we want to avoid when we design and write code? If so, why? And more importantly, how? Let’s take a look at...
Eric Goebelbecker December 4, 2018

Mentoring Software Developers as an Architect

A while back we discussed the unique career path architects have to travel. We wrote that article for developers who want to advance their careers and aren’t sure which way...
Eric Goebelbecker November 27, 2018

Self Documenting Code vs. Comments? Turns Out It’s Both or Neither

It’s been about a month since my last research post, and I’ve been musing about the next topic.  What should it be?  Well, I’ve decided.  Since I love nothing more...
Erik Dietrich November 20, 2018

Visual Studio Enterprise vs. Professional: Essential Differences

If you’re a .NET developer, then it’s overwhelmingly likely that you’re a Visual Studio user. There are alternatives to it, sure. But the product from the Redmond giant is the...
Carlos Schults November 13, 2018

Domain-Driven Design Demystified

Domain-driven design, or DDD, is a software design methodology aimed at producing better software. Engineers achieve this by working closely with domain experts during the continuous design process. Eric Evans...
Phil Vuollet November 6, 2018

Should Architects Write Code? You Bet They Should!

There’s a common misconception that’s permeated our profession: Architects don’t need to write code to do their jobs. Now, this may seem like a harmless approach. After all, writing code...
Sylvia Fronczak October 30, 2018

Hexagonal Architecture: What Is It and How Does It Work?

Hexagonal architecture is a model or pattern for designing software applications. The idea behind it is to put inputs and outputs at the edges of your design. In doing so,...
Phil Vuollet October 23, 2018

When Is It Okay to Use a C# Partial Class?

Today’s post attempts to answer a very simple and straightforward question: “When is it OK to use a C# partial class?” And the answer as straightforward as this: “When you need...
Carlos Schults October 16, 2018

Extension Methods and the Decline of Traditional OOP

A bunch of years ago, I wrote a post on my own personal blog titled, “Why I Don’t Like C# Extension Methods.”  Over the years, I’ve updated that post a...
Erik Dietrich October 9, 2018

Shotgun Surgery: What It Is and How to Stop It

I really love the name “shotgun surgery” for describing a code smell.  It’s sort of an interesting mix of aggressive and comical, and so it paints a memorable picture.  I...
Erik Dietrich October 2, 2018

Onion Architecture: Going Beyond Layers

So you’ve read about the Onion Architecture and think you get it. There are layers in this architecture. They’re onion-like. And they make your code better. But how? And what...
Sylvia Fronczak September 25, 2018

Linq Tutorial: A Complete Beginner’s Gentle Introduction

There was a time when Linq was a mystery to me. But, now that I’ve learned how to use it, I don’t know how I ever lived without it! You’ll...
Phil Vuollet September 18, 2018

You Should Favor Software Products That Include Support in the Price

Quite often we talk about architectural concerns on this blog, with topics like application layering or the merits of design patterns.  But today I’m going to switch gears a little...
Erik Dietrich September 11, 2018

Programming to an Interface: A Simple Explanation

As an architect, you know that programming to an interface is good. It’s what everyone should do. But what does that mean? And why should you do it? Searching the...
Sylvia Fronczak August 21, 2018

What Is a Good Unit Test? 5 Must-Haves

In this day and age, unit testing isn’t as controversial as it once was. Sure, you still see the occasional inflammatory, clickbait-y, confrontational “unit testing is garbage” type of post...
Carlos Schults August 14, 2018

Layered Architecture: Still a Solid Approach

Layered architecture gets a lot of flack. Even though it’s still the most prevalent architecture, we view it as an anti-pattern. It’s old, not scaleable, and anti-SOLID. It encourages (shudder)...
Sylvia Fronczak August 7, 2018

Autofac: A Detailed Look Under the Hood at Its Code Quality

In case you haven’t seen it, I’ve been diving ever-further down the code research rabbit hole.  Today it brings me to the Autofac codebase (found here).  But to understand how...
Erik Dietrich July 31, 2018

Software Architecture Document? Do You Need One?

In the spirit of the Agile Manifesto, we’ve reduced our dependence on software documentation. In some ways, this has improved our lives. And in other ways, it’s been taken too...
Phil Vuollet July 17, 2018