I'm looking for a good book on Object Oriented programming theory

in General Discussion edited January 2014
I've been trying on and off for the past year or so to get the basics of Cococa down, but I've been having some problems with understanding some of the OO concepts, such as accessor methods and creating new class methods, etc and the web tutorials I've seen have mostly just breezed through the concepts.

"Learning Cocoa With Objective C" really doesn't spend that much time on a lot of the more basic stuff and somehow assumes a paragraph is enough to completely understand everything.

Can anyone offer any suggestions as to what books would be best suited to a beginner who really wants to learn the basics before he gets into bad programming habits?


  • Reply 1 of 7
    cubedudecubedude Posts: 1,556member

    Cocoa in a Nutshell

    Its an Orielly book.
  • Reply 2 of 7
    Objective-C is very much influenced by Smalltalk. Check out "Smalltalk Best Practice Patterns" by Kent Beck to learn good programming style.
  • Reply 3 of 7
    scottscott Posts: 7,431member
    If I'm not mistaken Stroustrup is the father of C++ and one of the originators of OO techniques as it's used today. His books are loaded with OO theory.
  • Reply 4 of 7
    gspottergspotter Posts: 342member
    Another classic is "Design Patterns" by Gamma et. al.
  • Reply 5 of 7
    I don't want to be negative but I'm going to start by shooting down the other suggestions in this thread.

    Cocoa in a Nutshell, like all the others in O'Reilly's Nutshell series, is a reference manual for APIs and such like. Definately not the place to learn concepts such as Object-Orientation.

    Obj-C *is* heavily based on Smalltalk, Patterns *are* cool, and Kent Beck is some kind of programming *god* but I still wouldn't start there as it is aimed at advanced practicioners of a different language that isn't very popular despite its extensive influence.

    C++ is in many ways the work of satan and should be avoided by all who value their sanity. In particular it is viewed as a perverse aberration by many fans of 'pure' object-orientation. More generally, buying the book by the guy who designed the language is a classic mistake for beginners, as he (or she) could not be further from your position as a beginner approaching the language for the first time.

    Design Patterns *is* a classic. But it is also a turgid, dry, academic read which is why most programmers, even those who warmly cite it's name, have never read it and don't intend to either. Also, most of it's examples are in C++.

    On a more positive/constructive note:

    O'reilly has a book called Head First Java that approaches learning object-orientation by applying various theories of how people actually learn. You can read about the approach, and sample chapters to see if it is for you at the following site:


    For those wondering about the inconsistancy of warning off a Smalltalk book and then recommending a Java one, I'll note that although Java *looks* a lot like C++, it stole much more of its style from Obj-C.

    Another Java book which you probably might like if you want to avoid "bad habits" is Java Extreme Programming Cookbook or any other similar title that takes you through the use of Ant, CVS (or similar source control e.g. Subversion) and particularly the JUnit, unit-testing framework.


    Unit-testing -- which is totally language agnostic, see http://c2.com/cgi/wiki?JavaUnitClones -- is, in my opinion, the number one tool for ensuring adherence to object oriented principles since it encourages you to test your classes as stand alone units with defined functionality.

    Once you have that mastered you can build on the unit-testing foundation with refactoring. See the following link for a taster of Martin Fowler's excellent book on the subject. It is a much better introduction to patterns than the Desing Patterns book itself.

  • Reply 6 of 7
    airslufairsluf Posts: 1,861member
    Kickaha and Amorph couldn't moderate themselves out of a paper bag. Abdicate responsibility and succumb to idiocy. Two years of letting a member make personal attacks against others, then stepping aside when someone won't put up with it. Not only that but go ahead and shut down my posting priviledges but not the one making the attacks. Not even the common decency to abide by their warning (afer three days of absorbing personal attacks with no mods in sight), just shut my posting down and then say it might happen later if a certian line is crossed. Bullshit flag is flying, I won't abide by lying and coddling of liars who go off-site, create accounts differing in a single letter from my handle with the express purpose to decieve and then claim here that I did it. Everyone be warned, kim kap sol is a lying, deceitful poster.

    Now I guess they should have banned me rather than just shut off posting priviledges, because kickaha and Amorph definitely aren't going to like being called to task when they thought they had it all ignored *cough* *cough* I mean under control. Just a couple o' tools.

    Don't worry, as soon as my work resetting my posts is done I'll disappear forever.
  • Reply 7 of 7

    Originally posted by stupider...likeafox

    For those wondering about the inconsistancy of warning off a Smalltalk book and then recommending a Java one, I'll note that although Java *looks* a lot like C++, it stole much more of its style from Obj-C.

    You had some good points about my recommendations. I never programmed in Objective-C, but I earned my money by programming Smalltalk for nearly ten years. So when I see something like this:



    [myRect display];


    [myRect setOrigin:30.0 :50.0];


    [myRect setWidth:10.0 height:15.0];

    this looks much more like Smalltalk than Java to me...
Sign In or Register to comment.