r/DomainDrivenDesign • • Oct 06 '25

I created an open-source toolbox for Domain-Driven Design

Thumbnail
gallery
238 Upvotes

Hello everyone,

As a developer passionate about software architecture, I've noticed there's a real lack of dedicated tools for DDD workshops, especially in the context of remote work.

I decided to create a platform bringing together all the essential tools for Domain-Driven Design practice.

My project currently offers two main tools:

  • Domain Storytelling: to visualize and communicate domain knowledge through collaborative stories

  • Event Storming: to quickly discover business processes and identify bounded contexts

More tools will be added later to expand the toolbox.

It's free, open-source, and specifically designed for DDD practitioners.

GitHub project: https://github.com/poulainpi/ddd-toolbox

If you like the project, feel free to give it a ⭐ to support the development!


r/DomainDrivenDesign • • Oct 17 '25

JESUS CHRIST DDD is harder than I thought

44 Upvotes

OK. Just my rant. I thought DDD is cool and easy once you are the domain expert...

AHHHH.

I LOVE IT it though! I am forced to follow good architecture.


r/DomainDrivenDesign • • Nov 02 '25

DDD & the Simplicity Gospel

Thumbnail
oluatte.com
42 Upvotes

There is a trend online of software engineers declaring their love for simple software then blaming everyone else for the complexity in software. DDD is a frequent target / culprit in these declarations which always catches me by surprise.

I wrote about this trend and how great bashing DDD is for engagement.


r/DomainDrivenDesign • • Aug 26 '26

Is your domain model actually yours or does your database own it? [Mod-approved giveaway]

Thumbnail
gallery
41 Upvotes

Hi r/DomainDrivenDesign,

Stjepan from Manning here. Thanks to the mods for letting me share this here.

A domain model can start clean, but the boundaries often erode through convenience: ORM entities become domain objects, API contracts shape use cases, and infrastructure decisions quietly work their way inward.

That tension is at the center of Clean Applications with Hexagonal Architecture, a new Manning MEAP by Enrique Medina Montenegro. It explores how DDD and ports-and-adapters architecture can keep business rules independent of databases, frameworks, and external services—without pretending that more abstraction is always the answer.

We’re giving away five ebook copies. To enter, share in the comments:

Which technical concern has been the hardest to keep out of your domain model?

We’ll select five commenters and contact them by DM.

Book:
https://www.manning.com/books/clean-applications-with-hexagonal-architecture

Also, a 50% discount is available for the community with the code MLMONTENEGRO50RE.

I’m looking forward to reading the experiences—and architectural scars—behind the answers.

Thanks for having us.

Cheers,

Stjepan,
Manning publications


r/DomainDrivenDesign • • Apr 09 '26

Most DDD Advice Starts in the Wrong Place

40 Upvotes

This article was written by a human and lightly refined with AI for clarity and readability.

Real Domain Modeling Is Not About Renaming Service into Domain Service

There are many DDD articles and many so-called DDD demos. They usually come with a familiar vocabulary: aggregate, entity, value object, domain service, repository, bounded context. It looks complete. It looks professional. It looks like domain modeling.

But if you actually read the code, a very awkward fact appears:

they talk about the domain, but they still write service scripts.

A so-called domain service is often just an ordinary service: load data, make a few decisions, mutate a few fields, save the result. The core business invariant is not placed on a real business object. It only survives inside the execution order of the service. The names changed, the structure did not, and the business was never actually modeled.

That is the thing I want to criticize.

Real domain modeling does not begin by memorizing vocabulary and splitting a project into Entity, Repository, and Service. It begins by finding the real business object. Only then can the system actually organize itself around the business. Otherwise DDD often becomes nothing more than service mode wearing more advanced terminology.

What a real business object is

A very simple question helps:

If this object did not exist, would the system still make sense?

If the answer is no, then that object deserves to become the center of the model.

But that is still not enough. Many people accept this idea in theory and still fall back to the same implementation pattern: the service loads data, the service makes decisions, the service mutates fields, and the service saves results. In the end the so-called business object is only a better-looking data shell.

So the real point is not just whether the object exists in the system. The real point is this:

does the object actually perform business calculation and actually carry business invariants?

A real business object is not a passive structure that only stores fields, and not a helper class serving a service. At minimum it should:

  1. Receive the input required by the business

  2. Execute business rules internally

  3. Produce a complete business result

  4. Carry the key invariant instead of leaving it to service execution order

If those things are missing, then the object is not the business center.

Why many systems choose the wrong center from the beginning

Many systems start by splitting everything by nouns: user, product, order, account, book. That is not entirely wrong, but business does not stand on nouns. It stands on constraints.

What a system truly depends on is often not "what nouns appear in the system," but:

  1. What facts must hold together

  2. What results must be calculated together

  3. What invariants, if lost, make the system meaningless

That is why the real business object is often not the first noun people see. It is the object that carries the key relationship, the key result, and the key business consistency.

In bank transfer, the center is not the account. It is the transfer.

Bank transfer is the clearest example.

Many people assume the center of a transfer system must be the account. After all, accounts have balances, and transfer eventually changes two balances.

So the code often becomes:

  1. Load the source account

  2. Load the target account

  3. Check whether the balance is enough

  4. Subtract from one account

  5. Add to the other account

  6. Save both accounts

That code can run, but the problem is obvious:

the business itself was never modeled.

What matters is not that two accounts changed. What matters is that a transfer happened. What matters is not that some fields happened to be updated. What matters is that the transfer must satisfy a full set of business constraints:

  1. The source amount cannot exceed the available balance

  2. Value must be conserved before and after transfer

  3. Fees must be calculated

  4. Tax rules must be applied

  5. Some account types may forbid some transfers

  6. Large transfers may require extra rules

If all of that stays inside a service, the system has not modeled transfer. It only scripted a flow that changes two balances.

So in this example the real business object is not Account. It is Transfer.

Without Transfer, the system has no proper expression of transfer itself. It only has tables, fields, and save operations.

A common but wrong pattern: renaming a service into DomainService

Many DDD examples online go one step further and rename the flow service into TransferDomainService to make it look more domain-driven:

public class TransferDomainService {

    private final AccountRepository accountRepository;
    private final TaxService taxService;
    private final RiskControlService riskControlService;

    public void transfer(String fromAccountId, String toAccountId, BigDecimal amount) {
        Account from = accountRepository.findById(fromAccountId);
        Account to = accountRepository.findById(toAccountId);

        if (from.getBalance().compareTo(amount) < 0) {
            throw new IllegalArgumentException("Insufficient balance");
        }

        if (!riskControlService.allowTransfer(from, to, amount)) {
            throw new IllegalArgumentException("Transfer rejected by risk control");
        }

        BigDecimal tax = taxService.calculate(amount);

        from.setBalance(from.getBalance().subtract(amount).subtract(tax));
        to.setBalance(to.getBalance().add(amount));

        accountRepository.save(from);
        accountRepository.save(to);
    }
}

This kind of code is misleading precisely because it already has the visual shape of DDD: entities, repositories, a so-called domain service, and even tax and risk dependencies.

But the problem did not change.

The real business object, Transfer, still does not exist. The real calculation and the real invariant are still trapped in the service.
In other words, this is not a business object carrying the business. It is just a better-named service carrying the business.

So the issue is never whether the class is called Service or DomainService.
The issue is this: is the business really carried by an object, or is it still only assembled by a flow?

Another way to discover the real business object: look at what hurts when you test the system

Many people look for business boundaries by starting with nouns: account, order, inventory, tax, risk control.
But there is a more direct and more honest method: look at what actually hurts when you try to test the system.

Suppose you only want to verify one core business rule:

"Transfer 100 from account A to account B, apply risk control, apply tax and fees, and make sure the result is correct."

That should be a very pure business validation.
Yet in many systems, to validate that one rule, you end up having to start:

  1. The account system

  2. The payment system

  3. The risk-control system

  4. The tax system

  5. The audit system

  6. The database, cache, and message infrastructure

