<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 3, 2012, at 7:29 AM, Daniel Passos <<a href="mailto:daniel@passos.me">daniel@passos.me</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">2012/10/2 Glen Daniels <span dir="ltr"><<a href="mailto:glen@thoughtcraft.com" target="_blank">glen@thoughtcraft.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Passos,<br>
<br>
A few comments below. I recognize that some of these things are derived<br>
from the JS implementation, which was the source for the iOS<br>
implementation - so some of these are questions about the the API in<br>
general as opposed to Android in particular.<br>
<br>
* I'm not sure I like creating an initial Pipe at Pipeline-creation<br>
time. I guess this is meant as a shortcut, but in fact I think it<br>
confuses things. Since we need a line of code to get the Pipe anyway,<br>
I'd rather it be consistent and look like this:<br>
<br>
Pipeline pipeline = new Pipeline(baseURL);<br>
Pipe<Task> tasks = pipeline.add("tasks", Task[].class);<br>
Pipe<Tag> tags = pipeline.add("tags", Tag[].class);<br></blockquote><div><br></div><div>I'm not sure too, If create a pipe with a pipeline is the best option for this. If you consider the legibility, is an ugly way to search for a thing you' ve created, but i thinking if make sense create a pipeline without pipe.</div></div></blockquote><div><br></div>Sorry if I wasn't clear in my examples or usage but in JS, it is completely possible to create a pipeline without an initial pipe and then add them when you need them.</div><div><br></div><div>Ex.</div><div><br></div><div>// Create pipeline</div><div>var x = aerogear.pipeline();</div><div>// Add Pipe</div><div>x.add( "test" );</div><div><br></div><div>// Use the pipe</div><div>var testPipe = x.pipes.test;</div><div>testPipe.read(…);</div><div><br></div><div>OR</div><div><br></div><div>x.pipes.test.read(…);</div><div><br><blockquote type="cite"><div class="gmail_quote">
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">...rather than special-casing the first "tasks" pipe and using<br>
pipeline.get("tasks") to retrieve it.<br>
<br>
* Another consistency/symmetry issue (ah, I just read Marko's comments<br>
and I see he mentions the same thing): I think it's odd that get() and<br>
post() in HttpRestProvider can't take id arguments, and therefore must<br>
always work at the collection, as opposed to the individual resource<br>
level. Simply adding overloads with an id argument would solve this I<br>
think, but maybe better to always require the id argument and allow null<br>
to access the collection.<br>
<br>
* HttpRestProvider again: the post() method at least (and perhaps also<br>
put/delete) should probably return a value so we can get server data<br>
back to the caller if appropriate.<br></blockquote><div><br></div><div>I see your point and is a good idea.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* I'm not quite sure I understand why we need the HttpProvider interface<br>
at all. What other implementations of this (that aren't<br>
HttpRestProvider) are there going to be? We could get rid of it and<br>
just bake HTTP functionality into RestAdapter directly, no?<br></blockquote><div><br></div><div>I create that imagining a decloupe for in the future, test the adapter with mock/stubs provider</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* We should discuss testing + mocking and write down some common tools +<br>
patterns.<br>
<br>
That's it for the moment... I'm in Chicago on the way home to Boston<br>
right now, and will be tuned back in on Wednesday afternoon. I'll try<br>
to write up some more Android thoughts at that point, specifically about<br>
the Android-specific surface area of AeroGear.<br>
<br>
Time to catch my last plane!<br>
<br>
Best,<br>
--Glen<br>
<div class="HOEnZb"><div class="h5"><br>
On 10/2/12 7:12 AM, Daniel Passos wrote:<br>
> Hi guys<br>
><br>
> I did some changes in the android library based on iOS stuff, it's<br>
> closer to the pipeline adapter implementation. I would appreciate<br>
> feedback and review.<br>
><br>
> <a href="https://github.com/aerogear/aerogear-android/pull/1" target="_blank">https://github.com/aerogear/aerogear-android/pull/1</a><br>
> <a href="https://github.com/aerogear/aerogear-android-todo/pull/1" target="_blank">https://github.com/aerogear/aerogear-android-todo/pull/1</a><br>
><br>
> Thanks,<br>
> Passos<br>
><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<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>
><br>
<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>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev<br></blockquote></div><br></body></html>