[Yanel-dev] organization of data
simon litwan
simon.litwan at wyona.com
Mon Feb 25 12:31:38 CET 2008
Evaldas Taroza schrieb:
i think it even would make sense to allow a resource to contain the
jelly scripts since they are highly resource specific. i anyway would
suggest to add two methode to the resource class.
public InputStream getHtdocs(String path) ;
public InputStream getYanelHtdocs(String path);
which lets you programmatically access htdosc/yanel-htodcs.
then we could introduce a kind a protocol in the rc. e.g. htdocs://
resp. yanelhtdocs://
<view id="tablelist" type="jelly">
<xslt>/xslt/usecase.xsl</xslt>
<template>htdocs://create-tablelist-shortcut.jelly</template>
<mime-type>text/html</mime-type>
</view>
this would use the jelly provided by the resource via htdocs.
one could overwrite the jelly by omitting the protocol and point to a
jelly in the realms data repository.
BTW:
i think if the method public InputStream getHtdocs(String path) would
access the data via package resolving we would go a step forward to
provide resource-types as packages (which i consider very important.)
simon
>
>
> Michael Wechner wrote:
>> Evaldas Taroza wrote:
>>
>>> Hi,
>>> Maybe we should think about how to better organize data in the
>>> repository. I mean we need some conventions. Currently we just put
>>> everything into /data and that's it. So javascripts, xslt, jelly,
>>> css together with the actual content gets there. I don't think it is
>>> nice. Because some of the scripts (like jelly, xslt) belong to some
>>> of the content and is not reusable,
>>
>>
>> reusable refering to what? Re reusing with the different realms?
> Yes, realm. Usually when we write a jelly script, or XSLT it won't
> make sense in other contexts. Also, some jellys make sense only for
> one resource configuration only, although there might be some global
> xslts.
>
>>
>>> so they should lie somewhere logically close to each other.
>>
>>
>> to each other what?
> For instance, all the jelly scripts and xslt about the image gallery
> should be somewhere in the same place, it's like a bunch of scripts
> that are used by one .yanel-rc file. So it should be somehow easy and
> natural to find these scripts after you look into .yanel-rc.
>
>>
>>>
>>> I saw Josias is using some layout according to usecases.
>>>
>>> Has anyone suggestions about the conventions?
>>
>>
>> I very much agree that we should tell people about best practice,
>> whereas feel free to make a proposal ;-)
> Yes, I agree, the conventions I am talking about could be like best
> practices.
>
> For me the best thing would be to keep .yanel-rc together with
> dependent scripts (jelly and xslt). So I would have something like:
> .../gallery/
> C/[with all the .yanel-rc, jelly, xslt files for creating]
> R/[with all the .yanel-rc, jelly, xslt files for reading]
> U/[with all the .yanel-rc, jelly, xslt files for modifying]
> D/[with all the .yanel-rc, jelly, xslt files for deleting]
> .../wiki/
> C/
> R/
> U/
> D/
> ...etc.
>
> This way it is clear what content are we talking about, what are the
> resources used for CRUD and what are related scripts(if any). This
> proposal, however, implies mixing what we currently keep in separate
> folders: 'data' and 'res-configs', so I am not sure how to configure
> everything.
>
> What do you think?
>
> Evaldas
>
>
More information about the Yanel-development
mailing list