Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

Derek Comartin

Domain Logic: Where does it go?

I’d argue in most software that domain logic is written using Transaction Scripts. Transaction Scripts are single procedures that handle a request. While this can work fairly well in a lot of cases, it starts falling apart when you have a lot of domain complexity and/or a lot of various concerns. A sign you’ve gone too far is difficulty testing and wanting to call a transaction script from another transaction script. When this happens, what’s a solution? Encapsulating your domain logic and state changes within a Domain Model. YouTube Check out my YouTube channel where I post all kinds of content that… Read More »Domain Logic: Where does it go?

Eventual Consistency is a UX Nightmare

Eventual Consistency is the term most people refer to when they are reading from a different data source from where they perform a write. Usually leads to a bad user experience where a user performs some action but then doesn’t see their change reflected in the UI immediately. There can be many reasons for this. It could be from using a read replica that is eventually consistent. If you’re using Event Sourcing with Projections as your Read Model, which is built asynchronously. Or if you’re processing commands asynchronously via a message queue. YouTube Check out my YouTube channel where I post all… Read More »Eventual Consistency is a UX Nightmare

Semantic Versioning is overrated

Package Managers (npm, nuget, pip, composer, maven, etc) are an incredible tool for leveraging other libraries and frameworks into your products or projects. What seems to have been largely lost in the decision-making process on if you should take on a dependency and what the implications are. Once you do take a dependency, how much do you trust the vendor/author and semantic versioning? Before you do a quick npm install or update let me explain some things you should be considering. YouTube Check out my YouTube channel where I post all kinds of content that accompanies my posts including this video showing… Read More »Semantic Versioning is overrated