Finally Have a Firm Handle on Clean Architecture

235 views
Skip to first unread message

Terence McGhee

unread,
Nov 23, 2013, 11:52:21 AM11/23/13
to clean-code...@googlegroups.com
Of all of Uncle Bob's teachings, Clean Architecture was by far the most challenging for me to wrap my mind around. And I'll admit that I was getting very annoyed with looking at all of those UML diagrams and not being able to see any code examples of how this stuff was actually done.

But I kept at it. Starting projects and then tearing them all down again. Posting questions in this group, then tearing my projects down again (again) once I received a reply (because each reply would certainly highlight how my original understanding wasn't quite right).

Then, it finally clicked. And this was one of the best clicks in the world.

And when I say clicked, I mean it really clicked. I get it. And it's mind-blowing.

Looking back over this process for me, I've come to realize that the one of the best things that Uncle Bob did was not supply any code samples. This forced me to struggle with and understand the core concepts themselves instead of adopting a cookie-cutter look alike from a bunch of sample code.

Once you understand how all of the concepts fit together, there are an almost infinite number of implementations that still adhere to the architecture. 

it's been a lot of fun experimenting with several different approaches to find the one that fits my programming fancy the most.

Having gained this knowledge and actually applying it to a released, real-world project, there's no way that I would ever voluntarily go back.

My advice to everyone that's having a hard time grasping the concept of Clean Architecture is to simply stick with it. Ask your questions in here and patiently wait for replies. Keep looking at those annoying UML diagrams and updating your test projects once you receive answers to your questions. Read the questions and answers that others have posted. This education is well worth the struggle that you go through in order to acquire it.



Sebastian Gozin

unread,
Nov 25, 2013, 8:08:20 AM11/25/13
to clean-code...@googlegroups.com
Happy to hear others are having similar positive experiences as me. I completely agree it was initially hard to understand just what I needed to do. And I'm sure I will keep adjusting as I go forward.
But having put 5 applications in production over the past 9 months using the same architecture and code base supported with differentiating plugins just feels nothing short of awesome. And I'm well along to putting more apps in production soon.

It is noticeable though when I explain the approach to others they will often have similar problems to really get it. They will say things like, that looks nice on paper but how do you go about doing it? And I'm having trouble explaining it any better than Uncle Bob already has.

Cheers,
Sebastian

Gustavo Matias

unread,
Nov 26, 2013, 9:10:24 AM11/26/13
to clean-code...@googlegroups.com
Thanks for the comments! really inspiring for those that still haven't got it (like me). What episodes do you guys recommend to achieve this amazing result?

Sebastian Gozin

unread,
Nov 27, 2013, 4:54:54 PM11/27/13
to clean-code...@googlegroups.com
If you mean cleancoders episodes it would be episode 7: architecture, use cases and high level design (http://cleancoders.com/codecast/clean-code-episode-7/show)
Followed by the SOLID principles series for various ways to go about achieving this architecture (http://cleancoders.com/category/solid-principles#videos)
All of it supported with TDD of course. (episodes 6 parts 1 and 2)

On my end I also supported the entire operation with an automated acceptance test suite in Fitnesse. I don't think there is an episode on this topic yet though there's a few nice video's linked on the Fitnesse website from Uncle Bot and Brett Schuchert if I'm not mistaken. I also read Gojko Adzic's book specification by example on the topic. Though I ended up dropping his suggestion to implement acceptance tests on a fully integrated system as it was too costly and complicated to manage thus dropping back to in memory persistence strategies.

To be honest I just started trying it all out. Eventually I got a bit frustrated with duplication I was having in some usecase implementations and their respective user facing transport plugins (web mvc controllers etc...) so I ended up making some of them fairly generic so I could reuse the same web endpoints and basic usecase implementations while all sorts of business rules would be selected based on the input or active user session.

- Sebastian
Reply all
Reply to author
Forward
0 new messages