Skip to content

This repository contains practical examples and sample code from the book Domain-Driven Design with Java. Explore implementing DDD principles with Java, including services, entities, repositories, and real-world architectures like microservices and monoliths. It is perfect for developers learning to apply DDD in enterprise Java applications.

License

Notifications You must be signed in to change notification settings

o-s-expert/domain-driven-design-java-book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Domain-Driven Design with Java - Sample Code Repository

Welcome to the Domain-Driven Design with Java repository! This repository contains practical examples and code samples from the book Domain-Driven Design with Java. Each project in this repository corresponds to a specific chapter in the book, designed to help you understand how to implement Domain-Driven Design (DDD) principles using Java.

Why You Need This Repository

As you dive into Domain-Driven Design with Java, you’ll encounter real-world challenges that DDD can help solve. This repository is a companion to the book, giving you hands-on experience with the concepts discussed. By exploring the projects in this repository, you will:

  • Learn how to apply DDD principles like services, entities, value objects, aggregates, and repositories in Java.

  • Explore how DDD integrates with popular architectures like microservices and monoliths.

  • Understand how to use tools like ArchUnit for automated validation.

  • Gain insight into how DDD principles improve scalability, maintainability, and alignment with business goals.

Each folder in this repository corresponds to a specific chapter in the book, beginning with Chapter 3. The projects are organized to provide a step-by-step guide through the various aspects of DDD.

Chapter Projects

This chapter focuses on the practical implementation of DDD concepts such as Entities, Value Objects, Services, Aggregates, and Repositories. You’ll find Java code that demonstrates how to structure these components to align with DDD principles.

This chapter teaches you how to test and validate DDD applications. Explore using tools like ArchUnit and JMolecules to maintain architectural integrity and enforce DDD rules through unit and integration tests.

This chapter delves into applying DDD in different architectural styles, such as microservices and monoliths. You’ll find examples of how to implement DDD in these environments and how to refactor legacy systems to adopt DDD.

Learn how to combine DDD principles with Clean Architecture to design scalable, maintainable systems. This folder contains sample code demonstrating how to keep your business logic decoupled from infrastructure concerns.

This chapter covers aligning data modeling with DDD principles to ensure the data structure reflects your business domain. Explore examples of applying DDD to SQL and NoSQL databases while ensuring scalability and performance.

Explore how to apply DDD principles using the latest advancements in Jakarta EE. This chapter includes sample applications demonstrating how to leverage Jakarta EE 11 and Jakarta Data to implement domain-centric architectures.

This chapter demonstrates how to apply DDD principles using the Spring framework. Learn how to integrate Spring components like Spring Data, Spring Boot, and Spring Cloud into your DDD implementation for scalable enterprise applications.

This chapter explains how to capture and translate domain knowledge into your code using Domain Storytelling. You’ll find examples of how to facilitate effective collaboration between business and technical teams through storytelling.

How to Use This Repository

  1. Clone the repository to your local machine:

git clone https://github.com/o-s-expert/domain-driven-design-java-book.git
  1. Navigate to the project folder of the chapter you’re interested in:

cd chapter-03
  1. Follow the instructions in the chapter to run and explore the project code.

Contributing

If you find any issues or want to contribute improvements, open a pull request or submit an issue.

About

This repository contains practical examples and sample code from the book Domain-Driven Design with Java. Explore implementing DDD principles with Java, including services, entities, repositories, and real-world architectures like microservices and monoliths. It is perfect for developers learning to apply DDD in enterprise Java applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages