Sunday, February 07, 2010

Creating and Using Your Own Delegates in Objective-C

I've been doing iPhone development for about a year now and have used the delegation pattern many times. Specifically with regards to UITableViews and object serialization (NSCoding, NSCopying). Wikipedia has a great write up on the delegation pattern as well as examples in a few languages like Java, C++ and even Objective-C. The problem is that these examples, for me, don't express how powerful and how easy they are to implement and use.

Recently, I've been working on a project where I needed to access a series of web services to post and get my data. This is a pretty common thing to do however, if you look at the many examples of how to do this you'll find overly simplistic code that throws everything into a single class/file and completely ignored code reuse or good Object Oriented design.

Read more: DZone

Posted via email from jasper22's posterous