Hi Kris!<div><br></div><div>One more question,<span></span><div><br></div><div>why 'recordId' instead of 'primaryKey'? <br><br>On Sunday, September 16, 2012, Matthias Wessendorf wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thx!<br>
<br>
On Sat, Sep 15, 2012 at 8:27 PM, Kris Borchers <<a>kris@redhat.com</a>> wrote:<br>
><br>
> On Sep 15, 2012, at 12:13 PM, Matthias Wessendorf <<a>matzew@apache.org</a>> wrote:<br>
><br>
><br>
><br>
> On Saturday, September 15, 2012, Kris Borchers wrote:<br>
>><br>
>><br>
>> On Sep 15, 2012, at 10:53 AM, Glen Daniels <<a>glen@thoughtcraft.com</a>> wrote:<br>
>><br>
>> > Hey Matthias,<br>
>> ><br>
>> > Thanks for taking a look at the prototype!<br>
>> ><br>
>> > On 9/15/12 6:12 AM, Matthias Wessendorf wrote:<br>
>> >> I took a quick look at the Android API. Below are a few questions:<br>
>> >><br>
>> >> * AeroGear.java<br>
>> >> - Is the class 'just' a util, that offers static methods? If so,<br>
>> >> should have a private ctor and be final (since a private default ctor<br>
>> >> prevents inheritance anyways)<br>
>> ><br>
>> > Yup, that's the intent, but since it's just a "sketch" I didn't put that<br>
>> > in - will do.<br>
>> ><br>
>> >> - is the API_KEY really needed? Not sure, but I think that (the<br>
>> >> API_KEY) is _perhaps_ something on-top of a networking client lib,<br>
>> >> needed when entering the real 'BaaS' market, where our lib. is used<br>
>> >> against a (specific) 'backend provider'.<br>
>> ><br>
>> > Right, I was pretty much following the common BaaS pattern. It's<br>
>> > certainly not necessary immediately, but once we start supporting OAuth<br>
>> > we'll want something like that anyway, so I put it in as a placeholder.<br>
>> > Easy to remove if we decide we don't want it for now.<br>
>> ><br>
>> >> * Utils.java<br>
>> >> - related to the API_key, I think the X-AeroGear-Client header needs<br>
>> >> to be defined/discussed - but IMO the AeroGear client lib should work<br>
>> >> also without such a key, when accessing a simple JAX-RS (read:<br>
>> >> RestEasy) service; Of course, when 'cloud provider' start using our<br>
>> >> bits, something like API_KEY is a must.<br>
>> ><br>
>> > +1<br>
>> ><br>
>> >> - the 'delete' is public; the others (e.g. post) not...<br>
>> ><br>
>> > No semantic significance there. Should probably all be package access,<br>
>> > since AeroGear is the user-facing class.<br>
>> ><br>
>> >> * Pipe.java<br>
>> >> - how to update an existing item?<br>
>> >> For instance in JS/iOS we use save which does an 'add' if there is no<br>
>> >> _id_ or issues an 'update' if the entity already exisits (e.g. has an<br>
>> >> _id_).<br>
>> ><br>
>> > Yep, will do that. (although note that "_id_" or "_id" or whatever we<br>
>> > use is another point of coupling ;) )<br>
>> I don't think it does. In JS, I have made it so that what ever name you<br>
>> use on the server to denote an "id", you can tell the client lib what that<br>
>> name is. So whether the id field is named id or recordId, or blahblah, that<br>
>> is configurable when a pipe is created.<br>
><br>
><br>
> Can you post a snippet for that?<br>
><br>
> Not exactly sure what you want to see and iOS/Android are probably going to<br>
> have to be different but hope this helps a little.<br>
> <a href="https://gist.github.com/3729174" target="_blank">https://gist.github.com/3729174</a><br>
><br>
><br>
> Thx,<br>
> Matthias<br>
><br>
><br>
><br>
>><br>
>><br>
>> ><br>
>> >> There is no concept of a 'pipeline', but I guess (at least for now) on<br>
>> >> "Java" (aka Android) a typed list (e.g. List<Pipe> pipeline;) is good<br>
>> >> enough, right?<br>
>> >> But on the other hand, than it's up to the user of the api to 'manage'<br>
>> >> all the pipes (server connections).<br>
>> ><br>
>> > Right. What sort of "management" do you imagine, other than<br>
>> > factory-style creation? Pipes as they stand are extremely "cheap"<br>
>> > objects (no db connections, network connections, threads, etc).<br>
>> ><br>
>> > Best,<br>
>> > --Glen<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>
</blockquote></div></div><br><br>-- <br>Sent from Gmail Mobile<br>