Skip to main content
Software Alchemy

The Art and Science of Software Development

Clean DDD Workflow

In this blog entry, I'm going to take a break from talking about software engineering topics and instead discuss computer hardware. Specifically, I'm going to provide a detailed walkthrough of how I upgraded the RAM and Solid State Drive (SSD) on my LG Gram ultrabook. As I stated at the very beginning, the computer that you use for your software development work matters. I chose to purchase the LG Gram 17" 2019 model because it's a rockin' laptop for software engineers. The original laptop came with 16GB of RAM and a 256GB SSD, which I thought was upgradable to 20GB and 512GB, respectively. Little did I know, the laptop supports much more, and there is a popular modification out on the Internet to upgrade the RAM to 40GB and SSD to 1TB using high-quality Samsung components! For a few hundred bucks more and a moderate time investment, it was a deal I couldn't refuse!

Clean DDD Workflow

Previously, I discussed our intention to maintain a separation between Presentation (View Model), Domain, and Persistence entities in our architecture. I talked about some of the difficulties this design decision presents, and how we can mitigate those obstacles using an elegant, methodical entity-mapping strategy. In this blog entry, I build off of that discussion and elaborate on some of the high-level architectural patterns which emerge as a result. This is especially relevant if you are using CQRS, although that is not a prerequisite, and these patterns will apply just as readily to other approaches, including traditional N-layered architectures.

Mapping Entity Types

In this long-overdue entry, we’re going to circle back and discuss the importance of keeping a separation between various entity types within a DDD application, the challenges that presents, and elegant mapping strategies we can use to make it work. First, however, I’m going to briefly touch on some key enhancements to the C# language that were released with version 9, and how those influence our architecture from a Domain-Driven Design perspective. Alongside the blog entry in which I laid out my Clean DDD architectural template in detail, this is one of the most important that I’ve written to date, so I hope you enjoy it and find the knowledge from this to be useful.

Global Exception Handling in ASP.NET Core and Angular

In this blog entry I’ll go over using custom ASP.NET Core middleware to catch various kinds of exceptions so that we can return the proper HTTP status code to the user’s browser. At the Angular side we’ll take advantage of these status codes in order to direct the user to the appropriate pages on an error—an "unauthorized" page or general error page—or simply display a notification. This is one approach to handling server exceptions which are prone to "bubble up" from lower layers of the stack, such as the Application and Domain layers, and elegantly updating the UI.