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

Matthias Wessendorf matzew at apache.org
Tue Oct 30 08:49:30 EDT 2012


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


More information about the aerogear-dev mailing list