On Tue, Apr 14, 2009 at 12:28 PM, Jukka Zitting <[email protected]> wrote: > Hi, > > On Sun, Apr 12, 2009 at 3:36 PM, Tobias Bocanegra > <[email protected]> wrote: >> the first (a) would align more with the JCR api, the latter (b) would >> be more object oriented. personally i prefer a VersionableNodeImpl >> solution, since most of the operations need access to protected >> methods on NodeImpl anyways. > > A class should only implement a clearly scoped set of functionality. > The Node interface in JCR is much too large for that, so personally > I'd rather move towards making NodeImpl a facade that just directs the > flow of control over multiple more tightly scoped objects.
+1 > > The "access to protected methods" issue is IMHO a symptom of the > current tendency to implement so much inside the Node object. I'd > rather solve that issue by refactoring such protected methods into > public methods of separate objects that are only handed to those > places that need access to that functionality. Composition over > inheritance. +1 cheers stefan > > BR, > > Jukka Zitting >
