- Preface
- How to Read This Book
- Part I - Domain-Driven Design from Zero
- 1. Why Domain-Driven Design Exists
- 2. Domain, Model, and Language
- 3. Entities: Objects with Identity
- 4. Value Objects: Meaning Without Identity
- 5. Aggregates and Aggregate Roots
- 6. Repositories and Persistence Ignorance
- 7. Domain Services and Application Services
- 8. Domain Events
- 9. Bounded Contexts
- 10. Context Maps and Integration Boundaries
- Part II - Reading NEXUS-1 as a Domain Model
- 11. NEXUS-1 as a Domain, Not Just a Dashboard
- 12. The NEXUS-1 Ubiquitous Language
- 13. The Main Subdomains of NEXUS-1
- 14. Core, Supporting, and Generic Domains
- 15. Bounded Contexts in the NEXUS-1 Platform
- 16. Aggregates in NEXUS-1
- 17. Domain Events in NEXUS-1
- 18. Commands, Decisions, and Recommendations
- 19. Context Relationships and Passports
- 20. The NEXUS-1 Context Map
- Part III - Implementing DDD in NEXUS-1
- 21. From Bounded Context to Project Structure
- 22. From Bounded Context to SQL Schema
- 23. From Aggregate Root to C# Entity
- 24. From Value Object to Owned Type
- 25. From Domain Rule to Method
- 26. From Command to Application Service
- 27. From Domain Event to Audit Entry
- 28. Repositories, DbContext, and Unit of Work
- 29. Queries, Read Models, and Reporting Screens
- 30. Final Architecture: Domain, Data, Twin, and Decision
- Sources and Reference Notes
- Glossary
- Index
- Finalization Checkpoint
FROM DOMAIN TO TWIN
Learn Domain-Driven Design from zero in plain language, then see it applied to NEXUS-1: a digital-twin architecture with signals, alarms, root-cause cases, policies, audit, SQL, and EF Core. A practical guide for .NET developers who want clearer language, boundaries, rules, and meaning in complex systems.
Minimum price
$99.99
$139.98
You pay
Author earns
About
About the Book
About the Book
Have you ever worked on a system where the code, the database, and the business language slowly stopped agreeing with each other?
A table says one thing.
A service says another.
A controller knows too much.
An entity is only an anemic bag of properties.
A “rule” lives in five different places.
And everyone uses the same word — Unit, Event, Case, Model, Policy — with slightly different meanings.
From Domain to Twin is written to solve that problem from the ground up.
This book teaches Domain-Driven Design from zero, in plain human language, for mid-level .NET developers who already understand C#, EF Core, SQL tables, APIs, services, DTOs, and application structure, but have never had DDD explained slowly and practically.
It does not begin with abstract theory. It begins with the normal developer problems you already know: confusing models, unclear service boundaries, misplaced business rules, overgrown DbContext classes, fragile database relationships, and systems where nobody is quite sure who owns the truth.
Then it introduces DDD step by step.
You will learn what a domain is, what a model is, why a shared language matters, how entities differ from value objects, why aggregates protect consistency, what repositories should and should not do, where application services belong, what domain events really mean, and how bounded contexts prevent one word from meaning five different things.
But the book does not stop at definitions.
The second half applies every idea to NEXUS-1, a browser-based industrial digital-twin demonstrator. NEXUS-1 contains a plant/fleet model, instrumentation, alarms, root-cause reasoning, digital-twin snapshots, reinforcement-learning recommendations, audit, compliance, reporting, and EF Core persistence. That makes it a much richer DDD example than the usual shopping cart, invoice, or order-processing system.
Through NEXUS-1, the book shows how DDD can organize a serious engineering-style platform:
- A
Unitis not just a string or dropdown value; it is part of the plant domain. - A
Signalis not an alarm; it is measured instrumentation data. - An
AlarmEventis not a root cause; it is a domain fact that something crossed a configured condition. - A
RootCauseCaseprotects hypotheses, evidence, rejected candidates, and final verdicts. - A
TwinDivergenceis the system admitting that the model and measured reality disagree. - A reinforcement-learning
Recommendationis not a command; it is advisory output that must stay inside its boundary. - An
AuditEntryis not log noise; it is part of the accountability story.
The final part turns the model into implementation. It connects bounded contexts to project structure, SQL schemas, EF Core mappings, aggregate roots, owned value objects, domain methods, application services, repositories, read models, reporting screens, and audit trails.
This book is not a theoretical contribution to DDD. It is a practical learning journey: DDD explained from first principles, then applied to a complex NEXUS-1 digital-twin architecture until the meaning of the system becomes visible.
What You Will Learn
- How to understand DDD without academic language
- How to distinguish entities, value objects, aggregates, services, repositories, and events
- How to decide where business rules belong
- How bounded contexts prevent language and ownership confusion
- How to define a ubiquitous language for a real system
- How to map DDD ideas to C#, EF Core, SQL Server, and application services
- How to separate commands, events, recommendations, decisions, and read models
- How to think about audit and traceability as part of the domain, not as an afterthought
- How NEXUS-1 can be read as a domain model, not merely as a dashboard
Who This Is For
This book is for software developers, especially .NET developers, who want a practical entry point into Domain-Driven Design.
You do not need prior DDD knowledge. You only need normal development experience: classes, services, controllers, databases, APIs, DTOs, and business rules.
It is especially useful if you have ever asked:
- Where should this rule live?
- Is this object an entity or a value object?
- Is this service doing too much?
- Should this table be part of the same context?
- Is this event a fact, a command, or just a log?
- Why does the database model feel different from the code model?
- How do I stop a large system from becoming a pile of tables and services?
The NEXUS-1 Boundary
NEXUS-1 is a demonstration and educational platform. It is not connected to any real plant, not safety-class software, not certified operational code, and not intended for use in any real nuclear facility.
In this book, NEXUS-1 is used as a rich software-architecture case study: a way to explain how domain language, boundaries, rules, data, and decisions can be organized in a complex industrial-style system.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Bundle
Bundles that include this book
The NEXUS-1 Series

