Nicola Ken Barozzi wrote: > So objects should use between themselves only method calls or messages. > In essence, objects expose a service. > Definitly.
> >>So, I think implementations can change incompatible over time and > >>if someone relies on the implementation he has to change its > >>implementation as well. The contracts (like the above mentioned fom) > >>are defined by interfaces. > > No, they are defined by the *public* *signatures*. That means that they > are defined by all public methods. As I showed you above, if you have a > public method, the class can and should encapsulate all behaviour. > Regardless to the interface. > Yes, agreed, usually for me (and for most code in Cocoon/Avalon) the public signatures of an implementation is the set of methods defined in the interface. So, actually we are talking the same language here, I think. The whole thing is about whether protected or private should be used, and I say: it doesn't matter. Carsten
