Exploring Principles for Flexible Software Architecture
Object-Oriented Design aims to arrange dependencies to allow for easy future change. The critical thing here is experimentation. We don’t want to make a decision forced by the tools we are using or by external pressures that are not necessary.
By adhering to the rules of clean coding and designing with reuse in mind, we can create flexible and maintainable software systems. The corresponding concrete implementations will also change when changing an abstract interface. Yet, changes to concrete implementations may only sometimes need interface modifications. The smallest entities deployed as part of a system are called components. Well-designed components are always deployable and developable, regardless of how they are deployed.
The Single Responsibility Principle is about functions and classes — but it reappears in a different form at two more levels. At the level of components, it becomes the Common Closure Principle. A module should be responsible to one, and only one, actor. The SRP says to separate the code that different actors depend on. The behavior of a software artifact should be extendable without having to change that artifact. A good software architecture would reduce the changed code to the barest smallest. The OCP is one of the driving forces behind the architecture of systems. Some systems are impossible to alter. They are structured so that there is a limit to the number of times they can be changed.
The goal is to make the system easy to extend without incurring a high impact of change. The behavior of the system encompasses the performance action of the software. It determines how the system will work and the various functions the system will be able to perform.
[¹]: Clean Architecture: A Craftsman’s Guide to Software Structure and Design