At that point you realize that you are supposedly testing "transfer," yet you have to boot half the platform just to do it.

That pain is not accidental.
It usually means that transfer has not been gathered into one business object that can stand on its own. Its rules were scattered across multiple services, modules, and surrounding systems, so you cannot validate "transfer itself." You can only reconstruct it by booting the entire environment.

That is an extremely valuable signal:

the parts you are forced to drag into the same test often reveal where the real business object actually is.

So one practical way to discover the real business object is to ask:

  1. Which rules always participate in the same calculation?

  2. Which data always has to appear together?

  3. Which results must always hold together?

  4. And to verify them, do you always need to boot multiple systems together?

If the answer keeps pointing to the same cluster, that is usually where the real business object is hiding.

For transfer, that object is not the account repository, the tax API, or the risk-control service. It is the transfer itself.
If transfer is modeled correctly as a business object, its core rules should be calculable and testable directly in memory without pulling in the surrounding systems.

In a library system, borrowing is the center

A library system makes the same point in a different way.

Many people would mechanically split it into:

  1. User domain

  2. Book domain

  3. Borrowing domain

  4. Fine domain

It looks neat, but the real question is:

who decides whether a user can borrow a book?

The book object may know inventory, but it does not know the user's credit, overdue state, or borrowing history.
The user object may know its own credit and borrow count, but it does not know whether the target book is available.

So the question belongs to borrowing itself.

The right question is not:

"Can this user borrow?"
"Is this book borrowable?"

The right question is:

in this borrowing event, can this user borrow this specific book?

That is why borrowing, not user and not book, becomes the real business center.

Once the business object is clear, how should it be used?

At that point a practical question appears:

how does this actually land in code?

The structure is simple. A healthy business flow usually has three steps:

  1. Service queries the necessary data

  2. The data is handed to the business object to calculate the result

  3. The result is persisted

In other words:

  • Service orchestrates

  • Domain calculates

  • Repository persists

The important point is that step two must really exist.

If the service still performs the real decisions, real calculations, and real invariants by itself, then you only have the form of a domain layer while still remaining in service mode.

The proper shape of transfer

Once transfer is treated as the business object, the flow should look like this:

public class TransferService {

    private final AccountRepository accountRepository;
    private final TransferRuleRepository transferRuleRepository;

    public void transfer(String fromAccountId, String toAccountId, BigDecimal amount) {
        Account from = accountRepository.findById(fromAccountId);
        Account to = accountRepository.findById(toAccountId);
        List<TransferRule> rules = transferRuleRepository.findRules(from, to, amount);

        Transfer transfer = new Transfer(
                from.getBalance(),
                to.getBalance(),
                amount,
                rules
        );

        TransferResult result = transfer.execute();

        from.setBalance(result.getNewFromBalance());
        to.setBalance(result.getNewToBalance());

        accountRepository.save(from);
        accountRepository.save(to);
    }
}

And the business rules should actually live inside Transfer:

public class Transfer {

    private final BigDecimal fromBalance;
    private final BigDecimal toBalance;
    private final BigDecimal amount;
    private final List<TransferRule> rules;

    public Transfer(BigDecimal fromBalance,
                    BigDecimal toBalance,
                    BigDecimal amount,
                    List<TransferRule> rules) {
        this.fromBalance = fromBalance;
        this.toBalance = toBalance;
        this.amount = amount;
        this.rules = rules;
    }

    public TransferResult execute() {
        if (fromBalance.compareTo(amount) < 0) {
            throw new IllegalArgumentException("Insufficient balance");
        }

        BigDecimal totalFee = BigDecimal.ZERO;
        for (TransferRule rule : rules) {
            totalFee = totalFee.add(rule.fee(fromBalance, toBalance, amount));
        }

        BigDecimal totalDebit = amount.add(totalFee);
        if (fromBalance.compareTo(totalDebit) < 0) {
            throw new IllegalArgumentException("Insufficient balance for transfer and fee");
        }

        BigDecimal newFromBalance = fromBalance.subtract(totalDebit);
        BigDecimal newToBalance = toBalance.add(amount);

        return new TransferResult(newFromBalance, newToBalance, amount, totalFee);
    }
}

