https://github.com/bertilmuth/modern-clean-architecture
Maintainable software without effort.
https://github.com/bertilmuth/modern-clean-architecture
clean-architecture event-driven java spring spring-boot
Last synced: about 1 month ago
JSON representation
Maintainable software without effort.
- Host: GitHub
- URL: https://github.com/bertilmuth/modern-clean-architecture
- Owner: bertilmuth
- License: apache-2.0
- Created: 2021-08-03T11:50:12.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-16T19:17:18.000Z (over 3 years ago)
- Last Synced: 2024-11-04T00:32:49.061Z (6 months ago)
- Topics: clean-architecture, event-driven, java, spring, spring-boot
- Language: Java
- Homepage:
- Size: 263 KB
- Stars: 35
- Watchers: 1
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# modern-clean-architecture
[](https://gitter.im/requirementsascode/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)Create services with a [clean architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html) with significantly less effort necessary than usual.
The main idea of Clean Architecture: Domain code and use cases are independent of frameworks, UI, the database and external services.
So building an application in a Clean Architecture style has a positive effect on maintainability:
* You can test domain code and use cases without the framework, UI and infrastructure.
* Technology decisions can change without affecting the domain code. And vice versa. It is even possible to switch to a new framework with limited effort.Modern clean architecture reduces the effort to create a clean architecture through the following features:
* **Serialization of immutable requests and responses** without serialization specific annotations.
* **No necessity for DTOs.** You can use the same immutable objects for requests/responses in web layer and use cases.
* **Generic endpoint** that receives and forwards POST requests. New behavior and domain logic can be added and used without the need to write framework specific code.
* **Testing with a repository double** that acts like a normal repository. No need for mocking it.To start creating a modern clean architecture, visit the [spring-behavior-web](https://github.com/bertilmuth/modern-clean-architecture/tree/main/spring-behavior-web) page.
For testing support, see the [spring-behavior-test](https://github.com/bertilmuth/modern-clean-architecture/tree/main/spring-behavior-test) page.
For a working sample from frontend to backend, see the [To Do List sample](https://github.com/bertilmuth/modern-clean-architecture/tree/main/samples/todolist).
If you have any questions, see the [Questions & Answers](https://github.com/bertilmuth/modern-clean-architecture/wiki/Questions-&-Answers) on the wiki. Or chat with me on Gitter.