Theocacao
Leopard
Design Element
Comment on "What Do People Find Challenging About Cocoa?"
by Bill Coleman — Jun 17
I've developed for the Mac off and on since 1984, so I don't have the problems of younger developers not knowing ANSI C, etc. I've developed with MacApp using Object Pascal, and C++, Think Class Library and PowerPlant. Here are some of my impressions of trying to master Cocoa.

1) Objective-C. I think the biggest problem with Objective-C is that it is an odd mix of old ANSI C and Smalltalk features. There's not a lot of internal consistency between the two -- it's not a very "pure" language like Smalltalk or Java. It's certainly a whole lot simpler than C++, and developers ought not to have too much trouble with it, other than the unusual syntax for sending messages. I certainly understood the language ages ago.

2) Cocoa Frameworks. There's a whole lot to these frameworks. While it's not difficult to get a basic understanding of certain components, it's hard to wrap your brain around all the facilities embedded in Cocoa. Some components are very powerful and not very obvious (eg Key-Value Coding / Observing, Binding, CoreData). Developers trying to learn Cocoa face an enormous learning cliff to scale, because there's just a tremendous amount of material. The Hillegass book is the best I've seen.

3) Proper Technique. Even after you think you understand Cocoa, or are even able to write useful programs with it, there's always the issue of proper technique. This includes such subtleties as when to use a custom classes versus the standard classes, when to use delegates and which object is the right target of those delegation calls, when is it appropriate to use binding versus the old-fashioned push/pull from controls, when you could really benefit from Key-Value Coding / Observing, etc. There's an old saying on the CocoaDev list that if you having to do a lot of work to get something done with Cocoa, you are probably doing it wrong.

This last bit comes easy to the old hands at Cocoa, and is the hardest for them to express. To a newcomer, it looks like "magic" because it wasn't obvious why they made that choice. It may be a level of understanding of the frameworks that only comes through long practice.
Back to "What Do People Find Challenging About Cocoa?"
Design Element

Copyright © Scott Stevenson 2004-2015