What matters here is not elegance for its own sake. What matters is that responsibility is finally correct:

  1. TransferService no longer owns the transfer rules

  2. Transfer truly owns the transfer business

  3. The database only stores the result

The proper shape of borrowing

Borrowing follows the same pattern.

Once borrowing is recognized as the business object, the right flow becomes:

  1. Service queries user, book, and borrowing history

  2. The data is handed to the borrowing business object

  3. The business result is produced

  4. The result is persisted

public class BorrowService {

    private final UserRepository userRepository;
    private final BookRepository bookRepository;
    private final BorrowRecordRepository borrowRecordRepository;
    private final BorrowChecker borrowChecker;
    private final DueDateCalculator dueDateCalculator;

    public BorrowRecord borrow(String userId, String isbn) {
        User user = userRepository.findById(userId);
        Book book = bookRepository.findById(isbn);
        boolean hasOverdue = borrowRecordRepository.hasOverdueBooks(userId);
        boolean hasBorrowedSameBook = borrowRecordRepository.hasBorrowedBook(userId, isbn);

        BorrowCheckResult checkResult = borrowChecker.check(
                user.getCreditScore(),
                user.getCurrentBorrows(),
                hasOverdue,
                hasBorrowedSameBook
        );

        if (!checkResult.canBorrow()) {
            throw new IllegalArgumentException(checkResult.getReason());
        }

        LocalDate borrowDate = LocalDate.now();
        LocalDate dueDate = dueDateCalculator.calculate(borrowDate);

        BorrowRecord record = BorrowRecord.create(
                UUID.randomUUID().toString(),
                userId,
                isbn,
                borrowDate,
                dueDate
        );

        borrowRecordRepository.save(record);
        bookRepository.save(book.decreaseAvailable());
        userRepository.save(user.incrementBorrows());

        return record;
    }
}

The pattern is the same:

  1. Service loads data

  2. Domain calculates

  3. Repository stores the result

Different systems look different only in one decisive place: what the true business object actually is.

Why services should not call other services

If a service represents one user-visible business operation, then it is effectively a use case, which means an orchestration layer.

In that case, one service calling another service usually means the business boundary is wrong. One operation unit should not need another operation unit to explain itself.

A better structure is:

  1. One service depends directly on the repositories it needs

  2. One service invokes the business objects it needs

  3. One service takes responsibility for one complete business result

That is how responsibilities stay clear.

Why in-memory testability matters

Many systems claim to have a domain layer. But if that layer is only a collection of hollow entities while the real business logic still lives inside services, then the modeling was never completed.

The real difference is not whether the project has a package called domain.
The real difference is whether, after the service loads the data, a real business object takes over, calculates the result, and carries the invariant.

If that is true, then the core rules should be testable in memory without booting a database, Spring, HTTP, or external systems.

That is one of the strongest signs that the business has finally been placed where it belongs.

Conclusion

Real domain modeling is not about looking like DDD. It is about putting the business inside the object.

If the key invariant of a system:

  1. does not live in a business object

  2. cannot run independently from the framework

  3. survives only through service execution order

  4. loses meaning as soon as the services are split

then no matter how complete the terminology looks, the system is still in service mode.

If, instead, a system:

  1. finds the truly indispensable business object

  2. places the invariant on that object

  3. pushes service back to orchestration

  4. makes business rules independently testable in memory

then it is much closer to real domain modeling, even if it looks nothing like mainstream DDD demos.

My Demo Project:https://github.com/cypress927/real-business-ddd


r/DomainDrivenDesign • • May 27 '25

Open source DDD project, to learn DDD

36 Upvotes

I've been working on an open-source project for the past two months to learn Domain-Driven Design (DDD). I'd love to collaborate with others who are also interested in DDD and software architecture.

If you're curious, check out the project! If it interests you, feel free to clone the repo, get familiar with the codebase, and start contributing. I would appreciate any help to the project.

Github repository : https://github.com/MstfTurgut/hotel-reservation-system


