Skip to content

Commit 2bda5db

Browse files
author
Codeliner
committed
Change order in README
1 parent e9e88e2 commit 2bda5db

File tree

2 files changed

+49
-34
lines changed

2 files changed

+49
-34
lines changed

README.md

Lines changed: 48 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
php-ddd-cargo-sample
22
====================
33

4-
PHP version of the cargo sample used in Eric Evans DDD book
4+
PHP version of the cargo sample used in Eric Evans Domain-Driven Design book
55

66
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/codeliner/php-ddd-cargo-sample/badges/quality-score.png?s=d68042d97e40904ec369e137b60a1076509298f8)](https://scrutinizer-ci.com/g/codeliner/php-ddd-cargo-sample/)
77
[![Build Status](https://travis-ci.org/codeliner/php-ddd-cargo-sample.png?branch=master)](https://travis-ci.org/codeliner/php-ddd-cargo-sample)
88

9-
Introduction
10-
------------
11-
This project is work in progress. Your welcome to fork the repo and help finishing the cargo sample application for php.
12-
The application layer is based on ZF2 and we use Doctrine2 to persist our aggregates.
13-
This would be a common combination in a large PHP project but both frameworks are not required. They just make our life easier
14-
and let us focus on the Domain Driven Design implementation. Both can be replaced with any other PHP based components.
15-
16-
The original cargo sample written in java can be found [here](http://dddsample.sourceforge.net/).
17-
189
[> Installation](https://github.com/codeliner/php-ddd-cargo-sample/blob/master/docs/installation.md)
1910

2011
Goal of the Project
2112
-------------------
22-
We want to show the PHP way of implementing Domain Driven Design with the help of
23-
the originial Cargo sample used in Eric Eveans book
24-
`Domain Driven Design: Tackling Complexity in the Heart of Software`.
13+
We want to show the PHP way of implementing Domain-Driven Design with the help of
14+
the original Cargo sample used in Eric Evans book
15+
`Domain-Driven Design: Tackling Complexity in the Heart of Software`.
2516
This has already been done using java and a C# version is also available.
2617
The sample is not meant to be as the one and only way. It should help you understand the theory
2718
and gives you a starting point. Also see the [Caveats](http://dddsample.sourceforge.net/) of the
@@ -32,33 +23,16 @@ Iterative Implementation
3223
To go with you when you read the book, our sample has a [release of each chapter](https://github.com/codeliner/php-ddd-cargo-sample#chapter-overview). So you can
3324
simply `git checkout ChapterOne` and you only get the starting view of the domain
3425
with just to entities `Cargo` and `Voyage`. Our application evolves chapter by chapter
35-
the more knowledge we get about the domain. You can find a list of all available chapters below.
36-
37-
Behavior Driven Design
38-
----------------------
39-
All features of the application are described in feature files. You can find them in
40-
the [features folder](https://github.com/codeliner/php-ddd-cargo-sample/tree/master/features) of the project.
41-
We make use of [Behat](http://behat.org/) and [Mink](http://mink.behat.org/) to test our
42-
business expectations.
43-
44-
Unit Tests
45-
----------
46-
Unit Tests are of course also available. You can find them in [module/Application/tests/PHPUnit](https://github.com/codeliner/php-ddd-cargo-sample/tree/master/module/Application/tests/PHPUnit).
47-
Got to the directory and simply run `phpunit`.
48-
49-
Project Structure
50-
-----------------
51-
There is no problem if you don't know the structure of a ZF2 application. All the important
52-
parts like the domain and the infrastructure implementation can be found in the [namespace](https://github.com/codeliner/php-ddd-cargo-sample/tree/master/module/Application/src/Application) of the application module.
26+
the more knowledge we get about the domain. Each chapter ships with it's own review, where you can find additional information about the implementation, tips and tricks and many more.
5327

5428
Chapter Overview
5529
----------------
5630

5731
###ChapterOne
5832
`git checkout ChapterOne`
5933

60-
Chapter One release contains the first draft of the Cargo DDD model.
61-
It contains the Entities `Cargo` and `Voyage` and also an `Application BookingService` that works with an `overbooking policy`
34+
Chapter One release contains the first draft of the Cargo DDD model.
35+
It contains the Entities `Cargo` and `Voyage` and also an `Application BookingService` that works with an `overbooking policy`
6236
to allow the booking of a Cargo even when the Voyage has not enough free capacity.
6337

6438
[ChapterOne Review](https://github.com/codeliner/php-ddd-cargo-sample/blob/master/docs/ChapterOne-Review.md)
@@ -69,9 +43,50 @@ In Chapter Two we learn the importance of the Ubiquitous Language. With it's hel
6943

7044
[ChapterTwo Review](https://github.com/codeliner/php-ddd-cargo-sample/blob/master/docs/ChapterTwo-Review.md)
7145

46+
###ChapterThree
47+
`git checkout ChapterThree`
48+
49+
ChapterThree is about Model-Driven Design.
50+
51+
> "Design a portion of the software system to reflect the domain model in a very literal way, so that
52+
> mapping is obvious. Revisit the model and modify it to be implemented more naturally in software,
53+
> even as you seek to make it reflect deeper insight into the domain. Demand a single model that
54+
> serves both purposes well, in addition to supporting a robust UBIQUITOUS LANGUAGE.
55+
> Draw from the model the terminology used in the design and the basic assignment of responsibilities.
56+
> The code becomes an expression of the model, so a change to the code may be a change to the
57+
> model. Its effect must ripple through the rest of the project's activities accordingly."
58+
>
59+
> -- Eric Evans: Domain-Driven Design: Tackling Complexity in the Heart of Software
60+
61+
Project Structure
62+
-----------------
63+
There is no problem if you don't know the structure of a ZF2 application. All the important
64+
parts like the domain and the infrastructure implementation can be found in the [namespace](https://github.com/codeliner/php-ddd-cargo-sample/tree/master/module/Application/src/Application) of the application module.
65+
66+
Behavior Driven Design
67+
----------------------
68+
All features of the application are described in feature files. You can find them in
69+
the [features folder](https://github.com/codeliner/php-ddd-cargo-sample/tree/master/features) of the project.
70+
We make use of [Behat](http://behat.org/) and [Mink](http://mink.behat.org/) to test our
71+
business expectations.
72+
73+
Unit Tests
74+
----------
75+
Unit Tests are of course also available. You can find them in [module/Application/tests/PHPUnit](https://github.com/codeliner/php-ddd-cargo-sample/tree/master/module/Application/tests/PHPUnit).
76+
Got to the directory and simply run `phpunit`.
77+
7278
Support
7379
-------
7480
If you have any problems with the application please let me know and send me an email `kontakt[at]codeliner[dot]ws` or open a [GitHub issue](https://github.com/codeliner/php-ddd-cargo-sample/issues?state=open).
7581
Same applies if you have a question or a feature wish.
7682
Maybe I've missed a concept that you hoped to find in the example.
7783

84+
Acknowledgement
85+
---------------
86+
This project is work in progress. Your welcome to fork the repo and help finishing the cargo sample application for php.
87+
The application layer is based on ZF2 and we use Doctrine2 to persist our aggregates.
88+
This would be a common combination in a large PHP project but both frameworks are not required. They just make our life easier
89+
and let us focus on the Domain-Driven Design implementation. Both can be replaced with any other PHP based components.
90+
91+
The original cargo sample written in java can be found [here](http://dddsample.sourceforge.net/).
92+

docs/ChapterTwo-Review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can follow the decisions by browsing through the [issues of ChapterTwo](http
99

1010
Value of using an Ubiquitous Language
1111
-------------------------------------
12-
We don't want repeat Eric Eveans here. Please read his book for detailed information. The team has changed many method names to better reflect the Ubiquitous Language. This is especially true for all PHPUnit test methods. The team switched to a behavior naming convention for test methods. See [issue #13](https://github.com/codeliner/php-ddd-cargo-sample/issues/13) for details.
12+
We don't want repeat Eric Evans here. Please read his book for detailed information. The team has changed many method names to better reflect the Ubiquitous Language. This is especially true for all PHPUnit test methods. The team switched to a behavior naming convention for test methods. See [issue #13](https://github.com/codeliner/php-ddd-cargo-sample/issues/13) for details.
1313
In addition all getter methods were renamed. It is a rule of thumb that you should avoid the usage of `getProperty` and `setProperty` methods in domain model classes. Find more expressive names to reflect the Ubiquitous Language. For simple property getters that means `$entity->property()` is quite enough cause there is no public setter pendant. Instead you define a use case specific method that changes the property of the entity while processing the use case `$entity->doSomethingThatChangesProperty()`.
1414

1515

0 commit comments

Comments
 (0)