Latest Articles


A common question students ask when learning about Clean Architecture, SOLID, and/or Domain-Driven Design (DDD) is whether controllers (or razor pages or API Endpoints should work with repositories directly, or if they should only communicate with services. As with many questions in software, the answer is, "it depends", but I can offer some recommendations. A related question to this one, at more…

Keep Reading →


Value Objects are a part of Domain-Driven Design, and Julie Lerman and I cover them in our DDD Fundamentals course on Pluralsight. Even if you're not applying Domain-Driven Design to your application, you can take advantage of refactoring your business classes to avoid code smells like primitive obsession (follow the link for more on refactoring and code smells). To demonstrate this concept, I'm…

Keep Reading →


In distributed software applications, different services or processes or apps frequently need to communicate with one another. Modern architectural trends toward microservices and containers and cloud-native apps have all increased the likelihood that apps will increasingly be deployed not as single monoliths, but as collections of related services. There are only so many different ways these…

Keep Reading →


I create a lot of samples, demos, open source projects, etc. and I like to use the fairly standard repository layout of having a solution file in the root and project files in a src subfolder. Achieving this in Visual Studio is tedious, but fortunately this series of dotnet CLI commands quickly create the structure for you. This script uses the following commands, which have good documentation…

Keep Reading →


Working in professional software development teams requires a lot of writing. As you advance in your career, frequently the percentage of time you'll be writing emails and other correspondence versus writing source code will increase. As your responsibilities grow, so too does your need to communicate effectively with larger numbers of people in and beyond your organization. Writing effectively is…

Keep Reading →


(Originally sent to my weekly tips subscribers in March of 2019) When you look at a method or function, it should have a name that describes what it does. Naming things is hard but important, and probably the most important thing you can do when you design a method is give it a good name. This mainly applies to methods (or functions) that are or may be called from more than one place. It's less…

Keep Reading →


It's not unusual to have different levels of prioritization in backend systems. Imagine you have a process that generates and sends reports that users have requested. Some of these might be low-priority reports that are simply generated periodically so they're available to view, while others might be generated on demand, with a user actively waiting for the results. These could be further…

Keep Reading →


There was a time when C# didn't support generics. It was a dark time. Ragged bands of .NET developers roamed the harsh landscape, copy-pasting strongly-typed list implementations to avoid the evils of primitive boxing operations. Forced to choose between loose typing and explicit casts at every turn, would-be developers of strongly-typed object models somehow managed to endure and ship (mostly…

Keep Reading →


In most organizations, if there's a Product Owner, the dev team is generally subservient to it and charged with building whatever the Product Owner comes up with. That's not to say they aren't often "on the same team", but the flow of responsibility is usually the PO pushes new requirements and the developers respond to them. Sometimes this relationship, even if only implied, has ramifications for…

Keep Reading →


When I create a new .NET (5) console application and run it in VS Code, I get output like the following: This is just a lot of noise that adds no value and I'd like to disable it so I can see the actual output of my program. Fortunately, there's a simple way to do this - just add a setting in your file: Here's the relevant setting if you just want to copy/paste it: That's it. Once this is done…

Keep Reading →


Ardalis

Copyright © 2021