This principle is often summarized as "other things being equal, a simpler explanation is better than a more complex one."
I am a Plone developer. For those who do not know, Plone is a powerful CMS based on the Zope application server (written in Python).
One of the best features of this CMS is the Zope Component Architecture (ZCA). It borns as a part of the Zope 3 project but It's a quite independent set of modules. ZCA allows you to build component based application.
Furthermore some aspects of the ZCA perplexed me. These are the dark spots of the ZCA (all in my own opinion):
Inheritance is a tricky matter.
- Interface inheritance
Zope interface implementation is tightly coupled with the Python inheritance implementation. While it's powerful, it is also quite complex to figure out in complex inheritance chains.
ZCA API could be simpler furthermore it uses an unusual and rich terminology (components, adapters, utilities etc.).
- Unnecessary functions and component types
occamsrazor.jsI eventually decided to work around some ideas and try to improve and simplify the ZCA.
The result is Occamsrazor.js
Occamsrazor.js is a library useful to decouple a functionality from the code that provide it.
Documentation and source code is here.
I'm very curious to have some feedback ...