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

Rory Douglas commented on SLING-535:
------------------------------------

I think both approaches are equally valid.  I definitely see the advantage in 
your approach, where we rely on out-of-the-box Dojo components for stores & 
widgets, and customize the JSON-providing server-side to match what the stores 
expect.

On the other hand, given the intent of the dojo.data API, I'm not sure it's a 
considerable maintenance burden implementing a Sling-specific store either.  I 
don't think any server-side API intended for a dojo.data Store should really be 
widget-specific - it should be possible to plug the same JSON structure into a 
store, then that store into a Tree or a ComboBox and get the expected results.

The current SlingNodeStore/SlingPropertyStore were based off of older DataStore 
examples, they could definitely benefit from being reworked as ServiceStore 
subclasses.  However, in conjunction with latest Dojo 1.2 releases (i.e., not 
the one that's included with the build), they work correctly with a variety of 
widgets (Tree, ComboBox, Grid).  I must admit, I haven't tested them with the 
Dojo 1.1 that comes with the build ;-)

Regardless, having multiple ways to do things is always great, so I think a 
JSONRestStore API would be an excellent addition.

> 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.

Reply via email to