You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Michael Wechner <mi...@wyona.com> on 2005/03/08 09:19:16 UTC

TreeSiteManager not everywhere implemented?

It seems to me that within AccessControlSitetreeTransformer doesn't use 
the TreeSiteManager, or do I misunderstand something

grep -rl DefaultSiteTree src/java/*

src/java/org/apache/lenya/cms/cocoon/transformation/AccessControlSitetreeTransformer.java
src/java/org/apache/lenya/cms/site/tree/TreeSiteManager.java
src/java/org/apache/lenya/cms/site/tree/DefaultSiteTree.java
src/java/org/apache/lenya/cms/site/tree/SiteTreeNodeImpl.java

How about backporting the TreeSiteManager to 1.2 ? Because of the problems
re the DefaultSiteTree implementation and maybe replacing it by a Jackrabbit
implementation I think it could make sense to do this?

WDYT?

Thanks

Michi

-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: TreeSiteManager not everywhere implemented?

Posted by Michael Wechner <mi...@wyona.com>.
Andreas Hartmann wrote:

>> Anyway, I think JCRSiteTree is a good name (I first wanted to call it 
>> JackrabbitSiteTree).
>
>
> Do we use any jackrabbit classes directly? This would again mean to
> access implementation details :) IMO we should only use javax.jcr.*


that's it actually, whereas the RegistryHelper is

org.apache.jackrabbit.core.jndi.RegistryHelper

being used to get the repository. It's just because Jackrabbit is the 
reference implementation and that's why it stuck to me.

Michi


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: TreeSiteManager not everywhere implemented?

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:
> Andreas Hartmann wrote:
> 
>> Michael Wechner wrote:
>>
>> [...]
>>
>>>> IIUC you consider backporting the whole site manager concept to 1.2?
>>>> I don't see any benefits of this approach. It would add complexity, 
>>>> because
>>>> we can't close the sitetree API in 1.2 (this would break backwards
>>>> compatibility),
>>>
>>>
>>>
>>>
>>>
>>> right, it's possible that people used the DefaultSiteTree within 
>>> customized classes
>>
>>
>>
>> Actually they shouldn't. Publication.getSiteTree(...) returns a SiteTree
>> object which does not expose implementation details.
> 
> 
> 
> one shouldn't ;-) well, I guess we will see ...

It is often possible to access implementation details through backdoors.
But this is a generally discouraged programming style and IMO people who
do this should be aware of the drawbacks. We can't do anything about it.


>>>> and adding another set of interfaces would mean
>>>> "another way to do things".
>>>>
>>>> Why don't we just change the sitetree implementation?
>>>
>>>
>>>
>>>
>>>
>>> sure, we can do that, but I guess it will break backwards 
>>> compatibility as well ;-)
>>
>>
>>
>> The JCRSiteTree should just implement the SiteTree interface, so
>> backwards compatibility should be preserved.
> 
> 
> 
> right, except if people might have used the DefaultSiteTree directly.

See above.

> Anyway, I think JCRSiteTree is a good name (I first wanted to call it 
> JackrabbitSiteTree).

Do we use any jackrabbit classes directly? This would again mean to
access implementation details :) IMO we should only use javax.jcr.*
(which means being independent from jackrabbit), but I didn't yet dig
that deep into the subject to judge this.

> As said before I won't check in my stuff directly but rather will create 
> a contrib
> such that people can discuss it first.

OK, I'm looking forward to it :)

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: TreeSiteManager not everywhere implemented?

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Michael Wechner wrote:

> right, except if people might have used the DefaultSiteTree directly.

we can only guarantee backwards compatibility for people who use the API 
correctly.



-- 
Gregor J. Rothfuss
COO, Wyona       Content Management Solutions    http://wyona.com
Apache Lenya                              http://lenya.apache.org
gregor.rothfuss@wyona.com                       gregor@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: TreeSiteManager not everywhere implemented?

Posted by Michael Wechner <mi...@wyona.com>.
Andreas Hartmann wrote:

> Michael Wechner wrote:
>
> [...]
>
>>> IIUC you consider backporting the whole site manager concept to 1.2?
>>> I don't see any benefits of this approach. It would add complexity, 
>>> because
>>> we can't close the sitetree API in 1.2 (this would break backwards
>>> compatibility),
>>
>>
>>
>>
>> right, it's possible that people used the DefaultSiteTree within 
>> customized classes
>
>
> Actually they shouldn't. Publication.getSiteTree(...) returns a SiteTree
> object which does not expose implementation details.


one shouldn't ;-) well, I guess we will see ...

>
>>
>>> and adding another set of interfaces would mean
>>> "another way to do things".
>>>
>>> Why don't we just change the sitetree implementation?
>>
>>
>>
>>
>> sure, we can do that, but I guess it will break backwards 
>> compatibility as well ;-)
>
>
> The JCRSiteTree should just implement the SiteTree interface, so
> backwards compatibility should be preserved.


right, except if people might have used the DefaultSiteTree directly.

Anyway, I think JCRSiteTree is a good name (I first wanted to call it 
JackrabbitSiteTree).

As said before I won't check in my stuff directly but rather will create 
a contrib
such that people can discuss it first.

Michi

>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: TreeSiteManager not everywhere implemented?

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:

[...]

>> IIUC you consider backporting the whole site manager concept to 1.2?
>> I don't see any benefits of this approach. It would add complexity, 
>> because
>> we can't close the sitetree API in 1.2 (this would break backwards
>> compatibility),
> 
> 
> 
> right, it's possible that people used the DefaultSiteTree within 
> customized classes

Actually they shouldn't. Publication.getSiteTree(...) returns a SiteTree
object which does not expose implementation details.

> 
>> and adding another set of interfaces would mean
>> "another way to do things".
>>
>> Why don't we just change the sitetree implementation?
> 
> 
> 
> sure, we can do that, but I guess it will break backwards compatibility 
> as well ;-)

The JCRSiteTree should just implement the SiteTree interface, so
backwards compatibility should be preserved.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: TreeSiteManager not everywhere implemented?

Posted by Michael Wechner <mi...@wyona.com>.
Andreas Hartmann wrote:

> Michael Wechner wrote:
>
> [...]
>
>>>> src/java/org/apache/lenya/cms/site/tree/TreeSiteManager.java
>>>> src/java/org/apache/lenya/cms/site/tree/DefaultSiteTree.java
>>>> src/java/org/apache/lenya/cms/site/tree/SiteTreeNodeImpl.java
>>>>
>>>> How about backporting the TreeSiteManager to 1.2 ? Because of the 
>>>> problems
>>>> re the DefaultSiteTree implementation and maybe replacing it by a 
>>>> Jackrabbit
>>>> implementation I think it could make sense to do this?
>>>
>>>
>>>
>>>
>>> The TreeSiteManager does not add any functionality. It acts as
>>> a facade to the SiteTree, implementing the SiteManager interface.
>>> So I don't think it will help to backport it to 1.2.
>>
>>
>>
>>
>> well, I thought if we are going to exchange the sitetree 
>> implementation anyway, why
>> not introducing the facade, because I think it would be nearly the 
>> same effort.
>
>
>
> IIUC you consider backporting the whole site manager concept to 1.2?
> I don't see any benefits of this approach. It would add complexity, 
> because
> we can't close the sitetree API in 1.2 (this would break backwards
> compatibility),


right, it's possible that people used the DefaultSiteTree within 
customized classes

> and adding another set of interfaces would mean
> "another way to do things".
>
> Why don't we just change the sitetree implementation?


sure, we can do that, but I guess it will break backwards compatibility 
as well ;-)

> The sitetree
> implementation does not differ considerably between 1.2 and 1.4, so the
> new implementation could be used in 1.2 and 1.4 without porting anything.
> I could imagine that this is much less work.


I will check in a "contrib" anyway and then it might be easier to decide.

Thanks

Michi

>
>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: TreeSiteManager not everywhere implemented?

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:

[...]

>>> src/java/org/apache/lenya/cms/site/tree/TreeSiteManager.java
>>> src/java/org/apache/lenya/cms/site/tree/DefaultSiteTree.java
>>> src/java/org/apache/lenya/cms/site/tree/SiteTreeNodeImpl.java
>>>
>>> How about backporting the TreeSiteManager to 1.2 ? Because of the 
>>> problems
>>> re the DefaultSiteTree implementation and maybe replacing it by a 
>>> Jackrabbit
>>> implementation I think it could make sense to do this?
>>
>>
>>
>> The TreeSiteManager does not add any functionality. It acts as
>> a facade to the SiteTree, implementing the SiteManager interface.
>> So I don't think it will help to backport it to 1.2.
> 
> 
> 
> well, I thought if we are going to exchange the sitetree implementation 
> anyway, why
> not introducing the facade, because I think it would be nearly the same 
> effort.


IIUC you consider backporting the whole site manager concept to 1.2?
I don't see any benefits of this approach. It would add complexity, because
we can't close the sitetree API in 1.2 (this would break backwards
compatibility), and adding another set of interfaces would mean
"another way to do things".

Why don't we just change the sitetree implementation? The sitetree
implementation does not differ considerably between 1.2 and 1.4, so the
new implementation could be used in 1.2 and 1.4 without porting anything.
I could imagine that this is much less work.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: TreeSiteManager not everywhere implemented?

Posted by Michael Wechner <mi...@wyona.com>.
Andreas Hartmann wrote:

> Michael Wechner wrote:
>
>> It seems to me that within AccessControlSitetreeTransformer doesn't 
>> use the TreeSiteManager, or do I misunderstand something
>>
>> grep -rl DefaultSiteTree src/java/*
>>
>> src/java/org/apache/lenya/cms/cocoon/transformation/AccessControlSitetreeTransformer.java 
>
>
>
> This one uses the DefaultSiteTree only to access the static
> fields for namespace URIs and element names. That's not nice
> because the implementation details are exposed. IMO the
> code should rather be transfered to the site package.


ok

>
>
>> src/java/org/apache/lenya/cms/site/tree/TreeSiteManager.java
>> src/java/org/apache/lenya/cms/site/tree/DefaultSiteTree.java
>> src/java/org/apache/lenya/cms/site/tree/SiteTreeNodeImpl.java
>>
>> How about backporting the TreeSiteManager to 1.2 ? Because of the 
>> problems
>> re the DefaultSiteTree implementation and maybe replacing it by a 
>> Jackrabbit
>> implementation I think it could make sense to do this?
>
>
> The TreeSiteManager does not add any functionality. It acts as
> a facade to the SiteTree, implementing the SiteManager interface.
> So I don't think it will help to backport it to 1.2.


well, I thought if we are going to exchange the sitetree implementation 
anyway, why
not introducing the facade, because I think it would be nearly the same 
effort.

Michi

>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: TreeSiteManager not everywhere implemented?

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:
> It seems to me that within AccessControlSitetreeTransformer doesn't use 
> the TreeSiteManager, or do I misunderstand something
> 
> grep -rl DefaultSiteTree src/java/*
> 
> src/java/org/apache/lenya/cms/cocoon/transformation/AccessControlSitetreeTransformer.java 

This one uses the DefaultSiteTree only to access the static
fields for namespace URIs and element names. That's not nice
because the implementation details are exposed. IMO the
code should rather be transfered to the site package.


> src/java/org/apache/lenya/cms/site/tree/TreeSiteManager.java
> src/java/org/apache/lenya/cms/site/tree/DefaultSiteTree.java
> src/java/org/apache/lenya/cms/site/tree/SiteTreeNodeImpl.java
> 
> How about backporting the TreeSiteManager to 1.2 ? Because of the problems
> re the DefaultSiteTree implementation and maybe replacing it by a 
> Jackrabbit
> implementation I think it could make sense to do this?

The TreeSiteManager does not add any functionality. It acts as
a facade to the SiteTree, implementing the SiteManager interface.
So I don't think it will help to backport it to 1.2.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org