<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 01/16/2013 08:43 AM, Sebastien Blanc
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAD_dpu2SNwUB4v0tdAqY4NsOLNTrdx673eso6aiiXLuHtis0kA@mail.gmail.com"
      type="cite">On Wed, Jan 16, 2013 at 2:24 PM, Kris Borchers <span
        dir="ltr">&lt;<a moz-do-not-send="true"
          href="mailto:kris@redhat.com" target="_blank">kris@redhat.com</a>&gt;</span>
      wrote:<br>
      <div class="gmail_quote">
        <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 class="im">
                <div>On Jan 16, 2013, at 6:46 AM, Matthias Wessendorf
                  &lt;<a moz-do-not-send="true"
                    href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;
                  wrote:</div>
                <br>
              </div>
              <blockquote type="cite">
                <br>
                <br>
                <div class="gmail_quote">
                  <div>
                    <div class="h5">
                      <blockquote class="gmail_quote" style="margin:0 0
                        0 .8ex;border-left:1px #ccc
                        solid;padding-left:1ex">
                        <div>Another alternative : What about removing
                          the "page" attribute and include a "action"
                          attribute inside a "paging" block ? If paging
                          block isn't present we&nbsp;implicitly&nbsp;know we
                          don't want paging :</div>
                        <div><br>
                        </div>
                        <div>
                          <pre style="font-size:13px;line-height:19px;font-family:Consolas,'Liberation Mono',Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px"><span>cars</span><span>.</span><span>read</span><span>({</span>
    <span>paging</span><span style="font-weight:bold">:</span> <span>{</span>
      <span>action</span><span style="font-weight:bold">:</span> <span style="color:rgb(221,17,68)">"prev"</span><span>,</span> <span style="color:rgb(153,153,136);font-style:italic">//can be "next"</span>
      <span>offset</span><span style="font-weight:bold">:</span> <span style="color:rgb(0,153,153)">2</span><span>,</span> <span style="color:rgb(153,153,136);font-style:italic">//optional</span>
      <span>limit</span><span style="font-weight:bold">:</span> <span style="color:rgb(0,153,153)">10</span> <span style="color:rgb(153,153,136);font-style:italic">//optional </span><div>
    <span>},</span>
    <span>success</span><span style="font-weight:bold">:</span> <span style="font-weight:bold">function</span><span>(</span> <span>data</span> <span>)</span> <span>{</span>
        <span style="color:rgb(153,153,136);font-style:italic">// do something</span>
    <span>},</span>
    <span>error</span><span style="font-weight:bold">:</span> <span style="font-weight:bold">function</span><span>()</span> <span>{</span>
        <span style="color:rgb(153,153,136);font-style:italic">// handle it</span>
    <span>}</span>
<span>});</span></div></pre>
                          <div class="gmail_quote"><br>
                          </div>
                        </div>
                      </blockquote>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>But the '<span
                          style="background-color:rgb(248,248,248);font-family:Consolas,'Liberation
