Skip to content

Commit 27b1ab5

Browse files
docs: Add CQRS to CONTRIBUTING.md
Signed-off-by: Stefan Niedermann <info@niedermann.it>
1 parent c7102af commit 27b1ab5

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

CONTRIBUTING.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
## Issues / Pull Requests
44

5-
- You should discuss new features and behavior changes in an issue before starting with the implementation
5+
- You should discuss new features and behavior changes in an issue before starting with the
6+
implementation
67

78
## Commit messages
89

910
- Commit messages must strictly follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#specification)
1011
- Commit messages must be `Signed-off-by`
11-
- Commit messages must contain `Co-authored-by` mentioning the used LLM in case a LLM was involved in the code changes
12-
- Commit messages should focus on the motivation behind a change, not be a summary of what was changed
12+
- Commit messages must contain `Co-authored-by` mentioning the used LLM in case a LLM was involved
13+
in the code changes
14+
- Commit messages should focus on the motivation behind a change, not be a summary of what was
15+
changed
1316

1417
# Technical overview
1518

@@ -28,6 +31,10 @@
2831
## Architecture
2932

3033
- Clean Architecture with encapsulated UseCases in Domain layers
34+
- Follow the [Command Query Responsibility Segregation](https://martinfowler.com/bliki/CQRS.html)-Pattern with one exception:
35+
The caller is allowed to know when a command execution is "completed" by returning a completable
36+
type like `CompletableFuture` or `Flow.Publisher`. *UseCases should either read data for the UI
37+
*or* write data (this includes reading necessary entities), but not both
3138
- Threading
3239
- Applications usually have one main thread and expect to apply data on the main thread
3340
- *UseCases should be executed on IO threads
@@ -37,8 +44,10 @@
3744
- Reactive and immutable Programming
3845
- Strong typed business properties
3946
- Business properties like IDs should always be strictly typed (instead of using a primitive)
40-
- If an `ID` is bound hard to another domain object like `Card`, declare the `ID` record as within this domain object.
41-
- Avoid reflection access at runtime for performance reasons, prefer compile time annotation frameworks
47+
- If an `ID` is bound hard to another domain object like `Card`, declare the `ID` record as
48+
within this domain object.
49+
- Avoid reflection access at runtime for performance reasons, prefer compile time annotation
50+
frameworks
4251

4352
## Implement Unit-Tests
4453

0 commit comments

Comments
 (0)