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

Don’t Fail Publishing Events!

Consistency is critical when working with an event-driven architecture. You must ensure that when you make state changes to your database, the relevant events you want to publish are published. You can’t fail publishing events. Events are first-class citizens, and when events drive workflows and business processes, they rely on this consistency between state changes and published events. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Atomicity Here’s an example of placing an order. At the very bottom of this method, we publish an OrderPlaced event… Read More »Don’t Fail Publishing Events!

Testing WITHOUT Mocks or Interfaces!

A common approach people take with testing is mocking. Specifically defining interfaces for dependencies which are then typically mocked so you can test in isolation. While interfaces can be helpful for mocking as well as fakes and stubs, there can be other approaches taken. Meaning you don’t need to create an interface for everything. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Deterministic Let’s start with a method in an OrderService for creating an Order. To test this method, there are a few dependencies involved. The… Read More »Testing WITHOUT Mocks or Interfaces!

Domain Events in Event Sourcing? Not Exactly!

What are domain events for? Domain Driven Design and Event Driven Architecture are nothing new, but they continue to become more popular. Unfortunately, some concepts and terms get a bit murky as they do. Specifically, the term domain events have caused a bit of confusion. I will clarify a misconception about the role and purpose of domain events and how that relates to Event Sourcing. Or does it? YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Event Sourcing As a primer on Event Sourcing, it’s a… Read More »Domain Events in Event Sourcing? Not Exactly!