Mono',Courier,monospace;font-size:13px;line-height:19px">updatePageConfig'
                        </span>would be still around ?</div>
                      <div><br>
                      </div>
                      <div>If I "touch" (update) the limit/offset, it is
                        globally stored, and reused, right ?&nbsp;</div>
                      <div><br>
                      </div>
                      <div>I always have to provide a paging block, at
                        least like this, right ?</div>
                      <div>==&gt; cars.read({</div>
                      <div>&nbsp; &nbsp; paging: {</div>
                      <div>&nbsp; &nbsp; &nbsp; action: "prev", //can be "next"</div>
                      <div>&nbsp; &nbsp; },...........;</div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>BTW. action sounds Struts :)&nbsp;</div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>&nbsp;</div>
                      <blockquote class="gmail_quote" style="margin:0 0
                        0 .8ex;border-left:1px #ccc
                        solid;padding-left:1ex">
                        <div class="gmail_quote"><font size="4"><b>General
                              remark&nbsp;</b></font></div>
                        <div class="gmail_quote">Do we want to describe
                          in the specs the following use cases ?</div>
                        <div class="gmail_quote"><br>
                        </div>
                        <div class="gmail_quote">- Calling previous on
                          the first page</div>
                        <div class="gmail_quote">- Calling next on the
                          last page</div>
                        <div class="gmail_quote">- Setting an offset
                          &gt; total number of pages</div>
                      </blockquote>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                    </div>
                  </div>
                  <div>yeah - would be (more than) nice if that behavior
                    is specified&#8230;.</div>
                </div>
              </blockquote>
              <div><br>
              </div>
              +1 Anyone want to start putting together a specs doc?<br>
            </div>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>&nbsp;Before starting the specs doc, let's first discuss here
          what for behaviour we want for these specific use cases :</div>
        <div><br>
        </div>
        <div>When prev / next does not exist :</div>
        <div>- throwing an exception ?</div>
      </div>
    </blockquote>
    +1<br>
    <blockquote
cite="mid:CAD_dpu2SNwUB4v0tdAqY4NsOLNTrdx673eso6aiiXLuHtis0kA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>- returning null ?</div>
      </div>
    </blockquote>
    Return is really the wrong word for this since we are all using
    callbacks.<br>
    <blockquote
cite="mid:CAD_dpu2SNwUB4v0tdAqY4NsOLNTrdx673eso6aiiXLuHtis0kA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>- returning the current page ?</div>
      </div>
    </blockquote>
    -1<br>
    <blockquote
cite="mid:CAD_dpu2SNwUB4v0tdAqY4NsOLNTrdx673eso6aiiXLuHtis0kA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div><br>
        </div>
        <div>For offset &gt; totalNbPages :</div>
        <div>-&nbsp;throwing an exception ?</div>
      </div>
    </blockquote>
    -1<br>
    <blockquote
cite="mid:CAD_dpu2SNwUB4v0tdAqY4NsOLNTrdx673eso6aiiXLuHtis0kA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>-&nbsp;returning null ?</div>
      </div>
    </blockquote>
    -1, but I could see an argument for returning an EMPTY set<br>
    <blockquote
cite="mid:CAD_dpu2SNwUB4v0tdAqY4NsOLNTrdx673eso6aiiXLuHtis0kA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>- returning last page ?</div>
      </div>
    </blockquote>
    +1 It is possible data will change<br>
    <blockquote
cite="mid:CAD_dpu2SNwUB4v0tdAqY4NsOLNTrdx673eso6aiiXLuHtis0kA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div style="word-wrap:break-word">
            <div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div class="gmail_quote">
                      <div><br>
                      </div>
                      <div>&nbsp;</div>
                      <blockquote class="gmail_quote" style="margin:0 0
                        0 .8ex;border-left:1px #ccc
                        solid;padding-left:1ex">
                        <div>
                          <div>
                            <div class="gmail_quote"><br>
                            </div>
                            <div class="gmail_quote"><br>
                            </div>
                            <div class="gmail_quote">On Wed, Jan 16,
                              2013 at 1:19 PM, Matthias Wessendorf <span
                                dir="ltr">&lt;<a moz-do-not-send="true"
                                  href="mailto:matzew@apache.org"
                                  target="_blank">matzew@apache.org</a>&gt;</span>
                              wrote:<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex">Howdy!<br>
                                <br>
                                I have forked the gist and added the
                                (current) iOS proposal to it:<br>
                                <a moz-do-not-send="true"
                                  href="https://gist.github.com/4546737"
                                  target="_blank">https://gist.github.com/4546737</a><br>
                                <span><font color="#888888"><br>
                                    -M<br>
                                  </font></span>
                                <div><br>
                                  On Wed, Jan 16, 2013 at 12:46 PM,
                                  Matthias Wessendorf &lt;<a
                                    moz-do-not-send="true"
                                    href="mailto:matzew@apache.org"
                                    target="_blank">matzew@apache.org</a>&gt;
                                  wrote:<br>
                                  &gt; Hello,<br>
                                  &gt;<br>
                                  &gt; a few quick/simple q's:<br>
                                  &gt;<br>
                                  &gt; JavaScript<br>
                                  &gt;<br>
                                  &gt; One question on the two gists...<br>
                                  &gt;<br>
                                  &gt; Kris' gist uses pipe.next() of
                                  scrolling forward, Summer's comparison
                                  gist<br>
                                  &gt; uses pipe.read(page:"next") for
                                  the JS.<br>
                                  &gt;<br>
                                  &gt; I think I do like the 'plain'
                                  read overload in JS... - but having a
                                  more<br>
                                  &gt; explicit next() (and others) is
                                  not that bad; but (currently) my vote
                                  would<br>
                                  &gt; be pipe.read(page:"prev"......<br>
                                  &gt;<br>
                                  &gt; Oh... What happens when I have a
                                  regular pipe, object (where the paged<br>
                                  &gt; setting is NOT specified on its
                                  ctor), and I invoke
                                  pipe.read(page:"next") ?<br>
                                  &gt; I hope it does not issue a
                                  JS/type error :-) but I'd expect to
                                  have a<br>
                                  &gt; straight read of ALL the
                                  "objects" (or "entities")...<br>
                                  &gt;<br>
                                  &gt; Android<br>
                                  &gt;<br>
                                  &gt; You have the following:<br>
                                  &gt;<br>
                                  &gt; cars.readWithFilter(filter, new
                                  Callback&lt;Car&gt;() {<br>
                                  &gt; &nbsp; @Override<br>
                                  &gt; &nbsp; void onSuccess(List&lt;Car&gt;
                                  data) {<br>
                                  &gt; &nbsp; &nbsp; firstPage = data;<br>
                                  &gt; &nbsp; }<br>
                                  &gt;<br>
                                  &gt; &nbsp; @Override<br>
                                  &gt; &nbsp; void onError(Exception ex) {<br>
                                  &gt; &nbsp; &nbsp; //handle error<br>
                                  &gt; &nbsp; }<br>
                                  &gt; });<br>
                                  &gt;<br>
                                  &gt;<br>
                                  &gt; firstPage.next(.......);<br>
                                  &gt;<br>
                                  &gt; I am wondering what is the
                                  fristPage here (since the data on the
                                  onSuccess<br>
                                  &gt; has been assigned to it)<br>
                                  &gt;<br>
                                  &gt; Change Offset and Limit<br>
                                  &gt;<br>
                                  &gt; I like both (JS and Android) :)
                                  The Android solution is similar to
                                  what I<br>
                                  &gt; had in mind for iOS...<br>
                                  &gt;<br>
                                  &gt; I will update the comparison gist
                                  soon !<br>
                                  &gt;<br>
                                  &gt; -Matthias<br>
                                  &gt;<br>
                                  &gt;<br>
                                  &gt;<br>
                                  &gt;<br>
                                  &gt;<br>
                                  &gt; On Tue, Jan 15, 2013 at 11:00 PM,
                                  Summers Pittman &lt;<a
                                    moz-do-not-send="true"
                                    href="mailto:supittma@redhat.com"
                                    target="_blank">supittma@redhat.com</a>&gt;<br>
                                  &gt; wrote:<br>
                                  &gt;&gt;<br>
                                  &gt;&gt; On 01/15/2013 02:51 PM,
                                  Douglas Campos wrote:<br>
                                  &gt;&gt;<br>
                                  &gt;&gt; As we wrap the day one of API
                                  design discussions, what about
                                  summarize the<br>
                                  &gt;&gt; API proposals with usage?<br>
                                  &gt;&gt;<br>
                                  &gt;&gt; JS/iOS/Android:<br>
                                  &gt;&gt;<br>
                                  &gt;&gt; 1) usage example, covering
                                  some mentioned usecases like changing
                                  the<br>
                                  &gt;&gt; paging "midflight" -
                                  something really straight to the point
                                  (no fluff, just<br>
                                  &gt;&gt; stuff)<br>
                                  &gt;&gt;<br>
                                  &gt;&gt; I forked Kris's gist and
                                  added android stuff using my proposal
                                  (sans<br>
                                  &gt;&gt; blocking methods)<br>
                                  &gt;&gt; <a moz-do-not-send="true"
                                    href="https://gist.github.com/4542125"
                                    target="_blank">https://gist.github.com/4542125</a><br>
                                  &gt;&gt;<br>
                                  &gt;&gt; I went for pedantic in a
                                  couple of examples...<br>
                                  &gt;&gt;<br>
                                  &gt;&gt;<br>
                                  &gt;&gt; 2) API definition<br>
                                  &gt;&gt;<br>
                                  &gt;&gt; I think this will give the
                                  orthogonal view we need to come to a
                                  decision.<br>
                                  &gt;&gt;<br>
                                  &gt;&gt; kris: What about you
                                  providing a snippet of the API you
                                  hate too? just for<br>
                                  &gt;&gt; comparison sake :P<br>
                                  &gt;&gt;<br>
                                  &gt;&gt; -- qmx<br>
                                  &gt;&gt;
                                  _______________________________________________<br>
                                  &gt;&gt; aerogear-dev mailing list<br>
                                  &gt;&gt; <a moz-do-not-send="true"
                                    href="mailto:aerogear-dev@lists.jboss.org"
                                    target="_blank">aerogear-dev@lists.jboss.org</a><br>
                                  &gt;&gt; <a moz-do-not-send="true"
                                    href="https://lists.jboss.org/mailman/listinfo/aerogear-dev"
                                    target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
                                  &gt;&gt;<br>
                                  &gt;&gt;<br>
                                  &gt;&gt;<br>
                                  &gt;&gt;
                                  _______________________________________________<br>
                                  &gt;&gt; aerogear-dev mailing list<br>
                                  &gt;&gt; <a moz-do-not-send="true"
                                    href="mailto:aerogear-dev@lists.jboss.org"
                                    target="_blank">aerogear-dev@lists.jboss.org</a><br>
                                  &gt;&gt; <a moz-do-not-send="true"
                                    href="https://lists.jboss.org/mailman/listinfo/aerogear-dev"
                                    target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
                                  &gt;&gt;<br>
                                  &gt;<br>
                                  &gt;<br>
                                  &gt;<br>
                                  &gt; --<br>
                                  &gt; Matthias Wessendorf<br>
                                  &gt;<br>
                                  &gt; blog: <a moz-do-not-send="true"
