cross-posted from: https://programming.dev/post/54023908
Hi!
I’ve never read any of Uncle Bob’s books. But I have taken interest in “Clean Architecture” as it seems like a good solution to make mid to large sized projects simple to understand and maintain.
I think MVC gets too much coupling and fails at larger projects, same with n-tier. But I’m not sure about anything right now (software design is a very complicated problem after all).
So I was wondering if you friends who have used Clean Architecture in production can share your knowledge and experience with me about this design?
Is it actually good and worth investing in?
Footnote:
I’m especially weighing this architecture because Uncle Bob’s writings are really hit and miss. I don’t see him as a master or guru so I take everything he says with a grain of salt.


I used to like clean architecture. I implemented it in some large monolith applications but later on changed it. What stayed is the seperation of things by giving a dependency to a module/struct/class/object (via a constructor). The object does not need to know what has been passed to it, only that it can for example store something. The storing of something can be saving it to an SQL database, to a file, print it to console, etc. So basically inversion of control. And the basic breakup between the domain logic/business logic and the things that does the heavy lifting like a database handler, API handlers, etc.
Agreed, DI in moderation can be useful. I generally like to target dependencies with I/O so they can be substituted with test doubles to allow the domain logic to be tested with fast, deterministic tests. On the other hand, I’ve seen codebases that go way overboard with SOLID and create unmaintainable messes that are difficult to reason about.
Yeah, that’s always the thing. Sometimes it is good to have a strict guideline/structure to prevent a mess but that itself can be the source if the mess. As it n way to complicated with many unnecessary abstraction layers while a simple direct call to a function would also be good enough.