I have just started reading DDD. I am unable to completely grasp the concept of Entity vs Value objects.. Can someone please explain the problems (maintainability, performan
3 distinction between Entities and Value Objects
Identifier vs structural equality: Entities have identifier,entities are the same if they have the same identifier. Value Objects on beyond the hand have structural equality, we consider two value objects equal when all the fields are the same. Value objects cannot have identifier.
Mutability vs immutability: Value Objects are immutable data structures whereas entities change during their life time.
Lifespan: Value Objects Should belong to Entities