<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sander Dijkhuis on Medium]]></title>
        <description><![CDATA[Stories by Sander Dijkhuis on Medium]]></description>
        <link>https://medium.com/@s89?source=rss-9fa4cc835610------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XqUhV3wbpJvMonmBABkgcA.jpeg</url>
            <title>Stories by Sander Dijkhuis on Medium</title>
            <link>https://medium.com/@s89?source=rss-9fa4cc835610------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 07:26:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@s89/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to apply Domain-Driven Design using Baker]]></title>
            <link>https://medium.com/ing-blog/how-to-apply-domain-driven-design-using-baker-84e6f773c7a3?source=rss-9fa4cc835610------2</link>
            <guid isPermaLink="false">https://medium.com/p/84e6f773c7a3</guid>
            <category><![CDATA[domain-driven-design]]></category>
            <category><![CDATA[eventstorming]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[scala]]></category>
            <category><![CDATA[process-orchestration]]></category>
            <dc:creator><![CDATA[Sander Dijkhuis]]></dc:creator>
            <pubDate>Mon, 21 Sep 2020 13:48:09 GMT</pubDate>
            <atom:updated>2020-09-21T13:48:09.950Z</atom:updated>
            <content:encoded><![CDATA[<p>In our first article, we introduced <a href="https://medium.com/ing-blog/applying-domain-driven-design-with-baker-at-cleverbase-f8fce7d5b6b0">how Cleverbase started reinforcing its use of Domain Driven Design (DDD) with ING’s Baker library</a>. Now, we will explain the mapping of DDD concepts to the Baker domain-specific language.</p><p>At Cleverbase, the team was learning about DDD and business process design using Baker at the same time, and we needed to discover how concepts in each domain map to others. The following part isn’t a DDD tutorial and assumes working knowledge of DDD. If you’re new to DDD or want to learn more, check:</p><ul><li>the <a href="https://domainlanguage.com/ddd/">Domain-Driven Design</a> book and the <a href="https://domainlanguage.com/wp-content/uploads/2016/05/DDD_Reference_2015-03.pdf">DDD Reference</a> by Eric Evans,</li><li><a href="https://fsharpforfunandprofit.com/books/#domain-modeling-made-functional-ebook-and-paper">Domain Modeling Made Functional</a>,</li><li><a href="https://www.manning.com/books/functional-and-reactive-domain-modeling">Functional and Reactive Domain Modeling</a>,</li><li><a href="https://virtualddd.com/learning-ddd">resources selected by the Virtual DDD community</a>.</li></ul><p>DDD terms are marked in <em>italic</em>, while Baker terms are hyperlinks to the Baker <a href="https://ing-bank.github.io/baker/">documentation</a>.</p><p>Before you start prototyping, pick a process within the <em>domain</em>. Whenever analyzing or designing within this <em>domain</em>, aim to speak and evolve the <em>ubiquitous language</em> associated with the <em>domain</em>. You could use event-storming (see <a href="https://virtualddd.com/learning-ddd/ddd-crew-eventstorming-glossary-cheat-sheet">EventStorming Glossary &amp; Cheat Sheet</a>) to discover the process through its <em>domain event</em>s — pay attention to the lilac “policy” notes which often indicate a business process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*scdT3-zcq-1OHzwkcexayA.png" /><figcaption><em>Illustration of event-storming, inspired by the </em><a href="https://pavkin.ru/aecor-part-5/"><em>blog article about the Aecor library and process managers</em></a><em> by Vladimir Pavkin.</em></figcaption></figure><p>We will use Baker to design and implement a lightweight <em>process manager</em> to maintain the process state and determine the next step based on intermediate results. This <em>process manager</em> exists within a <em>bounded context</em>: a subsystem in the solution that corresponds to the <em>domain</em>, or to a <em>subdomain</em> if it can be broken down without losing coherence. Whenever making a design decision in this <em>bounded context</em>, be aware of how it affects the <em>domain model</em>.</p><p>Let’s look at the patterns and definitions of DDD and how they map to Baker <a href="https://ing-bank.github.io/baker/sections/concepts/">concepts</a>.</p><p>DDD breaks down <em>domain activity</em> into three categories of messages:</p><ul><li>A <em>command</em> is a request to perform an action and is implemented as an <a href="https://ing-bank.github.io/baker/sections/concepts/#interaction">interaction</a> in Baker. Execution of a <em>command</em> modifies an underlying system of record, and results in one or more <em>domain event</em>s or in a <em>rejection</em>. In Baker, either is modelled as a single <a href="https://ing-bank.github.io/baker/sections/concepts/#event">interaction output</a>, and any interaction may result in one of the specified interaction outputs.</li><li>A <em>domain event</em> is a historical fact recorded by the system. If the <em>domain event</em> is triggered externally, it maps 1:1 to a <a href="https://ing-bank.github.io/baker/sections/concepts/#event">sensory event</a> in Baker.</li><li>A <em>query</em> is a read-only operation, that could either be an interaction in Baker that performs a lookup of some sort (check resource availability in an inventory for example); or a call to one of Baker <a href="https://ing-bank.github.io/baker/sections/development-life-cycle/bake-fire-events-and-inquiry/">APIs</a>, to retrieve the current state (list of ingredients known already) of a recipe instance or what is known to have happened (list of events) for it.</li></ul><p>A <em>process manager</em> implements one or more <a href="https://ing-bank.github.io/baker/sections/concepts/#recipe">recipes</a>. Each recipe describes policies regarding which <em>commands</em> and <em>queries</em> should be triggered upon <em>domain event</em>s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zd5Lmj0bocRjDCvhZTyN3Q.png" /><figcaption>A recipe for the same process.</figcaption></figure><p>Another building block in DDD is the <em>domain object</em>, which can be further broken down into the following categories:</p><ul><li>A <em>value object</em> contained in a message is modelled as an <a href="https://ing-bank.github.io/baker/sections/concepts/#ingredient">ingredient</a> in Baker. Note that, within a <a href="https://ing-bank.github.io/baker/sections/reference/main-abstractions/#recipe-and-recipeinstance">recipe instance</a>, the value of an ingredient may be overwritten by several <em>value objects</em> over time.</li><li>An <em>entity</em> is modelled in Baker as an ingredient of String <a href="https://ing-bank.github.io/baker/sections/reference/baker-types-and-values/">type</a> holding its unique key. Applying <em>queries</em> may produce entity attributes, which are again like other <em>value object</em>s represented using ingredients.</li></ul><p>All names of messages and ingredients should match the <em>ubiquitous language</em>. It often helps to evolve the recipes and the glossary at the same time.</p><p>The <em>commands</em> and data lookup <em>queries</em> are usually implemented in <em>services</em>, which can be plain functions (“serverless”) or local or remote services within some bounded context. These <em>services</em> may perform side-effects, implement <em>factories</em> to create <em>entities</em>, protect <em>aggregate</em> boundaries, and persist data in <em>repositories</em>.</p><p>When integrating with external systems, Baker naturally leads implementing an <em>anti-corruption layer</em> by forcing to translate the system calls and callbacks to <em>commands</em>, <em>queries</em>, and <em>domain events</em>. If <em>ingredients</em> need to be transformed as part of such an <em>anti-corruption layer</em>, these transformations can be implemented as just another <em>command</em>: a Baker interaction which is a pure function.</p><p>Domain-Driven Design is one of the core tools that Cleverbase uses as a way to reduce complexity of its services. With Baker, Cleverbase found a compatible approach to keep applying DDD while maintaining a clear overview of the various processes in the company and thus keeping a high velocity in a dynamic environment full of changing requirements.</p><p>In the next post of the series, we will focus more on lessons learned along the way that made our use of Baker more effective over time.</p><p>Till next time!</p><p><em>If you need more information or have questions about Baker, feel free to open an </em><a href="https://github.com/ing-bank/baker/issues"><em>issue on GitHub</em></a><em>. This guest post was co-written with Nikola Kasev from ING Labs. If you want to know more about Cleverbase (</em><a href="https://cleverbase.com/en/job/backend-developer-scala-engineer-vacature/"><em>we’re hiring!</em></a><em>), </em><a href="https://twitter.com/s89"><em>contact Sander Dijkhuis</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84e6f773c7a3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ing-blog/how-to-apply-domain-driven-design-using-baker-84e6f773c7a3">How to apply Domain-Driven Design using Baker</a> was originally published in <a href="https://medium.com/ing-blog">ING Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Applying Domain-Driven Design with Baker at Cleverbase]]></title>
            <link>https://medium.com/ing-blog/applying-domain-driven-design-with-baker-at-cleverbase-f8fce7d5b6b0?source=rss-9fa4cc835610------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8fce7d5b6b0</guid>
            <category><![CDATA[scala]]></category>
            <category><![CDATA[domain-driven-design]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[process-orchestration]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Sander Dijkhuis]]></dc:creator>
            <pubDate>Tue, 21 Jul 2020 14:17:25 GMT</pubDate>
            <atom:updated>2020-08-27T15:20:16.620Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://github.com/ing-bank/baker">Baker</a> is an open source Scala library developed by ING for process orchestration. This is the first in a series of articles about the collaboration between ING as a producer of the library and Cleverbase as a user of it.</p><h3>What is Cleverbase?</h3><figure><img alt="The logo of Cleverbase" src="https://cdn-images-1.medium.com/max/1024/0*68O-2JsfGPxtLMYB" /></figure><p><a href="https://cleverbase.com/en/">Cleverbase</a> is a Qualified Trust Service Provider, <a href="https://cleverbase.com/en/qualifications/">following European regulations and under strict Dutch government supervision</a>. The company enables citizens, professionals and organizations to manage their own digital identity and act with legal force online.</p><p>For example, after <a href="https://cleverbase.com/en/registering/">registering a Cleverbase identity</a>, individuals can <a href="https://cleverbase.com/en/e-signing/">sign electronic documents</a> with the same legal force as pen-and-paper signatures. This enables entrepreneurs to <a href="https://www.youtube.com/watch?v=SzkIRXTWA50">join a tender fully from home while in pandemic lockdown</a> (video with English subtitles).</p><h3>How did it all start with DDD at Cleverbase?</h3><p>As a scale-up, Cleverbase started to revise its software architecture in 2019 to select patterns and frameworks that enable growth while maintaining high-quality software. While the existing software was secure, compliant, and reactive, lead times for changes had started to increase. It turns out that it is difficult to reuse capabilities in new products, share domain knowledge with new colleagues, and manage complicated integrations with external systems. The team needed to perform the <a href="https://www.thoughtworks.com/radar/techniques/inverse-conway-maneuver">Inverse Conway Maneuver</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_uc1aUBRbV1Jdeu6" /></figure><p>A main pillar in the renewed architecture is applying <a href="https://martinfowler.com/bliki/DomainDrivenDesign.html">Domain-Driven Design</a> (DDD): an attitude to product development that emphasizes creative collaboration between domain experts and engineers. Together with an event-driven architecture and functional programming style, DDD helps Cleverbase to reduce friction and accidental complexity.</p><p>Cleverbase applies DDD and functional programming to backend services in its <a href="https://medium.com/nick-tune-tech-strategy-blog/core-domain-patterns-941f89446af5">core domains</a>. A core domain consists of capabilities that are business-differentiating and have high complexity. For example the domains of consent and delegation management. These domains are continuously identified and modelled while switching between concept-linked wiki and living documentation in code.</p><p>Cleverbase launched the first service with DDD and Baker at the beginning of 2020.</p><h3>How does Baker help developers and domain experts at Cleverbase collaborate?</h3><p>One challenge in DDD is to design and control various business processes, especially when these processes involve multiple systems and actors. As a result, the process functionality gets mixed with process management and persistence logic. This is a problem that Baker solves.</p><p>One major driver in the Cleverbase architecture has always been compliance-by-design: since many of the processes implemented in the company are regulated, it is important to involve business and compliance stakeholders early on in the process. From the start, we have used Business Process Modelling Notation (BPMN) to communicate and iterate on functional flows. However, BPMN for software design typically involves manual translation to and from code, which introduces risk.</p><p>Baker introduces clear semantics for business process design in software. provides an abstraction in the form of a <a href="https://ing-bank.github.io/baker/sections/reference/execution-semantics/">domain-specific language (DSL) for process recipes</a>. The generated diagrams are easy to read by both engineers and domain experts. It also enables Cleverbase to standardize on the way processes are designed and implemented without compromising with the quality of the software.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OWi0JZjdRdayctEX" /></figure><p>Initially, these semantics helped the team iterate on event-driven architecture concepts early in the design phase. By iterating on business processes using the Baker DSL, the team could quickly explore different designs and discover which events mattered the most. The automatic generation of diagrams forces the developers to use meaningful names which aligns the terms that the domain experts use with the application code.</p><p>In the next post of the series, we will focus on the mapping of DDD concepts to the Baker DSL for orchestrating business processes.</p><p>Till next time!</p><p><em>If you want to learn more about Baker, check out the </em><a href="https://github.com/ing-bank/baker/"><em>project on GitHub</em></a><em>. This guest post was co-written with Nikola Kasev from ING Labs. If you want to know more about Cleverbase (</em><a href="https://cleverbase.com/en/vacancies/"><em>we’re hiring!</em></a><em>), </em><a href="https://twitter.com/s89"><em>contact Sander Dijkhuis</em></a><em>. Thanks to </em><a href="https://twitter.com/semanticbeeng"><em>Nick Vintila</em></a><em> for introducing Baker and DDD to Cleverbase.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8fce7d5b6b0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ing-blog/applying-domain-driven-design-with-baker-at-cleverbase-f8fce7d5b6b0">Applying Domain-Driven Design with Baker at Cleverbase</a> was originally published in <a href="https://medium.com/ing-blog">ING Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>