Adam Shakhabov
Adam Shakhabov

Reputation: 1346

Difference between Entity and Value Objects in translation app

I am modelling domain for typical translation application to translate word between different world languages:

enter image description here

That is my first DDD experience, however, I have quite OOP practice and therefore I've been surprised with confusing between Entity and Value Object concepts.

I am sure that Language and Word objects have to be defined as Entity, but I am doubting regard Translation. Currently, it is defined as Value Object. Am I right?

Upvotes: 0

Views: 120

Answers (1)

Ali Soltani
Ali Soltani

Reputation: 9927

You are right. The important point to distinguish them is that identity matters for entities, but does not matter for value objects. As can be seen in your class diagram, there isn't any identity for Translation so it's value object.

Upvotes: 1

Related Questions