[aerogear-dev] [iOS] creating/adding new pipe objects to the pipeline

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[aerogear-dev] [iOS] creating/adding new pipe objects to the pipeline

Matthias Wessendorf
Hi,

because builder pattern on iOS is a bit hard to read (as said before,
due to the deeply nested calls), I decided against it:

id<AGPipe> myPipe = [[[[builder name:@"foo"] baseURL:someURL]
type:@"REST"] build];

It could be done with some reflection usage, but that's an issue w/ ARC:

id<AGPipe> myPipe = [[builder withName:@"foo" withBaseURL:url.....] build];



== Config object ==

I propose using a config object, passed to a code-block. More details,
see this gist:

https://gist.github.com/3979665


-M

--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
qmx
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [iOS] creating/adding new pipe objects to the pipeline

qmx
Administrator
+9001

way cleaner to read :)

On Oct 30, 2012, at 10:49 AM, Matthias Wessendorf wrote:

> Hi,
>
> because builder pattern on iOS is a bit hard to read (as said before,
> due to the deeply nested calls), I decided against it:
>
> id<AGPipe> myPipe = [[[[builder name:@"foo"] baseURL:someURL]
> type:@"REST"] build];
>
> It could be done with some reflection usage, but that's an issue w/ ARC:
>
> id<AGPipe> myPipe = [[builder withName:@"foo" withBaseURL:url.....] build];
>
>
>
> == Config object ==
>
> I propose using a config object, passed to a code-block. More details,
> see this gist:
>
> https://gist.github.com/3979665
>
>
> -M
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev

-- qmx

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [iOS] creating/adding new pipe objects to the pipeline

danielbevenius
+1 Better with the config object.

On 30 October 2012 14:00, Douglas Campos <[hidden email]> wrote:

> +9001
>
> way cleaner to read :)
>
> On Oct 30, 2012, at 10:49 AM, Matthias Wessendorf wrote:
>
>> Hi,
>>
>> because builder pattern on iOS is a bit hard to read (as said before,
>> due to the deeply nested calls), I decided against it:
>>
>> id<AGPipe> myPipe = [[[[builder name:@"foo"] baseURL:someURL]
>> type:@"REST"] build];
>>
>> It could be done with some reflection usage, but that's an issue w/ ARC:
>>
>> id<AGPipe> myPipe = [[builder withName:@"foo" withBaseURL:url.....] build];
>>
>>
>>
>> == Config object ==
>>
>> I propose using a config object, passed to a code-block. More details,
>> see this gist:
>>
>> https://gist.github.com/3979665
>>
>>
>> -M
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>> _______________________________________________
>> aerogear-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
> -- qmx
>
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [iOS] creating/adding new pipe objects to the pipeline

cvasilak
In reply to this post by Matthias Wessendorf
+1 for me too for the config object, looks better!

On 30 Οκτ 2012, at 2:49 μ.μ., Matthias Wessendorf wrote:

> Hi,
>
> because builder pattern on iOS is a bit hard to read (as said before,
> due to the deeply nested calls), I decided against it:
>
> id<AGPipe> myPipe = [[[[builder name:@"foo"] baseURL:someURL]
> type:@"REST"] build];
>
> It could be done with some reflection usage, but that's an issue w/ ARC:
>
> id<AGPipe> myPipe = [[builder withName:@"foo" withBaseURL:url.....] build];
>
>
>
> == Config object ==
>
> I propose using a config object, passed to a code-block. More details,
> see this gist:
>
> https://gist.github.com/3979665
>
>
> -M
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [iOS] creating/adding new pipe objects to the pipeline

Matthias Wessendorf
Ok, started the work..

-M

On Tue, Oct 30, 2012 at 2:47 PM, Christos Vasilakis <[hidden email]> wrote:

> +1 for me too for the config object, looks better!
>
> On 30 Οκτ 2012, at 2:49 μ.μ., Matthias Wessendorf wrote:
>
>> Hi,
>>
>> because builder pattern on iOS is a bit hard to read (as said before,
>> due to the deeply nested calls), I decided against it:
>>
>> id<AGPipe> myPipe = [[[[builder name:@"foo"] baseURL:someURL]
>> type:@"REST"] build];
>>
>> It could be done with some reflection usage, but that's an issue w/ ARC:
>>
>> id<AGPipe> myPipe = [[builder withName:@"foo" withBaseURL:url.....] build];
>>
>>
>>
>> == Config object ==
>>
>> I propose using a config object, passed to a code-block. More details,
>> see this gist:
>>
>> https://gist.github.com/3979665
>>
>>
>> -M
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>> _______________________________________________
>> aerogear-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [iOS] creating/adding new pipe objects to the pipeline

Matthias Wessendorf
https://github.com/aerogear/aerogear-ios/pull/18

-M

On Tue, Oct 30, 2012 at 5:36 PM, Matthias Wessendorf <[hidden email]> wrote:

> Ok, started the work..
>
> -M
>
> On Tue, Oct 30, 2012 at 2:47 PM, Christos Vasilakis <[hidden email]> wrote:
>> +1 for me too for the config object, looks better!
>>
>> On 30 Οκτ 2012, at 2:49 μ.μ., Matthias Wessendorf wrote:
>>
>>> Hi,
>>>
>>> because builder pattern on iOS is a bit hard to read (as said before,
>>> due to the deeply nested calls), I decided against it:
>>>
>>> id<AGPipe> myPipe = [[[[builder name:@"foo"] baseURL:someURL]
>>> type:@"REST"] build];
>>>
>>> It could be done with some reflection usage, but that's an issue w/ ARC:
>>>
>>> id<AGPipe> myPipe = [[builder withName:@"foo" withBaseURL:url.....] build];
>>>
>>>
>>>
>>> == Config object ==
>>>
>>> I propose using a config object, passed to a code-block. More details,
>>> see this gist:
>>>
>>> https://gist.github.com/3979665
>>>
>>>
>>> -M
>>>
>>> --
>>> Matthias Wessendorf
>>>
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> sessions: http://www.slideshare.net/mwessendorf
>>> twitter: http://twitter.com/mwessendorf
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [iOS] creating/adding new pipe objects to the pipeline

Matthias Wessendorf
merged

-M

On Wed, Oct 31, 2012 at 2:24 PM, Matthias Wessendorf <[hidden email]> wrote:

> https://github.com/aerogear/aerogear-ios/pull/18
>
> -M
>
> On Tue, Oct 30, 2012 at 5:36 PM, Matthias Wessendorf <[hidden email]> wrote:
>> Ok, started the work..
>>
>> -M
>>
>> On Tue, Oct 30, 2012 at 2:47 PM, Christos Vasilakis <[hidden email]> wrote:
>>> +1 for me too for the config object, looks better!
>>>
>>> On 30 Οκτ 2012, at 2:49 μ.μ., Matthias Wessendorf wrote:
>>>
>>>> Hi,
>>>>
>>>> because builder pattern on iOS is a bit hard to read (as said before,
>>>> due to the deeply nested calls), I decided against it:
>>>>
>>>> id<AGPipe> myPipe = [[[[builder name:@"foo"] baseURL:someURL]
>>>> type:@"REST"] build];
>>>>
>>>> It could be done with some reflection usage, but that's an issue w/ ARC:
>>>>
>>>> id<AGPipe> myPipe = [[builder withName:@"foo" withBaseURL:url.....] build];
>>>>
>>>>
>>>>
>>>> == Config object ==
>>>>
>>>> I propose using a config object, passed to a code-block. More details,
>>>> see this gist:
>>>>
>>>> https://gist.github.com/3979665
>>>>
>>>>
>>>> -M
>>>>
>>>> --
>>>> Matthias Wessendorf
>>>>
>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>> sessions: http://www.slideshare.net/mwessendorf
>>>> twitter: http://twitter.com/mwessendorf
>>>> _______________________________________________
>>>> aerogear-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>>
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev