Coder Social home page Coder Social logo

ddd-examples's Introduction

Domain-driven design example applications

A few years ago, when I started learning about Domain-Driven Design through the blue book/red book and tried to apply the tactical part of this new vision to my real world projects (mostly Java / Spring / Angular at the time), I quickly found myself puzzled by issues or limitations coming from the frameworks and tools I used. I also found out that I was not alone, and that many people in the craftsmanship community didn't really have satisfactory answers to them.

This repository contains what I wish I had at the time: a few answers to common questions, and complete examples of working architectures with up-to-date frameworks.

Each directory contains an implementation, with specific languages, frameworks and tools, of the same business use case. The domain is bike rental, and modeling workshops with domain experts resulted in two aggregates: bike and journey. We decided to focus on bike first, but we know that commands on bikes have an impact on journeys. For now, we have identified the following use cases:

  • given its location and a radius, a user can see all available bikes nearby
  • a bike can be rented by scanning it, which starts a new journey
  • the bike position is tracked when the bike moves
  • a bike can be returned by scanning it again
  • a bike rented by someone else is not available and does not appear in the list of bikes nearby
  • a returned bike appears again in the list of bikes nearby

Disclaimer

Remember that there is no unique answer to all of these issues tackled here, nor any perfect approach or architecture. Domain-Driven Design is a holistic way to develop software, and therefore can sometimes be quite vague in some aspects. What is given here is only a simple example of a coherent way to do things in the DDD-way, nothing more :)

What if I have a question?

Please open a new GitHub discussion in this repository so that everyone can participate!

Can I contribute?

Yes! if you want to share an example with a particular technical stack, feel free to open a pull-request and I promise to take a look!

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.