I've been lucky enough to have a new mobile project at work to continue refining my objective-c skills recently. I'm definitely moving into new territory with custom view drawing, zooming, and some advanced interactions.

So far, I have found the quartz drawing to be the most interesting. Not only can you draw using paths, rectangles, and ovals, but you can use the same language constructs (CGPath in this case) for hit testing. This allowed me to use build an single instance variable to use for hit testing and drawing. I had a total of 52 distinct objects, some with several pieces to them, that were able to draw, zoom, and hit test for under a megabyte of memory.

I was surprised at I was able to do so much with so little memory. I initially had fears that I would be running into all sorts of memory management issues with so many distinct objects on screen. I feel like this just shows how developed objective-c really is.

I have been a PHP developer for quite some time, so objective-c is a huge departure from what I'm used to. The wealth of fully baked frameworks/classes available make it a joy to develop in. PHP has a huge number of frameworks as well, but they are all addons rather than being built in. I really like how MVC is just the way the language works, rather than some convoluted system laying on top of the language. I equate objective-c to smalltalk. I only used smalltalk once at Georgia Tech, and I hated it at the time. As I've had to develop larger applications, I've come to appreciate that experience.

The main thing that stands out as incredibly useful is the delegate pattern used so thoroughly throughout objective-c. I don't know that we even discussed this pattern in school, which seems absurd to me. It is incredibly powerful, because it gives people a way to inject code between actions without subclassing or modifying the base class.

I guess to sum up, I am really enjoying building things in objective-c because the language does most of the work for me. As Steve Jobs said, you want the language to give you the first few floors of scaffolding, so you can put the difficult top floors on a solid base.
AuthorMichael Cantrell