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 9256411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:56:04+00:00 2026-06-18T11:56:04+00:00

On page 134 ( DDD: Tackling Complexity in the Heart of Software ) author

  • 0

On page 134 ( DDD: Tackling Complexity in the Heart of Software ) author improves Purchase Order model by making Purchase Order PO an Aggregate Root containing PO Line Items, while Part entity is made a root of its own Aggregate ( making Part an Aggregate root does make sense, since parts will be shared by many POs ):

An implementation consistennt with this model would guarantee the
invariant relating PO and its items, while changes to the price of a
part would not have to immediately affect the items that reference it.

…

But this is not an invariant that must be enforced at all times. By
making the dependency of line items on parts looser, we avoid
contention and reflect the realities of the business better. At the
same time, tightening the relationship of the PO and its line items
guarantees that an important business rule will be followed.

Author argues that changes to the part prices don’t have to immediately propagate to the PO aggregates that reference it, since:

  • locking the part when particular PO is being updated may cause contention ( due to the possibility of several POs simulaneously trying to get a lock on the same part )

  • parts get modified less frequently than POs and as such chances of POs having invalid data are relatively small

a) I understand author’s arguments, but shouldn’t the consistency of PO be a top priority in such a model and as such parts should be locked together with POs being updated, even at the risk of contention?

b) In contrast, on pages 176, 177 author did find it necessary to enforce invariants spanning two aggregates within single transaction ( ie when Handling Event is added, Delivery History should also be updated accordingly within the same transaction ):

The Delivery History holds a collection of Handling Events relevant to
its Cargo and new object must be added to this collection as part of
the transaction. If this back-pointer were not created, the objects
would be inconsistent.

…

The need to update Delivery History when adding a Handling Event gets
the Cargo AGGREGATE involved in the transaction.

I can’t figure out why would maintaining consistency within single transaction be more important in this example than in PO example?

Note ( I’m assuming that by “back-pointer” he’s referring to Handling Event instance? )

c) Is there a particular reason why author didn’t as an alternative propose an implementation of Optimistic Concurency check, where Parts table would contain a rowversion field, which our code would inspect each time some PO was being updated?

d) Btw, why must Price value be copied into Line Item ( Figure 6.11, page 134 )? Can’t PO‘s invariants check the price by inspecting Part entity?

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-18T11:56:06+00:00Added an answer on June 18, 2026 at 11:56 am

    A PO, once placed, can be regarded as an immutable event. This is why the price value must be copied. Future changes in price should not be reflected on existing POs – that would be a violation of business rules. This is why the relationship between a PO and the Part can and should be loosened. This is also why these consistency characteristics apply to a PO but not in the other scenario.

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

Sidebar

Related Questions

I have the following page I'm working on: http://69.134.44.19:8000/products.html?v=products In Google Chrome and Firefox,
page.xml contains: <default translate=label module=page> <label>All Pages</label> <reference name=root> <action method=addBodyClass><className>testing</className></action> </reference> Yet it's
Check out the bottom of this page in Chrome (10.0.648.134): http://seatgeek.com/jobs/ The page mysteriously
The page Protecting Your Cookies: HttpOnly explains why making HttpOnly cookies is a good
Page of the application with the TextBlock and Button, also involved .txt document with
Page 239 of Agile Web Development with Rails instructs us to add the vendor/cache
Page A has a meta refresh to redirect to another page, C , after
Page has menu items that would replace a 'div id=foo_(current menu item)' with 'div
Page in question: http://phwsinc.com/our-work/one-rincon-hill.asp In IE6-8, when you click the left-most thumbnail in the
page contents: aa<b>1;2'3</b>hh<b>aaa</b>.. .<b>bbb</b> blabla.. i want to get result: 1;2'3aaabbb match tag is

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.