Flexibility¶
Flexibility means that a piece of code can change the way it works, without changing the code that uses it.
The piece of code may be refactored, or changed in place, or it may also be duplicated with another method. Mocking, or the ability to emulate a simpler version of a class is also a possible inner working change.
Abstraction, with interfaces, proxy classes or relay functions, are ways to introduce flexibility.
The opposite of flexibility is rigidity.
See also PHP: The Flexibility that can Make or Break your Team Project.
Related : Interface, Proxy Class, Relay Function, Rigidity, Program To Interface