GithubHelp home page GithubHelp logo

seiffert / iddd_samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vaughnvernon/iddd_samples

0.0 2.0 0.0 1.23 MB

These are the sample Bounded Contexts from the book "Implementing Domain-Driven Design" by Vaughn Vernon: http://vaughnvernon.co/?page_id=168

License: Other

Java 99.70% Batchfile 0.05% Shell 0.24%

iddd_samples's Introduction

These are the sample Bounded Contexts from the book "Implementing Domain-Driven Design" by Vaughn Vernon:

http://vaughnvernon.co/?page_id=168

The models and surrounding architectural mechanisms may be in various states of flux as the are refined over time. Some tests may be incomplete. The code is not meant to be a reflection of a production quality work, but rather as a set of reference projects for the book.

Points of Interest

The iddd_agilepm project uses a key-value store as its underlying persistence mechanism, and in particular is LevelDB. Actually the LevelDB in use is a pure Java implementation: https://github.com/dain/leveldb

Currently iddd_agilepm doesn't employ a container of any kind (such as Spring).

The iddd_collaboration project uses Event Sourcing and CQRS. It purposely avoids the use of an object-relational mapper, showing that a simple JDBC-based query engine and DTO matter can be used instead. This technique does have its limitations, but it is meant to be small and fast and require no configuration or annotations. It is not meant to be perfect.

It may be helpful to make one additional mental note on the iddd_collaboration CQRS implementation. To keep the example simple it persists the Event Sourced write model and the CQRS read model in one thread. Since two different stores are used--LevelDB for the Event Journal and MySQL for the read model--there may be very slight opportunities for inconsistency, but not much. The idea was to keep the two models as close to consistent as possible without using the same data storage (and transaction) for both. Two different storage mechanisms were used purposely to demonstrate that they can be separate.

The iddd_identityaccess project uses object-relational mapping (Hibernate), but so as not to leave it "boring" it provides a RESTful client interface and even publishes Domain-Event notifications via REST (logs) and RabbitMQ.

Finally the iddd_common project provides a number of reusable components. This is not an attempt to be a framework, but just leverages reuse to the degree that code copying doesn't liter each project. This is not a recommendation, but it did work well and save a considerable amount of work while producing the samples.

Usage

Requires

  • Java 7 (8+ does not work)
  • MySQL Client + Server
  • RabbitMQ

Setup (with Docker)

To make it easy to run the tests and it requirements, the startContainers.sh script is provided. Which will start a:

  • MySQL Server container
  • RabbitMQ Server container
  • RabbitMQ Management container

If the mysql command is available, which is the mysql client, also the required SQL scripts will be imported into the MySQL Server.

If you use the startContainers.sh script, you don't need MySQL Server and RabbitMQ installed locally. Instead, Docker needs to be installed as the script will start MySQL and RabbitMQ in Docker containers.

Build

You can build the project by running:

./gradlew build

This automatically downloads Gradle and builds the project, including running the tests.

The Gradle build using Maven repositories was provided by Michael Andrews (Github michaelajr and Twitter @MichaelAJr). Thanks much!

I hope you benefit from the samples.

Vaughn Vernon Author: Implementing Domain-Driven Design Twitter: @VaughnVernon http://vaughnvernon.co/

iddd_samples's People

Contributors

vlingo-java avatar carlosbuenosvinos avatar pvdissel avatar geraldcroes avatar

Watchers

James Cloos avatar  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.