Clean architecture and components

  softwareengineering

I’m reading the book “Clean Architecture” from Robert C. Martin and there is something that has been puzzling me in most parts of the book.

When the author introduces the term “component” he defines it as “the unit of deployment”, they “always retain the ability to be independently deployable and, therefore,
independently developable”. As an example, they are Java .jar files, independent dlls, etc. They can be dynamically or statically linked or whatever makes sense in the programming language that we’re using, but apparently what he is referring to what we could generally call libraries.

However, from my point of view, most of the techniques that are presented in the next chapters should not require that components are independent units of deployment. The explanations about decoupling, stability, dependencies, policies vs details, etc. can also be applied to components that are developed and deployed together.

For example, regarding the dependency rule: if I have a single repository project with a single versioning/release process, it still makes perfect sense to apply the rule and separate classes that access the database from use cases and domain entities.

I know that he also uses the term “modules” for the internal organization of components, but he only mention to apply SOLID principles to them. SOLID principles are more general and doesn’t speak about domain, use cases, etc.

As I see it, having dozens of packages with their own versioning and release separate processes can easily become a nightmare with almost no benefits for a middle sized project (let’s say some hundreds of files).

The possibility to keep components together in a single deployment unit is only very briefly mentioned in the chapter “partial boundaries”, but it’s presented almost as something unusual, rather than the default choice. Interestingly, in the chapter “the missing chapter”, written by a different author, he also disagrees with Robert’s definition of component.

I would like to know what the practical experience of people that have tried to implement clean architectures is with this “component == unit of deployment” idea. Also, I would like to know if there exist popular/well known more pragmatical proposals regarding this.

New contributor

naggety is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT