https://github.com/f-lombardo/ddd-cinema
https://github.com/f-lombardo/ddd-cinema
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/f-lombardo/ddd-cinema
- Owner: f-lombardo
- License: apache-2.0
- Created: 2021-03-19T08:33:35.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-11T19:12:47.000Z (about 4 years ago)
- Last Synced: 2023-08-01T13:11:49.348Z (almost 2 years ago)
- Language: Java
- Size: 90.8 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DDD Cinema
## Project setup
In order to make some objects more readable and understandable (that's part of the DDD approach) the project use lombok.
At [this link](https://www.baeldung.com/lombok-ide) you can find the instructions to active it in your favourite IDE.## DDD open points
* Checks in the value object constructor: which is the action if the value isn't valid? Raise an exception? Special value?
## DDD workshop tasks
* Implement and test the QueryModel approach
* Split entities using the two main responsibilities (see Marco H. responsibilities splitting example):
* status building: a class that only rebuild the status applying events
* behaviours execution: a class that understand a command and generate one or more events
* It exists tickets for adult, student, child with varying prices
* Movie with 3D Movies and D-Box Seats cost extra. For students the price gets percentage reduction
* COVID-19 constraint: each reservation must have a free seat on each side of the row
* Make illegal status not representable (e.g: a _PlannedScreening_ without a movie)## Possible technical enhancements
* Create an _EventStore_ interface in order to isolate all the infrastructure from the _CommandHandler_
* Introduce JUnit 5 extensions to remove inheritance from BDDBaseTest: this inheritance doesn't specialize the class, but it only shares code ([an example](https://www.infoq.com/articles/deep-dive-junit5-extensions/)).