Value Objects in CQRS – where to use

Ok I’ve changed my mind. I have been trying to deal with VOs a bunch lately and after watching this http://www.infoq.com/presentations/Value-Objects-Dan-Bergh-Johnsson it clarified a couple of things for me. Commands and Event are messages (and not objects, objects are data + behavior), in some respects much like DTOs, they communicate data about an event and … Read more

How are Value Objects stored in the database?

It’s ok to store Value Objects in a separate table, for the very reasons you’ve described. However, I think you’re misunderstanding Entities vs VOs – it’s not a persistence related concern. Here’s an example: Assume that a Company and Person both have the same mail Address. Which of these statements do consider valid? “If I … Read more

Value vs Entity objects (Domain Driven Design)

Reduced to the essential distinction, identity matters for entities, but does not matter for value objects. For example, someone’s Name is a value object. A Customer entity might be composed of a customer Name (value object), List<Order> OrderHistory (List of entities), and perhaps a default Address (typically a value object). The Customer Entity would have … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)