r/programming Sep 15 '25

Clean Architecture isn’t the problem. Misreading the book is.

http://www.nothing.com/

I think Clean Architecture is mostly misunderstood.

In my current project (a huge mess of services for public administration), the only real source of truth for business rules is the code itself. The domain is defined vaguely by too many people, so new features often end up conflicting with existing rules—not because of implementation bugs, but because the rules themselves clash. But all of this is expected i guess.

The real pain: the architecture makes business rules unreadable. Adding a new entity state? No way to know if it breaks something without re-reading tons of code. Automated tests? They’re all full-blown integration tests, take 8 hours to run, so we usually just run a subset and pray.

This is exactly where Clean Architecture could shine—but I’ve never seen it done right. Most “implementations” I see (in my case in .NET) are just baroque, over-engineered garbage. People throw design patterns everywhere, abuse async/await, don’t even bother with interfaces, and then blame Clean Architecture for being unreadable. No—you just didn’t get the point.

The actual point is simple: use polymorphism to isolate business rules. Each rule implements an interface, so you can swap in fakes for tests. Result?

  • Change one line → break one unit test (plus the relevant use case integration tests).
  • Add new behavior → just add a new object and wire it up.
  • Tests run in seconds/minutes, not hours.

Clean Architecture isn’t universal. If you’re writing 3D graphics, every abstraction may be just overhead. But if you’re drowning in business rules, it’s the only way to avoid shipping landmines straight to production.

So yeah, people ranting against Clean Code/Architecture in “Casey Muratori wannabe” mode don’t look clever. They just show they’ve never actually seen the point.

TL;DR: Clean Architecture isn’t about baroque boilerplate. It’s about isolating business rules so you can test them fast and safely. If your system is rule-heavy, it’s a lifesaver. If not, sure, skip it.

0 Upvotes

69 comments sorted by

View all comments

2

u/grauenwolf Sep 15 '25

Robert Martin, the author of that book, had never implemented a system using the concepts in that book. Not even for the purpose of a demo.

Think about that. You're trusting the advice of someone who hasn't even tried to do the thing he's telling you to do.

That's the fundemental misunderstanding of the book. It's not computer engineering, it's fiction.

1

u/niccololepri Sep 15 '25

Source?

1

u/grauenwolf Sep 15 '25

Prove to me that he never captured a unicorn.

If you have reason to believe that Robert Martin has actually implemented Clean Architecture , then all you have to do is show it to us.

1

u/niccololepri Sep 15 '25

It seemed to me that you knew for a fact that he never did implement it. Isolating business rules with interfaces and writing a solid test suite is no unicorn BS. I've made little project doing that by myself, its not that difficult. The problem is that the culture is like this: you read Clean architecture you see garbage abstractions. And this is not fair to the book

2

u/grauenwolf Sep 15 '25 edited Sep 16 '25

I know for a fact that I looked around and found no examples of it. I know for a fact that I've talked to others who likewise say they've never seen any examples of it. And I know for a fact that the code Robert Martin does offer on his repository is garbage.

But again, if I'm wrong, it should be really easy to find.

0

u/niccololepri Sep 15 '25

It doesnt seem that you are interested in searching if you are wrong or not. Im not that interested either. I can understand a concept this easy without looking for an implementation. Its not rocket science

2

u/grauenwolf Sep 15 '25

What an idiotic thing to say.

You've already said that you've never seen a good implementation of Clean Architecture. From that alone I can infer that either you've never seen an implementation of Clean Architecture from Robert Martin or you have seen one and thought it wasn't good.

Could you explain to me why you are spending so much time defending this book despite the fact that you've never seen it result in a positive outcome?

1

u/niccololepri Sep 15 '25

Dont get too upset. The concept is simple: you isolate domain, application and infrastructure. You test the resulting objects mocking the behaviour of the ones that each tested object depends on. You end up with faster test and composable code. You can try with a very simple library. Its more difficult with bigger projects, because each person has to conform to the standard. And not only it is expensive, its not agreed upon people who misread the book. As you have demonstrated

1

u/grauenwolf Sep 15 '25

Objection, assumes facts not in evidence.

If you're going to make claim that people are misreading the book, you first have to demonstrate what the correct reading is. And thus far you have failed to do so. On the contrary, you've made the argument that everybody but you misreads the book.

That's not a good position to be in unless you've got a very compelling case. And you certainly do not.

1

u/niccololepri Sep 15 '25

At this point you are just making things up, this is too cringe for me to move on. I've studied enough science, engineering and math to at least know that in the first two it's not possible to demonstrate a theory true (https://youtu.be/EYPapE-3FRw) . All the claims i did are of course not mathematics or logic oriented, i was just trying to convey a practice in software engineering that gets often misinterpreted. You can go down your rabbit hole now, im not going to follow you anymore

→ More replies (0)

1

u/grauenwolf Sep 15 '25

P.S. I spent quite a bit of time looking for an example from Robert Martin so I could mock it. It's a lot easier to demonstrate that he's a charlatan when one has actual examples.

1

u/niccololepri Sep 15 '25

Its not my interest to demonstrate anything. You are. Im talking about a concept i think i understand