Some new questions : <div><br><div><font size="4"><b>JavaScript</b></font></div><div><font size="4"><b><br></b></font></div><div><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,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 class="nx">cars</span><span class="p">.</span><span class="nx">updatePageConfig</span><span class="p">({</span>
    <span class="nx">offset</span><span class="o" style="font-weight:bold">:</span> <span class="mi" style="color:rgb(0,153,153)">2</span><span class="p">,</span>
    <span class="nx">limit</span><span class="o" style="font-weight:bold">:</span> <span class="mi" style="color:rgb(0,153,153)">10</span>
<span class="p">});</span></pre><div>can we also shortcut this way ?</div><div><br></div><div><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,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 class="nx">cars</span><span class="p">.</span><span class="nx">read</span><span class="p">({</span>
    <span class="nx">page</span><span class="o" style="font-weight:bold">:</span> <span class="s2" style="color:rgb(221,17,68)">&quot;prev&quot;</span><span class="p">,</span>
    <span class="nx">pageConfig</span><span class="o" style="font-weight:bold">:</span> <span class="p">{</span>
      <span class="nx">offset</span><span class="o" style="font-weight:bold">:</span> <span class="mi" style="color:rgb(0,153,153)">2</span><span class="p">,</span>
      <span class="nx">limit</span><span class="o" style="font-weight:bold">:</span> <span class="mi" style="color:rgb(0,153,153)">10</span>
    <span class="p">},</span>
    <span class="nx">success</span><span class="o" style="font-weight:bold">:</span> <span class="kd" style="font-weight:bold">function</span><span class="p">(</span> <span class="nx">data</span> <span class="p">)</span> <span class="p">{</span>
        <span class="c1" style="color:rgb(153,153,136);font-style:italic">// do something</span>
    <span class="p">},</span>
    <span class="nx">error</span><span class="o" style="font-weight:bold">:</span> <span class="kd" style="font-weight:bold">function</span><span class="p">()</span> <span class="p">{</span>
        <span class="c1" style="color:rgb(153,153,136);font-style:italic">// handle it</span>
    <span class="p">}</span>
<span class="p">});</span></pre></div><div><br></div>Another alternative : What about removing the &quot;page&quot; attribute and include a &quot;action&quot; attribute inside a &quot;paging&quot; block ? If paging block isn&#39;t present we implicitly know we don&#39;t want paging :</div>
<div><br></div><div><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,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 class="nx">cars</span><span class="p">.</span><span class="nx">read</span><span class="p">({</span>
    <span class="nx">paging</span><span class="o" style="font-weight:bold">:</span> <span class="p">{</span>
      <span class="nx">action</span><span class="o" style="font-weight:bold">:</span> <span class="s2" style="color:rgb(221,17,68)">&quot;prev&quot;</span><span class="p">,</span> <span class="c1" style="color:rgb(153,153,136);font-style:italic">//can be &quot;next&quot;</span>
      <span class="nx">offset</span><span class="o" style="font-weight:bold">:</span> <span class="mi" style="color:rgb(0,153,153)">2</span><span class="p">,</span> <span class="c1" style="color:rgb(153,153,136);font-style:italic">//optional</span>
      <span class="nx">limit</span><span class="o" style="font-weight:bold">:</span> <span class="mi" style="color:rgb(0,153,153)">10</span> <span class="c1" style="color:rgb(153,153,136);font-style:italic">//optional </span>
    <span class="p">},</span>
    <span class="nx">success</span><span class="o" style="font-weight:bold">:</span> <span class="kd" style="font-weight:bold">function</span><span class="p">(</span> <span class="nx">data</span> <span class="p">)</span> <span class="p">{</span>
        <span class="c1" style="color:rgb(153,153,136);font-style:italic">// do something</span>
    <span class="p">},</span>
    <span class="nx">error</span><span class="o" style="font-weight:bold">:</span> <span class="kd" style="font-weight:bold">function</span><span class="p">()</span> <span class="p">{</span>
        <span class="c1" style="color:rgb(153,153,136);font-style:italic">// handle it</span>
    <span class="p">}</span>
<span class="p">});</span></pre><div class="gmail_quote"><br></div><div class="gmail_quote"><font size="4"><b>General remark </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>
<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 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 href="https://gist.github.com/4546737" target="_blank">https://gist.github.com/4546737</a><br>
<span class="HOEnZb"><font color="#888888"><br>
-M<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Wed, Jan 16, 2013 at 12:46 PM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org">matzew@apache.org</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; a few quick/simple q&#39;s:<br>
&gt;<br>
&gt; JavaScript<br>
&gt;<br>
&gt; One question on the two gists...<br>
&gt;<br>
&gt; Kris&#39; gist uses pipe.next() of scrolling forward, Summer&#39;s comparison gist<br>
&gt; uses pipe.read(page:&quot;next&quot;) for the JS.<br>
&gt;<br>
&gt; I think I do like the &#39;plain&#39; 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:&quot;prev&quot;......<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:&quot;next&quot;) ?<br>
&gt; I hope it does not issue a JS/type error :-) but I&#39;d expect to have a<br>
&gt; straight read of ALL the &quot;objects&quot; (or &quot;entities&quot;)...<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;   @Override<br>
&gt;   void onSuccess(List&lt;Car&gt; data) {<br>
&gt;     firstPage = data;<br>
&gt;   }<br>
&gt;<br>
&gt;   @Override<br>
&gt;   void onError(Exception ex) {<br>
&gt;     //handle error<br>
&gt;   }<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 href="mailto:supittma@redhat.com">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 &quot;midflight&quot; - something really straight to the point (no fluff, just<br>
&gt;&gt; stuff)<br>
&gt;&gt;<br>
&gt;&gt; I forked Kris&#39;s gist and added android stuff using my proposal (sans<br>
&gt;&gt; blocking methods)<br>
&gt;&gt; <a 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 href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt;&gt; <a 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 href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt;&gt; <a 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 href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
&gt; sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
&gt; twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
<br>
<br>
<br>
--<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><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>
</div></div></blockquote></div><br></div></div>