DEV Community

Cover image for Modern clean architecture
Bertil Muth
Bertil Muth

Posted on • Edited on

1 1

Modern clean architecture

I am pleased to announce the release of the modern-clean-architecture project.

Clean architecture follows these principles:

  • The domain code and use cases of an application are independent of frameworks, UI, the database or any external agency, e.g. external services.
  • Through this clear separation of concern, the domain code and use cases become testable independent of the framework, UI or infrastructure.
  • The user interface, database technology, external services and framework specific code can change without affecting the domain code and vice versa.

Modern clean architecture provides a fresh view on clean architecture, in a Spring Boot environment. It reduces the effort required to create a clean architecture through the following constraints:

  • Serialization of immutable requests and responses without serialization specific annotations.
  • No necessity for DTOs. You can use the same immutable value 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.

Visit the website, I'm happy to hear your thoughts.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️