Giter Site home page Giter Site logo

ppp-of-ddd's Introduction

Principles, Practices and Patterns of Domain-Driven Design

This repository is Java adaptation of sample code for the book Principles, Practices and Patterns of Domain-Driven Design. The original code is written in C#. Samples use various frameworks and technologies. These frameworks were replaced with the most close Java equivalents. Samples in some chapters are complete applications. For such chapters, I added additional readmes. I described replacements, problems, and screenshots of running apps.

book cover

Replacements

Most technologes are replaced with equivalents that are popular in the Java world.

Table 1. technologies
Original Equivalent Comment

ASP.NET

Spring Thymeleaf

See README in CH12, CH23

NServiceBus

RabbitMQ, ApplicationEventPublisher

See README in CH12 and CH18

Mass Transit

Kafka

See README in CH12

Syndication

rometools

See README in CH13

NHibernate

Hibernate

I skipped fluent-hibernate, see README in CH15, CH21

StringExtensions

TheString

Java doesn’t support this feature, I used a ZeLiba.

SQL Server Express

MySQL, H2, SQLite

see README CH21

StructureMap

I made DI manually

see README CH21

EntityFramework

JOOQ with SQLite

see README CH21

Dapper Micro ORM

JDBI with SQLite

see README CH21

Besides replacement of technologies, there is some language "sugar" to keep code more aligned to the book examples.

Table 2. replacements
Original Equivalent Comment

GUID

UUID

As it’s just an example, for this project, there is no difference

decimal

BigDecimal with TheComparable

ZeLiba for fluent comparison, as Java doesn’t support > or < for BigDecimal.

NotImplementedException

own NotImplementedException

see java-replacements

ApplicationException

own ApplicationException

see java-replacements

ArgumentNullException

NullPointerException

usually inside Objects.requireNonNull

InvalidOperationException

own InvalidOperationException

see java-replacements

IEnumerable

Arrays or List<>

Chapters with Additional Readme

The chapters below contain a detailed description of what I did, which replacements I used and why, which problems I’d faced and how I solved or worked around them.

Chapter 12

It’s a big chapter, and it requires a separate readme. See ch12/README.adoc for details.

Chapter 13

It’s a big chapter, and it requires a separate readme. See ch13/README.adoc for details.

Chapter 15

This chapter required a bit of work with Hibernate. See ch15/README.adoc for details.

Chapter 18

This chapter required a bit of work with "Static" DomainEvents. See ch18/README.adoc for details.

Chapter 21

This chapter required a bit of work with ORMs and databases. See ch21/README.adoc for details.

Chapter 22

This chapter required a bit of work with event sourcing. See ch22/README.adoc for details.

Chapter 23

This chapter required a bit of work with ThymeLeaf. See ch23/README.adoc for details.

Chapter 25

This chapter required a bit of work with ThymeLeaf and Commands Handlers. See ch25/README.adoc for details.

Chapter 26

This chapter required a bit of work with EventStoreDB. See ch26/README.adoc for details.

Contributing

Improvements are welcome! Feel free to create issues or pull requests. Fixing mistyping in readmes is also welcome!

Each readme has a ToDon’t list. It’s a list of potential improvements, but I won’t have time for them. Feel free to check them.

ppp-of-ddd's People

Stargazers

Sergiy Yevtushenko avatar

Watchers

Ravil Galeyev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.