Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on programming.dev
clojure·ClojurebyAlavi

Is Clean Architecture actually good? What's your experience?

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.

View original on programming.dev
2

4 replies

lemmy.ml

I haven't applied clean architecture with Clojure, but I'm working on a Python codebase that uses dependency injection intensively. It works, but I personally feel the pain every time I create a mock.

Although the clean architecture book mentioned vertical-slice architecture and added a new chapter about packaging by technical layers versus by features, clean practitioners seem to prefer packaging by layers, which should be approached with caution. I don't remember if the book mentions pushing I/O to the edges, or the imperative shell pattern, which would allow pure functions to cover more logic instead of having a service layer that interleaves I/O and logic.

2
Alavireply
programming.dev

Thank you for your explanation?

What is your recommendation?

Is it to understand clean architecture and mold it to my usage, and use imperative shell patterns with it?

1
vi21reply

I couldn't find a book that exactly matches Clojure. Still, I prioritize Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F# by Scott Wlaschin. However, many concepts, such as algebraic data types, wrapper types, and monads, may need to be adapted or even ignored.

2

I ask because it seems pretty popular in the Clojure community and I'm mostly developing with Clojure.

1

You reached the end

Is Clean Architecture actually good? What's your experience? | Spyke