jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: On virtual content
Date Wed, 19 Sep 2012 12:56:45 GMT
Hi,

On Wed, Sep 19, 2012 at 2:11 PM, Michael Dürig <michid@gmail.com> wrote:
> Incidentally I was playing around with something along these lines on top of
> the Tree interface lately. To see how things work out I implemented a
> 'mounting' feature to mount a tree onto a sub-tree at a given path. My
> implementation uses a decorator on top of the Tree interface for tracking
> the mount point, the host tree and the mounted tree. Still very raw, but
> workable:
> https://github.com/mduerig/jackrabbit-oak/commit/9b1492e3c83aaed2f919196cddc60d5915add6f8

Nice!

> My tree decorating approach is one way. However I feel this can get pretty
> complex for other cases where one for example wants to map virtual
> properties into certain nodes. The main source of complexity is inherited
> from the complexity of the Tree interface (mutators, navigators, helpers and
> so on).

Right. I'm not sure if the decorator pattern is the right solution
here, as it implies having to cover a lot of functionality and complex
state. An internal extension point inside the Tree (or NodeState)
implementation might be a simpler alternative.

BR,

Jukka Zitting

Mime
View raw message