r/DomainDrivenDesign • • Aug 20 '26

Domain-Driven Design matters more when AI writes your code

Thumbnail
threedots.tech
35 Upvotes

r/DomainDrivenDesign • • Apr 21 '26

I added a Bounded Context Canvas tool to my open-source DDD toolbox

26 Upvotes

A few months ago I shared my open-source DDD toolbox in this post. Today I'm happy to announce a new tool: Bounded Context Canvas!

The Bounded Context Canvas is a collaborative modelling tool for designing and documenting a single bounded context. It covers:

  • Name and purpose — what the context is responsible for

  • Strategic classification — domain role, business model pattern, and evolution stage

  • Inbound and outbound communication — how this context interacts with others

  • Ubiquitous language and business decisions — the key terms and rules

  • Assumptions, open questions, and verification metrics — for ongoing refinement

The tool guides you step by step: no freeform fields, just focused dialogs with everything you need to fill the canvas easily.

The toolbox now has three tools:

  • Domain Storytelling

  • Event Storming

  • Bounded Context Canvas

All free, open-source, no account needed.

GitHub project: https://github.com/poulainpi/ddd-toolbox

If you like the project, feel free to give it a ⭐ to support the development!


r/DomainDrivenDesign • • Feb 01 '26

Which folder structure is more intuitive?

26 Upvotes

If you were to inherit a project, which one looks more intuitive, A or B?

Structure A

src/
+-- Domain/
¦   +-- Admin/
¦   ¦   +-- AdminEntity
¦   ¦   +-- AdminRepoInterface
¦   +-- Supplier/
¦   ¦   +-- SupplierEntity
¦   ¦   +-- SupplierRepoInterface
¦   +-- Customer/
¦   ¦   +-- CustomerEntity
¦   ¦   +-- CustomerRepoInterface
¦   +-- Order/
¦       +-- OrderEntity
¦       +-- OrderRepoInterface
¦
+-- App/
¦   +-- Admin/
¦   ¦   +-- UseCase/
¦   ¦       +-- ActivateSupplier
¦   ¦       +-- BanCustomer
¦   +-- Supplier/
¦   ¦   +-- UseCase/
¦   ¦       +-- UpdateInventory
¦   ¦       +-- MarkOrderAsShipped
¦   +-- Customer/
¦   ¦   +-- UseCase/
¦   ¦       +-- PlaceOrder
¦   ¦       +-- UpdateProfile
¦   +-- Order/
¦       +-- UseCase/
¦           +-- ReceiveOrder
¦           +-- CancelOrder
¦
+-- Infra/
¦   +-- Persistence/
¦   +-- Messaging/
¦   +-- etc...

Structure B

src/
+-- Core/
¦   +-- Admin/
¦   ¦   +-- UseCase/
¦   ¦   ¦   +-- ActivateSupplier
¦   ¦   ¦   +-- BanCustomer
¦   ¦   +-- AdminEntity
¦   ¦   +-- AdminRepoInterface
¦   ¦
¦   +-- Supplier/
¦   ¦   +-- UseCase/
¦   ¦   ¦   +-- UpdateInventory
¦   ¦   ¦   +-- MarkOrderAsShipped
¦   ¦   +-- SupplierEntity
¦   ¦   +-- SupplierRepoInterface
¦   ¦
¦   +-- Customer/
¦   ¦   +-- UseCase/
¦   ¦   ¦   +-- PlaceOrder
¦   ¦   ¦   +-- UpdateProfile
¦   ¦   +-- CustomerEntity
¦   ¦   +-- CustomerRepoInterface
¦   ¦
¦   +-- Order/
¦       +-- UseCase/
¦       ¦   +-- ReceiveOrder
¦       ¦   +-- CancelOrder
¦       +-- OrderEntity
¦       +-- OrderRepositoryInterface
¦
+-- Infra/
¦   +-- Persistence/
¦   +-- Messaging/
¦   +-- etc...

r/DomainDrivenDesign • • Apr 14 '26

The Domain Model Pattern in Practice

Thumbnail
deniskyashif.com
25 Upvotes

r/DomainDrivenDesign • • Aug 29 '26

Crossing Boundaries with Integration Events

Thumbnail
deniskyashif.com
23 Upvotes

How to turn internal domain facts into reliable contracts between bounded contexts.


r/DomainDrivenDesign • • Jan 31 '26

Best sources for learning about aggregates

23 Upvotes

What are the best sources for learning about aggregates in DDD? I'm interested in the general questions:

  • What is an aggregate?

  • What are aggregates for i.e. what benefits do they bring?

I'm also interested in general questions about how aggregates should be implemented.

Naturally, I'm aware of Domain-Driven Design: Tackling Complexity in the the Heart of Software by Eric Evans and Implementing Domain-driven Design by Vaughn Vernon, as well as Vernon's essay on Effective Aggregate Design. Are there are any other books, articles, blog posts or videos that you consider especially useful?


r/DomainDrivenDesign • • Nov 12 '25

No, Your Domains and Bounded Contexts Don’t Map 1 on 1

Thumbnail verraes.net
23 Upvotes

r/DomainDrivenDesign • • Sep 07 '26

AI made me doubt everything about programming by Felienne Hermans - DDD Europe 2026

Thumbnail
youtube.com
22 Upvotes

Few talks at Domain-Driven Design Europe have received a standing ovation, but this one did.

(Full disclosure: I work for the organiser of DDDEU)


r/DomainDrivenDesign • • Apr 17 '26

Good breakdown of how TDD actually supports DDD in practice — especially liked the part about shaping domain models through tests.

Thumbnail
youtu.be
22 Upvotes

r/DomainDrivenDesign • • Oct 23 '25

Software Engineer looking for advices

21 Upvotes

Hello !

Senior SE here, with only theorical and small side-projects DDD experience.

I'm trying to introduce my company to DDD and to start enforcing a proper architecture, since the codebase is quite a mess and everyone's tired with it

Context

The business is about freight orchestration (clients book shipments from us, we handle the rest). Classical DDD example right !

Our codebase at this point is 7 years old, badly designed microservices refactored into a modular monolith (actually not so modular at all), full typescript. Totally organized around and strongly coupled to GraphQL. Quite huge in terms of size.

In the previous months I read all i could about ddd and architecture and "clean code" despites the hate around it (blue book, red book, clean code, clean archi, etc etc)

I started teaching the team about DDD, did some workshops (event storming, example mapping,...)

Yet now I want to start taking decisions about how the heck we do things. And I'm having a hard time.

Main design question

In our model the Shipment object is at the center of everything. Around it gravitates a lot of stuff: tracking, pricing, billing, tasks, documents, customs handling... I'm having a hard time figuring a great way to model that with bounded contexts.

Would it make sense to have a kind of central Shipping BC that handles the lifecycle of a Shipment, and a lot of other BC's (Billing, Pricing, Documents, ...) around it that communicate with it ? (e.g the billing needs to know about the shipment's characteristics and what was priced)

I understand BC's should be very losely coupled and communicate in a very defined way. Yet with that architecture, all BC's will have to communicate a lot between them since a lot of stuff is shared. Isn't that a smell that those BC's should be a single BC ? (= everything related to "handling a shipment" in the same super huge BC)

Implementation

More of a side concern, but that's what will keep my devs attention the most..

I guess we are going for "one module per bounded context", with layers:
- interface: what the BC exposes to the users (graphql) and to other BC's (api)
- application: orchestration of use cases
- domain: pure logic
- dependencies: what the BC calls in terms of DB and calling other BC's
How about BC communication ? Is this ok to:
- each BC defines an interface usable by other BC's in its interface layer
- other BC's define what they need in their application layer (port)
- their dependencies layer implement that port and fetch what's needed from other bc's interfaces

Is this a good approach ?
I'm worried i'm over-complicating stuff

Thanks in advance!

P.S: By the way if someone would like to chat via discord i would love to find a kind of mentor that is used to these kinds of problems !


r/DomainDrivenDesign • • Aug 28 '25

