<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"><<a moz-do-not-send="true"
href="mailto:kris@redhat.com" target="_blank">kris@redhat.com</a>></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
<<a moz-do-not-send="true"
href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>>
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 implicitly 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 ? </div>
<div><br>
</div>
<div>I always have to provide a paging block, at
least like this, right ?</div>
<div>==> cars.read({</div>
<div> paging: {</div>
<div> action: "prev", //can be "next"</div>
<div> },...........;</div>
<div><br>
</div>
<div><br>
</div>
<div>BTW. action sounds Struts :) </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 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
> 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….</div>
</div>
</blockquote>
<div><br>
</div>
+1 Anyone want to start putting together a specs doc?<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div> 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 > totalNbPages :</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>
-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> </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"><<a moz-do-not-send="true"
href="mailto:matzew@apache.org"
target="_blank">matzew@apache.org</a>></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 <<a
moz-do-not-send="true"
href="mailto:matzew@apache.org"
target="_blank">matzew@apache.org</a>>
wrote:<br>
> Hello,<br>
><br>
> a few quick/simple q's:<br>
><br>
> JavaScript<br>
><br>
> One question on the two gists...<br>
><br>
> Kris' gist uses pipe.next() of
scrolling forward, Summer's comparison
gist<br>
> uses pipe.read(page:"next") for
the JS.<br>
><br>
> I think I do like the 'plain'
read overload in JS... - but having a
more<br>
> explicit next() (and others) is
not that bad; but (currently) my vote
would<br>
> be pipe.read(page:"prev"......<br>
><br>
> Oh... What happens when I have a
regular pipe, object (where the paged<br>
> setting is NOT specified on its
ctor), and I invoke
pipe.read(page:"next") ?<br>
> I hope it does not issue a
JS/type error :-) but I'd expect to
have a<br>
> straight read of ALL the
"objects" (or "entities")...<br>
><br>
> Android<br>
><br>
> You have the following:<br>
><br>
> cars.readWithFilter(filter, new
Callback<Car>() {<br>
> @Override<br>
> void onSuccess(List<Car>
data) {<br>
> firstPage = data;<br>
> }<br>
><br>
> @Override<br>
> void onError(Exception ex) {<br>
> //handle error<br>
> }<br>
> });<br>
><br>
><br>
> firstPage.next(.......);<br>
><br>
> I am wondering what is the
fristPage here (since the data on the
onSuccess<br>
> has been assigned to it)<br>
><br>
> Change Offset and Limit<br>
><br>
> I like both (JS and Android) :)
The Android solution is similar to
what I<br>
> had in mind for iOS...<br>
><br>
> I will update the comparison gist
soon !<br>
><br>
> -Matthias<br>
><br>
><br>
><br>
><br>
><br>
> On Tue, Jan 15, 2013 at 11:00 PM,
Summers Pittman <<a
moz-do-not-send="true"
href="mailto:supittma@redhat.com"
target="_blank">supittma@redhat.com</a>><br>
> wrote:<br>
>><br>
>> On 01/15/2013 02:51 PM,
Douglas Campos wrote:<br>
>><br>
>> As we wrap the day one of API
design discussions, what about
summarize the<br>
>> API proposals with usage?<br>
>><br>
>> JS/iOS/Android:<br>
>><br>
>> 1) usage example, covering
some mentioned usecases like changing
the<br>
>> paging "midflight" -
something really straight to the point
(no fluff, just<br>
>> stuff)<br>
>><br>
>> I forked Kris's gist and
added android stuff using my proposal
(sans<br>
>> blocking methods)<br>
>> <a moz-do-not-send="true"
href="https://gist.github.com/4542125"
target="_blank">https://gist.github.com/4542125</a><br>
>><br>
>> I went for pedantic in a
couple of examples...<br>
>><br>
>><br>
>> 2) API definition<br>
>><br>
>> I think this will give the
orthogonal view we need to come to a
decision.<br>
>><br>
>> kris: What about you
providing a snippet of the API you
hate too? just for<br>
>> comparison sake :P<br>
>><br>
>> -- qmx<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>
>><br>
>><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>
><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>
<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>