On 04 Mar 2014, at 12:34, Tadeas Kriz <tkriz(a)redhat.com> wrote:
—
Tadeas Kriz
tkriz(a)redhat.com
On 04 Mar 2014, at 11:02, Corinne Krych <corinnekrych(a)gmail.com> wrote:
> Hello Tadeas
>
> Talking a Pipe and Paging, when we were designing them we were discussing with JS and
Android team, and in iOS we follow the same approach to provide a unified API.
>
> Compare Android impl [1] which extends List<T> providing next and previous
method to iOS counterpart [2]
> => It’s very similar. Instead of using Inheritance we’re using category[3] which
is good fit for it. What do you mean by "for me doesn’t seem as the best way to do
this”?
I mean that the category will extend basically every NSMutableArray, even those that has
nothing to do with AeroGear and it feels strange to me, but if you say it’s to keep the
consistency with Android and JS, I understand it.
I guess it’s a matter of design preferences here. Both will fit the bill. Composition over
inheritance.
Use categories as you would use ”mixins”, if you just wanto to add a extra flavor to your
class (here NSMutableArray), it’s a good fit to do it with category. To have the category
available you need to have the import "AGNSMutableArray+Paging.h"
Besides, if you send a next/previous message on a NSMutableArray without Pipe, nothing
happen.
> However if you want to help on the topic of Paging, we’re missing a cool recipe app
(see [4]) !
> PR are always welcome.
>
> ++
> Corinne
> [1]
https://github.com/aerogear/aerogear-android/blob/master/src/org/jboss/ae...
> [2]
https://github.com/aerogear/aerogear-ios/blob/master/AeroGear-iOS/pipelin...
> [3]
http://www.intertech.com/Blog/categories-in-objective-c/
> [4]
https://issues.jboss.org/browse/AGIOS-127
>
> On 03 Mar 2014, at 15:26, Tadeas Kriz <tkriz(a)redhat.com> wrote:
>
>> Hey guys,
>>
>> I’ve been thinking about the way how reading from pipe and I thought of a way to
do it a bit differently, so there’s no need to extend the NSMutableArray using the
category (which for me doesn’t seem as the best way to do this).
>>
>>
https://gist.github.com/TadeasKriz/9325698
>>
>> What do you think?
>>
>> —
>> Tadeas Kriz
>> tkriz(a)redhat.com
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/aerogear-dev
_______________________________________________
aerogear-dev mailing list
aerogear-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev