Application architecture in practice - Uncle Bob

According to Uncle Bob / source /, each custom plot had to separate the "integrator / controller". Sounds good because the classes will be small and will only do one thing.

But in the real world, I have not seen architecture organized this way. Always, if there is, for example, AccountController, it contains all methods associated with the account. In "Uncle Bob's Way" it should be designed like this:

+Controllers
---+Account
------+DepositMoneyIntoAccount
------+WithdrawalMoneyFromAccount
------+TransferMoneyToAccount

      

or maybe Im not understanding Uncle Bob? But if not, ask any of you to see the architecture organized in this image? Almost in the real world?

Hello

+3


source to share


2 answers


This is certainly practical and is a great tool for larger, more complex systems. I put entities / boundaries / interactors (instaead of the controller to avoid confusion with popular web interfaces) in directories at the top level and the whole communication system in subdirectories (like z_rails, z_sinatra, etc.). For example, with Rack, direct delivery of web solutions using various communication platforms with minimal additional work. For example, take a look at github.com/wizardwerdna/avdi and github.com/wizardwerdna/bobbit for some initial experimentation along these lines.



+2


source


You're right, this is how he wants the project to look.

Remember his talk " Architecture: The Lost Years ", architecture should describe its intention (and what's better than a use case?).

I got a little confused in the beginning too, but if we think about this BDD, philosophy wants to make sure that we create software that is understandable.

I watched the video a couple of times and I probably will again because this is a new concept and needs to be explored. For me, the most important part and more difficult task is creating plugins for other modules, it talks about the request and response model needed to keep the surrounding layers like front end and database completely software independent.

The ultimate goal of this is that our software can easily replace any addon such as a database or user interface.



One more thing I want to mention, I think you might be interested. In this interview at the end, he reveals that his next book will be about this new methodology that we are discussing now.

Update

I see in the comments that you are talking about calling packages with names like Boundaries, Interactors ...

It 's okay in his book clean code that some developers use the template name in cases to name classes or packages. This is correct because this is a technical terminology that developers should be familiar with. Likewise, you know that a class is a builder or factory, by reading its name or package, you can know what interactors or boundaries are. This is correct according to clean code.

+1


source







All Articles