[Yanel-development] Re: [Yanel-commits] rev 20491 - public/yanel/branches

Michael Wechner michael.wechner at wyona.com
Tue Dec 5 14:56:05 CET 2006


Josias Thöny wrote:

>Hi Michi,
>
>On Fri, 2006-12-01 at 13:11 +0100, Michael Wechner wrote:
>  
>
>>Just being curious, but what kind experiments and refactorings do you 
>>have in mind?
>>    
>>
>
>I'm thinking about making the api a bit easier to use, and about
>refactoring a few things concerning the path mapping (url <-> path <->
>repo), and how resources access the repository and the RTIs.
>In fact I already implemented some of my ideas and committed them right
>now in the sandbox branch. I thought it will make it easier to talk
>about it if there is some code at hand.
>
>I'd appreciate if you and the other devs could have a look at it and
>tell me what they think about it. In case people like it, we could
>eventually merge the changes back into the trunk.
>
>What I changed is the following:
>
>- Mapping between url and path is now done by the Map class.
>  (Before it was done in an implicit way which was not very
>  clear to me)
>  Now it uses the realm configuration (realms.xml) instead of
>  the repository to do the mapping from an url to a realm.
>  
>


agreed, whereas I would pass not only the realm and path, but still the 
whole request such
that onc has the flexibility to do whatever is necessary to do in 
certain cases

>  
>- Resource instances are now bound to their realm and path:
>  When a resource is created, the realm and the path are 
>  passed to the resource, and the resource has methods
>  getPath() and getRealm().
>  The path is relative to the realm, e.g.:
>  url: /yanel-website/foo/bar.html
>  realm: yanel-website
>  path: /foo/bar.html
>  This change required to add new interfaces ModifieableV3 and
>  ViewableV3.
>  
>


agreed, but see above.

Also I thinn ModifieableV2 and VieableV2 have not been released yet, so 
you can add it there instead of ceating new versions (V3).
Just make sure that resource using V2 versions are being upgraded ;-)

>- Added abstraction of rti file: ResourceTypeIdentifier.java
>  This class reads an rti file and provides methods to access
>  the rt identifier string and the properties (similar to a
>  java.util.Map)
>  Resource instances can do getRTI().getProperty("myproperty")
>  to access a property
>  
>

agreed, whereas I think we should re-factor RTI in the sense that are 
XML based, e.g.


<?xml version="1.0"?>

<rti:rti name="wiki" namespace="http://www.wyona.org/yanel/resource/1.0" 
xmlns:rti="http://www.wyona.org/yanel/rti/1.0">

  <wiki:wiki-syntax 
xmlns:wiki="http://www.wyona.org/yanel/resource/wiki/1.0">jspWikiParser</wiki:wiki-syntax>
  <wiki:xslt 
xmlns:wiki="http://www.wyona.org/yanel/resource/wiki/1.0">/xslt/global.xsl</wiki:xslt>

<!-- Alternative: -->
  <rti:property name="wiki-syntax">jspWikiParser</rti:property>
  <rti:property name="xslt">/xslt/global.xsl</rti:propert>
</rti:rti>


whereas we should then write Java class in order to migrate TXTs to XML 
for existing website

WDYT?

>- The repositories are now associated with the realms:
>  Each realm has a default repository and an rti repository.
>  A resource may access the default repository like this:
>  getRealm().getRepository().getInputStream(path);
>  (no need to use YarepUtil anymore)
>  (note that a resource is not forced to use this repository)
>  
>

very much agreed, whereas maybe we should add an example where the 
alternative is shown

>- Added ResourceManager.java and moved some methods to this
>  class to create resources and 
>  access the RTIs.
>  
>

very much agreed as well

>
>Most of my changes are just about restructuring, i.e. I didn't add or
>remove much functionality (apart from the ResourceTypeIdentifier class).
>I tagged quite a few methods as deprecated.
>
>Since I changed quite a lot, a few things are not working atm, e.g the
>atom resource. 
>  
>

I guess you mean the atom-feed resource, right? Why doesn't it work anymore?

Also I think we should rename it to atom-feed

>The only resources I updated to the new interfaces so far are the
>XMLResource and the FileResource. 
>However I believe that those things which are currently broken could be
>fixed rather easily. 
>
>I tried hard not to impair the flexibility or other ideas behind yanel,
>but it might be that I have missed something.
>
>Looking forward to your feedback...
>  
>

sounds great.

Thanks

Michi

>Josias
>
>
>  
>
>>Cheers
>>
>>Michi
>>
>>josias at wyona.com wrote:
>>
>>    
>>
>>>Author: josias
>>>Date: 2006-12-01 12:00:33 +0100 (Fri, 01 Dec 2006)
>>>New Revision: 20491
>>>
>>>Added:
>>>  public/yanel/branches/sandbox/
>>>Log:
>>>added sandbox branch to allow experiments and refactorings.
>>>
>>>
>>>Copied: public/yanel/branches/sandbox (from rev 20490, public/yanel/trunk)
>>>
>>>
>>>_______________________________________________
>>>Yanel-commits mailing list
>>>Yanel-commits at wyona.com
>>>http://wyona.com/cgi-bin/mailman/listinfo/yanel-commits
>>>
>>> 
>>>
>>>      
>>>
>>    
>>
>
>
>_______________________________________________
>Yanel-development mailing list
>Yanel-development at wyona.com
>http://wyona.com/cgi-bin/mailman/listinfo/yanel-development
>
>  
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner at wyona.com                        michi at apache.org
+41 44 272 91 61




More information about the Yanel-development mailing list