Common Closure Principle
Hello Friends,
I’m writing the blog post in English for the first time. 🇬🇧✍🏻🎉
We’re launching a whole new series. We beginning to learn the principles used in Object Oriented Design. Our guest today: Module Encapsulation Principle. So let’s start. 🎬
The software changes over time as long as the needs change. The fact that these changes will affect the many infrastructures in the system negatively affects the effort that will be taken to regulate the system. The Module Encapsulation Principle says that, “in order for changes and improvements to be made so that they do not affect the whole system, the classes that make the same work pieces must be in the same module.”
Each module must have a valid reason to be replaced. As long as the Common Closure Principle is implemented, the performance of the system is improved, and the time and effort spent on the test-new versions is saved.
In order to be easy to update and to ensure continuity, it is important to collect them in the module at the time the change is needed. For structures to be updated, only modified modules can be updated, making updating easier.
If changes are not made in a single module, a minimum number of modules should be exchanged whenever possible.
The Turkish version of this article is available at the link below :
See you in your next blog post. Waiting for criticism and suggestions. 👋