-- lightflowmark <1...@lightflowinterrupted.com> wrote
(on Thursday, 23 April 2009, 05:39 AM -0700):
> Is there a bonus to describing the deeper-nested objects as references rather
> than directly  as in this example: 
> http://www.nabble.com/file/p23196054/order_combined.json order_combined.json
> ?  It seems to add obfuscation for deeply-nested arrays.

Basically, it all comes down to what the dojo.data store and the model
consuming it on the client side understand. All my work with dijit.Tree
has used references, so that's what I know works.

> Would code to convert my original $testArr to the format you outline,
> or the outline above, be a good solution for Zend_Dojo_Data?  If so
> I'll try to put something together.

I'd prefer the one from your link -- it's easier to accomplish, and
easier to read -- but, again, it depends on what dojo.data adapter and
tree model you're using on the client side. We could probably influence
which one becomes a de facto standard for use with ZF apps, though. :)


> Matthew Weier O'Phinney-3 wrote:
> > 
> > 
> > Unfortunately, there's not a truly easy way to do this. The format for
> > such hierarchical stores is a bit different:
> > 
> >     {
> >         name: "top",
> >         description: "some description",
> >         children: [
> >             { _reference: "someName" }
> >         ]
> >     },
> >     {
> >         name: "someName",
> >         description: "some description2",
> >         children: [
> >             { _reference: "someDeepName" },
> >             { _reference: "someOtherDeepName" },
> >         ]
> >     },
> >     {
> >         name: "someDeepName",
> >         description: "some deep description2",
> >     },
> >     {
> >         name: "someOtherDeepName",
> >         description: "some deep description4",
> >     },
> > 
> > Notice that all items are at the same level, and that the "children"
> > element of each object is an array of objects referring to other
> > objects.
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/RFC%3A-Zend_Dojo_Data---associative-arrays-tp23175415p23196054.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

-- 
Matthew Weier O'Phinney
Project Lead            | matt...@zend.com
Zend Framework          | http://framework.zend.com/

Reply via email to