You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Andreas Hartmann (JIRA)" <ji...@apache.org> on 2009/03/12 22:54:50 UTC

[jira] Issue Comment Edited: (SLING-535) Align Node and Property Stores with Dojo's upcoming JsonRestStore

    [ https://issues.apache.org/jira/browse/SLING-535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681513#action_12681513 ] 

Andreas Hartmann edited comment on SLING-535 at 3/12/09 2:53 PM:
-----------------------------------------------------------------

I have added some classes to a project of mine:

http://code.google.com/p/lancre/source/browse/#svn/trunk/dojo-sling/src/main/java/org/lancre/sling/json

There are some proprietary things in the code, but I'll try to make it generic asap.

Some details:

The JsonDojoTreeServlet responds to two different selectors:
* foo.tree.dojojson -> Render the resource as a JSON array to use for the store. The children use $ref properties for lazy loading.
* foo.node.dojojson -> Render the resource as a JSON object to load a node.

A ResourceFilter interface is used to control which children and properties are included in the tree. IMO it is a bit cumbersome to control this from the client, e.g. using queries, but maybe makes sense to support both approaches.

I'm not sure how to handle the labelling of tree nodes. Maybe it makes sense to introduce an interface to resolve the label of a resource.



      was (Author: andreas@apache.org):
    I have added some classes to a project of mine:

http://code.google.com/p/lancre/source/browse/#svn/trunk/dojo-sling/src/main/java/org/lancre/sling/json

There are some proprietary things in the code, but I'll try to make it generic asap.

Some details:

The JsonDojoTreeServlet responds to two different selectors:
* foo.tree.dojojson -> Render the resource as a JSON array to use for the store. The children use $ref properties for lazy loading.
* foo.node.dojojson -> Render the resource as a JSON object to lazy-load a node

A ResourceFilter interface is used to control which children and properties are included in the tree. IMO it is a bit cumbersome to control this using queries from the client, e.g. using queries, but maybe makes sense to support both approaches.

I'm not sure how to handle the labelling of tree nodes. Maybe it makes sense to introduce an interface to resolve the label of a resource.


  
> Align Node and Property Stores with Dojo's upcoming JsonRestStore
> -----------------------------------------------------------------
>
>                 Key: SLING-535
>                 URL: https://issues.apache.org/jira/browse/SLING-535
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Lars Trieloff
>            Assignee: Lars Trieloff
>            Priority: Minor
>
> Dojo 1.2 will include (aside from widget beautification) a JsonRestStore that works very closely to what we already have in the dojo extensions, but it provides some additional features like object synchronization (which is good performance-wise if you are doing many reads on a node) and integration with Google Gears for offline support.
> Thanks to Michael Marth for spotting this and please assign this issue to me if possible.
> http://www.sitepen.com/blog/2008/06/13/restful-json-dojo-data/

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.