7 Books
- Pricing
$449
Minimum priceBought separately$679.91Suggested price$799
Author
About the Author
My name is Grigorios Agathangelidis, and my professional background is in Electrical Engineering and Software Engineering. I work primarily in the .NET ecosystem, with practical experience in C#, ASP.NET Core, Entity Framework Core, SQL Server, Angular, enterprise application architecture, and database-driven systems.
I am not a Domain-Driven Design theorist, academic researcher, or formal DDD authority. This book was written from the point of view of a working software engineer who wanted to understand DDD deeply enough to use it honestly in a real architectural model.
My interest in Domain-Driven Design comes from a practical problem that many developers eventually face: as a system grows, the code, the database, the services, and the language of the business can slowly drift apart. Entities become bags of properties, services become procedural scripts, controllers know too much, and important rules are scattered across layers. DDD attracted me because it offers a disciplined way to bring meaning, ownership, boundaries, and language back into the center of software design.
This book is also part of the wider NEXUS-1 companion series. NEXUS-1 began as a personal engineering and software-architecture challenge: to explore how a complex industrial digital-twin demonstrator could be represented through software, data, simulation, diagnostics, explainable decision support, and user-interface design.
In this volume, NEXUS-1 is used as a rich case study for learning DDD. The goal is not to claim expertise in every industrial domain represented by the platform. The goal is to show how a software engineer can take a complex system and ask better architectural questions: What is the domain? What are the core concepts? Which words need protection? Which context owns the truth? Where should rules live? When is an event only evidence, and when is it a decision?
Throughout my work on NEXUS-1, I have tried to approach unfamiliar domains with curiosity, rigor, and humility. The project is educational and demonstrative in nature. It is not safety-class software, not certified operational code, not connected to any real facility, and not intended for use in any real nuclear or industrial control environment.
My broader interest is the design of understandable systems: systems whose data can be queried, whose models can be explained, whose decisions can be audited, and whose boundaries are visible to the people who maintain them. That interest connects many of the themes in the NEXUS-1 series: digital twins, root-cause analysis, reinforcement learning, EF Core mapping, SQL schema design, auditability, and now Domain-Driven Design.
Above all, this book reflects a simple belief: a developer does not need to begin as an expert in a domain to learn from it. With disciplined study, honest boundaries, and respect for complexity, software engineering can become a powerful way to understand and organize difficult systems.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Contents
Table of Contents
Get the free sample chapters
Click the buttons to get the free sample in PDF or EPUB, or read the sample online here
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.