[OGo-Developer] Understanding ZideStore (& RSS)

Helge Hess developer@opengroupware.org
Mon, 4 Dec 2006 18:58:29 +0100


On Dec 4, 2006, at 16:23, Adam Tauno Williams wrote:
> I'm trying to better understand how ZideStore works,  and I think I'm
> starting to get it.  But a couple bits I'm unsure about.
>
> In ZideStore/Protocols/RSS/product.plist -
>   categories = {
>     SxFolder = {
>       methods = {
>         "rss" = {
>           protectedBy = "View";
>           pageName    = "SxFolderRSS";
>         };
>       };
>     };
> - maps the "rss" method to the SxFolderRSS class

Actually its mapped to the SxFolderRSS "WOComponent" (pageName)  
(which implies special initialization and context).

I think you can also map to arbitary Objective-C classes (with  
'class'? ;-)


> Yet I can view project notes via
> http://{server}/zidestore/so/{username}/Projects/{projectNumber}/ 
> Notes.rss *OR* http://{server}/zidestore/so/{username}/Projects/ 
> Notes/{projectNumber}/rss.  Does SOPE (?) treat either the "." or  
> the "/" as a method delimiter?

Hm, no. "/" is the delimiter for the object traversal path (which can  
lead to callable objects).
Sometimes a file extension gets stripped (eg Calendar/12345 and  
Calendar/12345.ics will both lead to the same object), though not in  
this case.

The /rss is reachable because of the mapping in the RSS bundle you  
show above. "Notes.rss" is explicitly mapped in the ZSProjects bundle.


> I also notice that SxProjectNotesRSS.m is over in
> ZideStore/SoObjects/ZSProjects and not in the RSS bundle (where
> SxTaskFolder+RSS is in the RSS bundle).  Is this just arbitrary or do
> the two reflect different approaches?

Good question, I'm not sure why we have both
   http://{server}/zidestore/so/{username}/Projects/{projectNumber}/ 
Notes.rss
and
   http://{server}/zidestore/so/{username}/Projects/{projectNumber}/ 
Notes/rss

Most likely we had the first one first and later we added the  
"generic" rss method which works on all SxFolder objects. So this  
might need a bit of refactoring.

Even if we do want to support Notes.rss for convenience, I think I  
would have implemented that as a simple alias for Notes/rss.

Greets,
   Helge
-- 
Helge Hess
http://docs.opengroupware.org/Members/helge/