Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9168329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:36:06+00:00 2026-06-17T15:36:06+00:00

Quotes are from DDD: Tackling Complexity in the Heart of Software ( pg. 150

  • 0

Quotes are from DDD: Tackling Complexity in the Heart of Software ( pg. 150 )

a)

global search access to a VALUE is often meaningles, because finding a
VALUE by its properties would be equivalent to creating a new instance
with those properties. There are exceptions. For example, when I am
planning travel online, I sometimes save a few prospective itineraries
and return later to select one to book. Those itineraries are VALUES
(if there were two made up of the same flights, I would not care which
was which), but they have been associated with my user name and
retrieved for me intact.

I don’t understand author’s reasoning as for why it would be more appropriate to make Itinierary Value Object globally accessible instead of clients having to globally search for Customer root entity and then traverse from it to this Itinierary object?

b)

A subset of persistent objects must be globaly accessible through a
search based on object attributes … They are usualy ENTITIES,
sometimes VALUE OBJECTS with complex internal structure …

Why is it more common for Values Objects with complex internal structure to be globally accesible rather than simpler Value Objects?

c) Anyways, are there some general guidelines on how to determine whether a particular Value Object should be made globally accessible?

UPDATE:

a)

There is no domain reason to make an itinerary traverse-able through
the customer entity. Why load the customer entity if it isn’t needed
for any behavior? Queries are usually best handled without
complicating the behavioral domain.

I’m probably wrong about this, but isn’t it common that when user ( Ie Customer root entity ) logs in, domain model retrieves user’s Customer Aggregate?

And if users have an option to book flights, then it would also be common for them to check from time to time the Itineraries ( though English isn’t my first language so the term Itinerary may actually mean something a bit different than I think it means ) they have selected or booked.

And since Customer Aggregate is already retrieved from the DB, why issue another global search for Itinerary ( which will probably search for it in DB ) when it was already retrieved together with Customer Aggregate?

c)

The rule is quite simple IMO – if there is a need for it. It doesn’t
depend on the structure of the VO itself but on whether an instance of
a particular VO is needed for a use case.

But this VO instance has to be related to some entity ( ie Itinerary is related to particular Customer ), else as the author pointed out, instead of searching for VO by its properties, we could simply create a new VO instance with those properties?

SECOND UPDATE:

a) From your link:

Another method for expressing relationships is with a repository.

When relationship is expressed via repository, do you implement a SalesOrder.LineItems property ( which I doubt, since you advise against entities calling repositories directly ), which in turns calls a repository, or do you implement something like SalesOrder.MyLineItems(IOrderRepository repo)? If the latter, then I assume there is no need for SalesOrder.LineItems property?

b)

The important thing to remember is that aggregates aren’t meant to be
used for displaying data.

True that domain model doesn’t care what upper layers will do with the data, but if not using DTO’s between Application and UI layers, then I’d assume UI will extract the data to display from an aggregate ( assuming we sent to UI whole aggregate and not just some entity residing within it )?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:36:07+00:00Added an answer on June 17, 2026 at 3:36 pm

    a) There is no domain reason to make an itinerary traverse-able through the customer entity. Why load the customer entity if it isn’t needed for any behavior? Queries are usually best handled without complicating the behavioral domain.

    b) I assume that his reasoning is that complex value objects are those that you want to query since you can’t easily recreate them. This issue and all query related issues can be addressed with the read-model pattern.

    c) The rule is quite simple IMO – if there is a need for it. It doesn’t depend on the structure of the VO itself but on whether an instance of a particular VO is needed for a use case.

    UPDATE

    a) It is unlikely that a customer aggregate would have references to the customer’s itineraries. The reason is that I don’t see how an itinerary would be related to behaviors that would exist in the customer aggregate. It is also unnecessary to load the customer aggregate at all if all that is needed is some data to display. However, if you do load the aggregate and it does contain reference data that you need you may as well display it. The important thing to remember is that aggregates aren’t meant to be used for displaying data.

    c) The relationship between customer and itinerary could be expressed by a shared ID – each itinerary would have a customerId. This would allow lookup as required. However, just because these two things are related it does not mean that you need to traverse customer to get to the related entities or value objects for viewing purposes. More generally, associations can be implemented either as direct references or via repository search. There are trade-offs either way.

    UPDATE 2

    a) If implemented with a repository, there is no LineItems property – no direct references. Instead, to obtain a list of line items a repository is called.

    b) Or you can create a DTO-like object, a read-model, which would be returned directly from the repository. The repository can in turn execute a simple SQL query to get all required data. This allows you to get to data that isn’t part of the aggregate but is related. If an aggregate does have all the data needed for a view, then use that aggregate. But as soon as you have a need for more data that doesn’t concern the aggregate, switch to a read-model.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note - all quotes are from DDD: Tackling Complexity in the Heart of Software
Often I find myself inverting quotes: from double quotes to single quotes '' and
I have to remove quotes from a relatively large text file. I have looked
I am trying to remove the slashes from magic quotes from an array. So
I am writing a simple program to filter out stock quotes from a given
I have the following query: SELECT * FROM quotes INNER JOIN quotes_panels ON quotes.wp_user_id
Two quotes from the C++ standard, §1.8: An object is a region of storage.
I am using the CURL c++ api to get quotes from Yahoo's financial API.
When importing a CSV file into Excel, it only strips the double-quotes from the
I need remove the quotes from the names of the columns in many tables

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.