Skip to main content

Posts

Showing posts from February, 2012

CQRS vs DDD popularity

Let's imagine a situation. You are a person that has some time and wants to learn something new. You have two options briefly presented: Domain Driven Design on the one hand and Command Query Responsibility Segregation on the other. What would you choose? (Before you start reading below, understand that I compare those two concepts only theoretically and I am not taking under consideration how they interact with each other) For me it would be pretty straightforward - DDD of course. Why? I will explain below. However for most people that I have met I see the opposite... I still cannot fully understand why, but let's try to investigate a little... What Google says?  I made some quick investigation in the Google Trends. I typed "cqrs" and "domain driven design". When I typed "ddd" or "command query responsibility segregation" the results were unreliable. We can see that DDD was first and at the very beginning it was m

Changing the mindset - part 4 / 4 - Subtle difference

This is the last article out of the series about changing the mindset. At the beginning we took the Classic approach , and then we introduced three important concepts (in the order): Domain Driven Design ( Modeling the Domain ) Command Query Responsibility Segregation ( Segregation of Responsibility ) Event Sourcing ( Segregation of Responsibility ) In the previous part we separated our Read and Write Models. We also applied Event Sourcing as a persistence mechanism for Aggregates. We also equipped the Aggregate with behavioral methods only, and got rid of getters. Everything looks really nice. The Model is clean, verbose, and everything is explicit (as for such a small example). We have one data store for the Write side, and we don’t have to care about distributed transactions. We can even easily provide historical data. However, if you paste the last piece of code from the previous part to your IDE, you will see that there are many warnings on the fields – "never