<br><br><div class="gmail_quote">On Thu, Mar 14, 2013 at 3:16 PM, Sebastien Blanc <span dir="ltr"><<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ok,<div>Do we limit the depth to 1 ? </div><div>Because in theory we could have </div><div><br></div><div>/companies/1/teams/1/slackers</div></blockquote><div><br></div><div><br></div><div><br></div><div>what about.....:</div>
<div><a href="https://gist.github.com/matzew/ede419300262af93140a">https://gist.github.com/matzew/ede419300262af93140a</a></div><div><br></div><div>I guess that suxx too</div><div><br></div><div><br></div><div><br></div><div>
<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div class="h5"><br><br><br><div class="gmail_quote">On Thu, Mar 14, 2013 at 3:10 PM, Kris Borchers <span dir="ltr"><<a href="mailto:kris@redhat.com" target="_blank">kris@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div>On Mar 14, 2013, at 3:48 AM, Matthias Wessendorf <<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>> wrote:</div>
<br><blockquote type="cite"><br><br><div class="gmail_quote">On Thu, Mar 14, 2013 at 9:32 AM, Sebastien Blanc <span dir="ltr"><<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<div>While I was playing with scaffolding and tried to build a simple Blog Application with Aerogear I faced the current situation :</div><div>I have a <b>Post</b> object which contains many <b>Comment</b> objects. Now I want to call my Post pipe to retrieve the related comments, I have currently 2 options :</div>
<div><b><br></b></div><div><b>/posts/1</b> -> assuming comments will be implicitly retrieved (eager loading)</div><div><b>/comments/?postid=1</b></div><div><br></div><div>But regarding our model the correct form should be : </div>
<div><br></div><div><b>/posts/1/comments</b></div></blockquote><div><br></div><div><br></div><div>+1 </div><div>that is the ideal way to model URIs for "nested" resources.</div></div></blockquote><div><br></div>
</div>+1<div><br><blockquote type="cite"><div class="gmail_quote"><div><br></div><div>See [1], extracted from [2]</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><b><br></b></div><div>But, AFAIK, with the current API, it is not possible to define this last pattern (at least for JS and iOs, confirmed by Matzew). When doing a <b>read </b>we can pass an <b>id </b>option but as mentioned in the doc, this id will always be append to the endpoint.</div>
</blockquote><div><br></div><div><br></div><div>Well, it is possible - but in a very (IMO) ugly way:</div><div><br></div><div><a href="https://gist.github.com/matzew/6ab432e437b9a017a21d" target="_blank">https://gist.github.com/matzew/6ab432e437b9a017a21d</a></div>
</div></blockquote><div><br></div></div>+1 - Ugly<div><br><blockquote type="cite"><div class="gmail_quote">
<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div><div>IMO, we should be able to support this pattern but for now I'm not really sure how to specify this in our API, so if you have any ideas feedback this thread has been made for you ! </div></blockquote>
<div><br></div><div><br></div><div><br></div><div>Suggestion: Enhance the read function - example:</div><div><br></div><div><a href="https://gist.github.com/matzew/04f069dfbed2cc77a8b4" target="_blank">https://gist.github.com/matzew/04f069dfbed2cc77a8b4</a></div>
</div></blockquote><div><br></div></div>+1 - So for JS we could just add a 'resource' (not crazy about that name) option to the read options which, if present, would be tacked on to the url after the id.<br><blockquote type="cite">
<div><div class="gmail_quote">
<div><br></div><div><br></div><div>-Matthias</div><div><br></div><div><br></div><div>[1] <a href="http://www.infoq.com/resource/articles/rest-introduction/en/resources/figure2.jpg" target="_blank">http://www.infoq.com/resource/articles/rest-introduction/en/resources/figure2.jpg</a></div>
<div>[2] <a href="http://www.infoq.com/articles/rest-introduction" target="_blank">http://www.infoq.com/articles/rest-introduction</a></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div>
<div>Seb</div><div> </div>
<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>
<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
</div>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
_______________________________________________<div><br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></div>
</blockquote></div><br></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>
<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>