-1

I've been reading about Event Sourcing and DDD for a several weeks. So, I need to create a ubiquitous language. What does it exactly mean? I need to create some library defining some domain classes, doesn't it?

So, I would have created an mydomain-language-artifact.jar artifact and it should be used by my services A and B.

  1. What exactly should this artifact contain? Domain classes (Order, OrderLine, Customer...).
  2. Should it contain Event, Value Objects or Aggregates classes?

So, guess everything is working fine, and my domain model changes, I mean, Customer has a new alias field. So it means I should change my mydomain-language-artifact.jar adding this change on Customer class, shouldn't it?

So it means likely Events, Value Objects and Aggregates will change as well. Probably, CustomerAddedEvent will contain an alias field. So, what about the pervious event stored in Event Store? How could I replay them and rebuild my system?

Jordi
  • 20,868
  • 39
  • 149
  • 333

1 Answers1

2

The ubiquitous language is what you need to identify by talking to the domain expert. At this moment you're learning DDD the very wrong way, because you treat it like a recipe.

The point of DDD is to understand Domain functionality by identifying use cases, concepts and relationships, relevant models etc. This is information only, that we further organise using the tactical patterns of DDD.

It's not about writing domain classes, this shows that your mindset is still far away of what DDD means. It took me 5 years to get DDD, don't expect it to 'learn' it in 2-3 weeks by reading 1-2 books. It takes practice and a lot of discipline to NOT write code. Code is implementation, it starts where DDD ends.

Same with Event Sourcing. While easier to understand is in a way coupled to DDD, because those Domain Events need to be properly identified .

You'are asking many generic questions that can't really be answered, because it depends... What makes DDD special is that we focus on specifics on a case by case basis.

I wrote a lot about DDD, especially about the mindset that needs to be understood. Hope it will help you.

MikeSW
  • 16,140
  • 3
  • 39
  • 53