1

I'm currently in the process of integrating Clean Architecture into my Spring Boot project and I'm seeking advice on the ideal project structure and the types of classes and projects that should be incorporated.

Specifically, I'm looking for insights into how to layout the project and the essential classes and projects that should be part of the architecture.

In a typical Spring Boot project, we're accustomed to using packages like config, controllers, services, repositories, utils, and more. However, I'm looking for guidance on how to organize my Spring Boot app using Clean Architecture principles.

Could someone provide a clear explanation along with a short user story demonstrating Clean Architecture in action? I've researched this online, but I haven't found a resource that provides a clear and concise explanation that would help solidify my understanding.

Any advice, exemplary approaches, or best practices you can share would be highly appreciated.

2
  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Sep 19, 2023 at 5:41
  • @candied_orange I have edited the question Any advices on this? Sep 19, 2023 at 7:30

1 Answer 1

1

a short user story demonstrating Clean Architecture in action?

"Aren't you done yet?" "Hang on, I'm trying to save us time later" "Hurry up or there wont be a later"

later

"We need to switch Database venders" "Thank goodness we moved all vender specific knowledge out of the business rules" "Yeah whatever, just get it done"

later

"We need to switch from a GUI to a web app" "Thank goodness we moved all view specific knowledge out of the business rules" "Yeah whatever, just get it done"

later

"Hey you did so well adapting your last project when things changed we thought of you when we realized this new project we just bought needed some changes" "I haven't looked at it. I can't be sure how long it will take to adapt" "Oh you'll be fine. You're so good at this. We go live in a month" "Arg!!!"

Using CA is about keeping your code flexible so it can react well to changing requirements. To see it in action you can't just run it. You need changing requirements. Ones you didn't know were coming. Ones that may never happen while you're on the project, if ever. Ones you may never get credit for accommodating.

The way I handle that is to go back to projects I left years ago and ask whoever's working with it now how things are going. It's nice to see your babies grow up and live lives of their own. Also nice to learn what the real problems turned out to be.

In a typical Spring Boot project, we're accustomed to using packages like config, controllers, services, repositories, utils, and more. However, I'm looking for guidance on how to organize my Spring Boot app using Clean Architecture principles.

"We need to get rid of Spring Boot" "Umm..." "You can do it right?" "Well..."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.