In the Domain Layer, we categorize our objects into two main types: Entities and Value Objects.
An Entity is something that has a unique ID (like a GUID or an EmployeeNumber). Even if all its other properties change, it's still the same object. A User is an Entity. If they change their name or email, they are still 'User ID 123'. Equality is checked by comparing IDs.
A Value Object has NO identity. It is defined solely by its values. Money, Address, and Color are Value Objects. If two Money objects both represent '$10 USD', they are equal. Value Objects should be **Immutable**. If you want to change an address, you don't 'update' the properties; you replace the entire object with a new one.
Q: "Why use Value Objects instead of primitive strings/ints?"
Architect Answer: "Encapsulation. A primitive string doesn't know how to validate an Email. A EmailAddress Value Object does. By moving validation and logic INTO the Value Object, you prevent your Entities from becoming 'Anemic' (logic-less bags of data). It's the key to robust, self-validating domain models."