[Yanel-dev] organization of data
simon litwan
simon.litwan at wyona.com
Wed Feb 27 16:50:39 CET 2008
> 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.)
i've implemented two new resourceResolver. one with the scheme
"resourcehtdocs:" which access files within the resource-types htdocs
directory and an other one with the scheme "resourceyanelhtdocs:" which
access files within the resource-types yanel-htdocs directory.
i'm not very happy with the naming of the schemes maybe someone has a
better idea.
here again the two examples for the schemes:
resourcehtdocs:/bar/foo.xml
resourceyanelhtdocs:/bar/foo.xml
BTW: this resourceResolver will access data in the package and if no
package exists via filesystem.
simon
>
> 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
>>
>>
>
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
More information about the Yanel-development
mailing list