Weekly development links #12

I decided to talk about value types and reference types. This is somewhat of a basic subject, in the sense that it is something that you should already know if you write C# code for a living.But at the same time, it can be a little non-intuitive if you’re not an experienced developer. I’ll try to make this as simple and short as possible, so I won’t talk about string immutability, boxing, unboxing, and some other things with fancy names. I’ll write about those in the future, but for today let’s focus on the basics.

This catalog of refactorings includes those refactorings described in my original book on Refactoring.

C# has in many ways inherited its relationship with Builder from Java, where it was usually called by the more degenerative term “Factory" or “Factory pattern". (Technically, what Java calls a “Factory pattern" is typically one of Builder, Factory Method, or Abstract Factory, depending on what precisely looks to be varied and/or encapsulated.) C#, however, never fell quite as deeply in love with the “Factory pattern" as the Java development crowd did, and as such it wasn’t as widely used.

In this column I’m going to continue to delve into .NET Core, with a focus on .NET Core dependency injection (DI) capabilities and how they enable an inversion of control (IoC) pattern. As before, leveraging .NET Core functionality is possible from both “traditional" CSPROJ files and the emerging project.json type projects. For the sample code, this time I’ll be using XUnit from a project.json project.