NDepend

Improve your .NET code quality with NDepend

Visual_Studio_Enterprise_vs._Professional_Essential_Differences

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 go-to when it comes to developing for the .NET framework.

For a newcomer, though, things can get confusing since Visual Studio isn’t a single thing. Instead, it comes in several shapes and sizes. Which one should you pick? What are the features that matter for your use case? Since Visual Studio isn’t free—most editions aren’t, at least—you want to get the best bang for your buck.

That’s what this post is going to cover. As its title suggests, we’ll focus on the differences between the enterprise and professional editions of the integrated development environment (IDE). By the end of the post, you’ll have learned enough to make an informed decision on which version of the IDE better suits your needs. Let’s get started.

Continue reading Visual Studio Enterprise vs. Professional: Essential Differences

Should Architects Write Code

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 is what developers do. And architects should be busy with more important tasks.

However, keeping architects from writing code can limit the potential of your development teams. It can also result in an architectural mess when requirements and business needs change.

So today let’s look at why giving your software architect time to write code is a good thing. But first, we’ll start off by looking at what life is like as an architect.

Continue reading Should Architects Write Code? You Bet They Should!

When_Is_It_Okay_to_Use_a_C#_Partial_Class

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 to allow the user to edit code that was automatically generated.”

Whoa, that was hands down the easiest post I’ve ever written. So, that’s it for today, folks. Thanks for reading and see you next time!

OK, I’m just kidding, of course. If you’ve found this page by googling around on “C# partial class,” chances are you have a number of questions regarding this topic. For starters, what is a partial class? How do you actually use it? Are there any restrictions regarding its use? And the list could go on.

That’s what today’s post is all about. We’ll start out by explaining what a partial class is and providing some examples. Then, we’ll go a little bit deeper, giving a more detailed view of the partial class, its inner workings, and the rules that must be followed when using it.

Finally, we’ll explain the main use case for the C# partial class, nicely tying the end of the post to its beginning.

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

extension_methods_decline_of_traditional_oop

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 bit, but mostly left it intact for posterity I guess.  But if you ask me how that post has aged, I’d respond with “it’s complicated.”

I didn’t like extension methods back then.  I do like them now, provided they aren’t abused.

So, what gives?  Am I just a hypocrite?  Or is it a matter of growth?

Well, none of the above, I’d argue.  Instead, the programming landscape has changed and evolved.  And I’d submit that extension methods were actually ahead of their time when the language authors came up with the concept.  But now they’re hitting their stride.

Don’t take my word for it, though.  This is another one of my research posts, whose previous ranks have included how functional approaches affect codebases, what unit tests do to code, and a look at singletons.  Today, we’ll take a look at extension methods and what properties of codebases they correlate with.

Continue reading Extension Methods and the Decline of Traditional OOP

programming_to_an_interface_simple_explanation_ndepend

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 Internet for answers might only cause more confusion. There, you’ll find people arguing over what “programming to an interface” really means. And how everyone else is wrong about it. Yet everyone’s definition sounds pretty much the same. But is supposedly different. Somehow.

Let’s remove the confusion and break it down. In this post, we’ll look at what it means to program to an interface and why you should do it.

Continue reading Programming to an Interface: A Simple Explanation

what_is_a_good_unit_test

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 on Reddit and Hacker News.

And there are still developers out there ignorant of the existence of unit testing—or any type of automated testing, for what it’s worth. Believe it or not.

However, if we consider the developers that do know about unit testing, I’d say the debate is pretty much over. It’s generally agreed, today, that unit testing has a positive influence on software projects.

With that in mind, the next question then becomes “what makes for a good unit test?” That’s what this post is all about. Today, we present you five must-haves for a great unit test.

Continue reading What Is a Good Unit Test? 5 Must-Haves

declarative_programming_in_depth

Declarative Programming in Depth

Most people that start programming learn to program in an imperative way. Shortly after, they will probably learn a declarative language too. Many developers go a long way without knowing the difference. Many will probably never know. And they could very well be great developers. But knowing the difference could change the way you write code for the better, so let’s dive in.

Continue reading Declarative Programming in Depth

Software_architecture_5_patterns_you_need_to_know

Software Architecture: the 5 Patterns You Need to Know

When I was attending night school to become a programmer, I learned several design patterns: singleton, repository, factory, builder, decorator, etc. Design patterns give us a proven solution to existing and recurring problems. What I didn’t learn was that a similar mechanism exists on a higher level: software architecture patterns. These are patterns for the overall layout of your application or applications. They all have advantages and disadvantages. And they all address specific issues.

Continue reading Software Architecture: the 5 Patterns You Need to Know

Continuing Our Clean Architecture Example in C Sharp

Continuing Our Clean Architecture Example in C#

After a somewhat long delay, it’s time to finally continue our series on clean architecture. This is the second post in the inner series in which we show you a quick implementation of said architecture and the third post in the overall series. In case you haven’t read the previous posts, please do so by using the links in the series layout below:

Without further ado, let’s continue our implementation.

Continue reading Continuing Our Clean Architecture Example in C#