<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Aggregate on Zhuifeng Notes</title><link>https://0607501b.wangpeng.pages.dev/en/tags/aggregate/</link><description>Recent content in Aggregate on Zhuifeng Notes</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 12 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://0607501b.wangpeng.pages.dev/en/tags/aggregate/index.xml" rel="self" type="application/rss+xml"/><item><title>Applying DDD Aggregates in a Banking ECIF</title><link>https://0607501b.wangpeng.pages.dev/en/architecture/ddd-aggregate/</link><pubDate>Wed, 12 Aug 2026 00:00:00 +0000</pubDate><guid>https://0607501b.wangpeng.pages.dev/en/architecture/ddd-aggregate/</guid><description>&lt;p&gt;In an ECIF, the concept of &amp;ldquo;customer&amp;rdquo; is huge: retail, corporate, and interbank clients each have different attributes, relationships, and lifecycles. Forcing them into one giant &lt;code&gt;Customer&lt;/code&gt; entity makes the code rot fast.&lt;/p&gt;&#10;&lt;h2 id="slice-by-bounded-context"&gt;Slice by bounded context&lt;/h2&gt;&#10;&lt;p&gt;Split the customer across bounded contexts:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Party (master data)&lt;/strong&gt;: unified natural-person / institution identity and base attributes.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Profile&lt;/strong&gt;: risk appetite, marketing tags — high read/write churn.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Relationship&lt;/strong&gt;: shareholding, guarantee, and group relationships.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="where-the-aggregate-root-goes"&gt;Where the aggregate root goes&lt;/h2&gt;&#10;&lt;p&gt;Each context defines its own aggregate root. In Party, &lt;code&gt;Party&lt;/code&gt; is the root; &lt;code&gt;Address&lt;/code&gt; and &lt;code&gt;Contact&lt;/code&gt; are value objects, keeping cross-aggregate calls out of the consistency boundary.&lt;/p&gt;</description></item></channel></rss>