virtual meetups for DDD

20 Upvotes

Im looking for active virtual communities around DDD. Any recommendations?


r/DomainDrivenDesign • • May 30 '26

The opinionated Java DDD template I've refined across multiple projects

19 Upvotes

After working on multiple Java backends, I noticed I was recreating the same architecture, patterns, and setup over and over.

So I decided to extract everything into a starter kit that reflects how I currently build production-grade applications.

It's still evolving, and I'd genuinely love feedback from other Java developers:

Repository:

DDD Starter Kit

Curious to hear from yalll


r/DomainDrivenDesign • • Nov 25 '22

I wrote a (long) introduction on DDD and I'd like some feedback

17 Upvotes

Having collected notes about DDD for the past few weeks, I gathered my acquired knowledge into an introductory article.

I know DDD is hard to get into, and I'd love to get your feedback.
Here's the link =>

https://medium.com/@Ancyr/a-gentle-introduction-to-domain-driven-design-dc7cc169b1d

Thanks you !


r/DomainDrivenDesign • • Mar 26 '26

Ontologic: A TypeScript toolkit that makes DDD patterns ergonomic

16 Upvotes

If you practice DDD in TypeScript, you know the gap between the theory and what ends up in our codebase. Mutable entities, invariants checked in random places, exceptions flying across boundaries, events bolted on as an afterthought.

Ontologic is a light toolkit I built to close that gap. Entities own and enforce their own state. Invariants run on every read, not just after specific operations. Domain events are immutable, versioned facts. Domain errors are typed return values, not hidden exceptions.

No framework lock-in, no heavy abstractions — just the building blocks that let your code speak the language of your domain.

ontologic.site

Would love feedback from people who've fought these same battles.


r/DomainDrivenDesign • • Jul 05 '24

Are there any books or other sources which give concrete practical examples of Domain Driven Design?

16 Upvotes

Years ago I tried to delve into Domain Driven Design and apply its principles to a fresh web application software project we started back then.

The most challenging part to me was finding examples that correctly demonstrated the theory in a practical way, i.e. *actual code* which made it hard to grasp the benefits of the approach. And even if I understood a concept, it was hard to explain it to others through code.

Is it because DDD is on a "high layer" so it doesn't map into actual code very well, as the code itself is too "low layer"?

In my experience technical details and the DDD theory didn't go hand to hand. As an example, if you are using ORM, your data classes have to have a certain structure to be able to map into relational tables, meaning DDD 'Entities' and ORM 'Entities' are two different things, which meant a lot of manual copying between objects.

Are there sources which show the correct implementation of theory within the confines of a programming language and framework, such as Java and Spring?


r/DomainDrivenDesign • • Apr 26 '26

DDD Workflow

15 Upvotes

Hey everyone,

I’m a programming enthusiast currently diving into Domain-Driven Design. I have to confess: I haven't read the famous "Blue Book" (Eric Evans) yet, but I'm trying to wrap my head around the practical application of these concepts.

To get a sense of the big picture, I asked Claude to generate a step-by-step workflow going from the initial domain discovery all the way down to the very first line of code. It gave me this sequence:

  1. Event Storming

  2. Event Modeling

  3. Ubiquitous Language

  4. Bounded Context Canvas

  5. Domain Modeling

  6. ADR (Architecture Decision Record)

  7. Event Schema

  8. API Contract

  9. First Line of Code

Since I don't have industry experience with DDD yet, I wanted to ask you experienced devs:

  • Is this how it actually works in professional tech companies?

  • Or is this just a theoretical utopia that AI spits out?

  • In the real world, what steps do you actually use, skip, or merge when starting a new project or context?

Thanks!

PS: AI generated. English is not my native language. But the questions are legit.


r/DomainDrivenDesign • • Oct 31 '22

Domain Layer Structure & Skeleton | Clean Architecture & DDD From Scratch Tutorial | Part 13

Thumbnail
youtu.be
15 Upvotes

r/DomainDrivenDesign • • May 29 '19

Are there any good open source examples of DDD?

15 Upvotes