jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: Simplify NodeImpl
Date Tue, 14 Apr 2009 10:28:54 GMT

On Sun, Apr 12, 2009 at 3:36 PM, Tobias Bocanegra
<tobias.bocanegra@day.com> 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.

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


Jukka Zitting

View raw message