[Zope3-dev] adaptation based on class rather than interface

Martin Aspeli optilude at gmx.net
Thu Nov 9 10:29:42 EST 2006




Martijn Faassen wrote:
> 
> Oh, I disagree. It's much nicer to be able to be able to start with 
> adapting classes, and introduce interfaces later, where necessary. Often 
> they're not. In fact it's already possible to adapt classes and register 
> views for classes. In ZCML I believe there's some limitations with one 
> directive or other (a bug), at least there was, but the component 
> architecture has allowed this for a long time. We've been very happily 
> using this in grok.
> 

I see your point of view - and I guess there is a balance here. However, I
think that one of the big benefits we see in Zope2/CMF/Plone over "the old
way" is that people seem to take interfaces more seriously now, and with
them internal documentation. Having well-thought-out and well-documented
interfaces encouages API stability and re-use and makes it easier to
understand someone else's code. By contrast, we often end up with jungles of
APIs and no-one can quite decide whether they're stable or not, when
programmers are given no hooks on which to hang their design.

Do as you wish, of course. I find that abstract discussions like this
typically end up being a lot of talk over apparent disagreement that
disappears when it comes down to practical design.

Martin
-- 
View this message in context: http://www.nabble.com/adaptation-based-on-class-rather-than-interface-tf2601087.html#a7260124
Sent from the Zope3 - dev mailing list archive at Nabble.com.



More information about the Zope3-dev mailing list