CMOE = "Close for modification, Open for extension."
If there is any behavior change for ClassName, you can extend ClassName and provide the object of the new class in config.
This will not require code changes.
This is one of the simple reasons. What JB Nizet said is more descriptive and in-depth and.
source
share