You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,8 +63,8 @@ some Symfony and Laravel implementations.
63
63
64
64
### ⛱️ Bounded Contexts
65
65
66
-
*[Mooc](src/Mooc): Place to look in if you wanna see some code 🙂. Massive Open Online Courses public platform with users, videos, notifications, and so on.
67
-
*[Backoffice](src/Backoffice): Here you'll find the use cases needed by the Customer Support department in order to manage users, courses, videos, and so on.
66
+
-[Mooc](src/Mooc): Place to look in if you wanna see some code 🙂. Massive Open Online Courses public platform with users, videos, notifications, and so on.
67
+
-[Backoffice](src/Backoffice): Here you'll find the use cases needed by the Customer Support department in order to manage users, courses, videos, and so on.
68
68
69
69
### 🎯 Hexagonal Architecture
70
70
@@ -106,6 +106,7 @@ src
106
106
```
107
107
108
108
#### Repository pattern
109
+
109
110
Our repositories try to be as simple as possible usually only containing 2 methods `search` and `save`.
110
111
If we need some query with more filters we use the `Specification` pattern also known as `Criteria` pattern. So we add a
111
112
`searchByCriteria` method.
@@ -114,33 +115,46 @@ You can see an example [here](src/Mooc/Courses/Domain/CourseRepository.php)
114
115
and its implementation [here](src/Mooc/Courses/Infrastructure/Persistence/DoctrineCourseRepository.php).
115
116
116
117
### Aggregates
118
+
117
119
You can see an example of an aggregate [here](src/Mooc/Courses/Domain/Course.php). All aggregates should
118
120
extend the [AggregateRoot](src/Shared/Domain/Aggregate/AggregateRoot.php).
119
121
120
122
### Command Bus
123
+
121
124
There is 1 implementations of the [command bus](src/Shared/Domain/Bus/Command/CommandBus.php).
125
+
122
126
1.[Sync](src/Shared/Infrastructure/Bus/Command/InMemorySymfonyCommandBus.php) using the Symfony Message Bus
123
127
124
128
### Query Bus
129
+
125
130
The [Query Bus](src/Shared/Infrastructure/Bus/Query/InMemorySymfonyQueryBus.php) uses the Symfony Message Bus.
126
131
127
132
### Event Bus
133
+
128
134
The [Event Bus](src/Shared/Infrastructure/Bus/Event/InMemory/InMemorySymfonyEventBus.php) uses the Symfony Message Bus.
129
135
The [MySql Bus](src/Shared/Infrastructure/Bus/Event/MySql/MySqlDoctrineEventBus.php) uses a MySql+Pulling as a bus.
130
136
The [RabbitMQ Bus](src/Shared/Infrastructure/Bus/Event/RabbitMq/RabbitMqEventBus.php) uses RabbitMQ C extension.
131
137
132
138
## 📱 Monitoring
139
+
133
140
Every time a domain event is published it's exported to Prometheus. You can access to the Prometheus panel [here](http://localhost:9999/).
134
141
135
142
## 🤔 Contributing
143
+
136
144
There are some things missing (add swagger, improve documentation...), feel free to add this if you want! If you want
137
145
some guidelines feel free to contact us :)
138
146
139
147
## 🤩 Extra
148
+
140
149
This code was shown in the [From framework coupled code to #microservices through #DDD](http://codely.tv/screencasts/codigo-acoplado-framework-microservicios-ddd) talk and doubts where answered in the [DDD y CQRS: Preguntas Frecuentes](http://codely.tv/screencasts/ddd-cqrs-preguntas-frecuentes/) video.
141
150
142
151
🎥 Used in the CodelyTV Pro courses:
143
-
*[🇪🇸 DDD in PHP](https://pro.codely.tv/library/ddd-en-php/about/)
0 commit comments