views:

514

answers:

2

Hey,

I'm learning Cocoa and while I get comfortable with Objective-C and the concepts around it, I sometimes struggle applying the theory (like MVC) in praxis. Apple's documentation often gives me aha moments, but it would be cool to have a well written Cocoa App as a reference.

So, do you know a very well written Cocoa App with public source code?

+2  A: 

I would take a look at the adium sourcecode. I learnt Cocoa about five years ago, and at the time I used to hang out a lot in their IRC channel talking Cocoa to them. They are a very friendly bunch and one of them is very active on here too.

Anyway, Adium (when I knew it anyway) is a very well put together bit of OpenSource Cocoa: you'll be sure to learn a lot looking at the way things are done there. Peter is a hell of a nit-picker as well so you'll be sure to see lots of well thought out, well designed code to give you ideas too.

HTH

jkp
Adium 1.4 (still in development) is a lot better than previous versions, but it still has a long way to go before I would call a majority of the source code *good*. Most of it works, and a few parts work well. But it is not a model of good Cocoa application design. (And I have not written very much of it.)
Peter Hosey
Its biggest problem: Several V, *many* C, next to no M. This is largely because Adium dates back to a time when having M didn't matter so much, there being no Bindings to provide an obvious benefit. (Even now, Bindings may not be very efficient—but we aren't able to try them with our controller-heavy architecture.) But our AppleScript support has suffered (especially before 1.3) from a poor model layer as well.
Peter Hosey
+1  A: 

Thanks jkp, didn't know Peter Hosey worked on Adium! To add to his point, Peter Hosey's website has a list of re-useable open-source Mac software (both apps and libraries).

Arun
Aye, Peter's a good lad...he was my mentor many years back and I thank him for his efforts: I remember him teaching me pointers over and over back in the day! I'm sure he probably does too...shame I haven't caught uo with him for a long while. PS: he is also the lead on growl (http://growl.info/) these days too.
jkp
More just drop-in source code, with a few libraries—few, if any, apps. That list isn't for apps.
Peter Hosey