href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
                                  &gt; sessions: <a
                                    moz-do-not-send="true"
                                    href="http://www.slideshare.net/mwessendorf"
                                    target="_blank">http://www.slideshare.net/mwessendorf</a><br>
                                  &gt; twitter: <a
                                    moz-do-not-send="true"
                                    href="http://twitter.com/mwessendorf"
                                    target="_blank">http://twitter.com/mwessendorf</a><br>
                                  <br>
                                  <br>
                                  <br>
                                  --<br>
                                  Matthias Wessendorf<br>
                                  <br>
                                  blog: <a moz-do-not-send="true"
                                    href="http://matthiaswessendorf.wordpress.com/"
                                    target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
                                  sessions: <a moz-do-not-send="true"
                                    href="http://www.slideshare.net/mwessendorf"
                                    target="_blank">http://www.slideshare.net/mwessendorf</a><br>
                                  twitter: <a moz-do-not-send="true"
                                    href="http://twitter.com/mwessendorf"
                                    target="_blank">http://twitter.com/mwessendorf</a><br>
_______________________________________________<br>
                                  aerogear-dev mailing list<br>
                                  <a moz-do-not-send="true"
                                    href="mailto:aerogear-dev@lists.jboss.org"
                                    target="_blank">aerogear-dev@lists.jboss.org</a><br>
                                  <a moz-do-not-send="true"
                                    href="https://lists.jboss.org/mailman/listinfo/aerogear-dev"
                                    target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
                                </div>
                              </blockquote>
                            </div>
                            <br>
                          </div>
                        </div>
                        <br>
                        _______________________________________________<br>
                        aerogear-dev mailing list<br>
                        <a moz-do-not-send="true"
                          href="mailto:aerogear-dev@lists.jboss.org"
                          target="_blank">aerogear-dev@lists.jboss.org</a><br>
                        <a moz-do-not-send="true"
                          href="https://lists.jboss.org/mailman/listinfo/aerogear-dev"
                          target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
                        <br>
                      </blockquote>
                    </div>
                    <br>
                    <br clear="all">
                    <div><br>
                    </div>
                    -- <br>
                    Matthias Wessendorf <br>
                    <br>
                    blog: <a moz-do-not-send="true"
                      href="http://matthiaswessendorf.wordpress.com/"
                      target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
                    sessions: <a moz-do-not-send="true"
                      href="http://www.slideshare.net/mwessendorf"
                      target="_blank">http://www.slideshare.net/mwessendorf</a><br>
                  </div>
                </div>
                twitter: <a moz-do-not-send="true"
                  href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
                _______________________________________________
                <div class="im"><br>
                  aerogear-dev mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:aerogear-dev@lists.jboss.org"
                    target="_blank">aerogear-dev@lists.jboss.org</a><br>
                  <a moz-do-not-send="true"
                    href="https://lists.jboss.org/mailman/listinfo/aerogear-dev"
                    target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
                </div>
              </blockquote>
            </div>
            <br>
          </div>
          <br>
          _______________________________________________<br>
          aerogear-dev mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
          <a moz-do-not-send="true"
            href="https://lists.jboss.org/mailman/listinfo/aerogear-dev"
            target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
aerogear-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>