Programming in Objective-C, Fifth Edition Updated for OS X Mountain Lion, iOS 6, and Xcode 4.5
Programming in Objective-C is a concise, carefully written tutorial on the basics of Objective-C and object-oriented programming for Apple's iOS and OS X platforms.
The book makes no assumptions about prior experience with object-oriented programming languages or with the C language (which Objective-C is based upon). Because of this, both beginners and experienced programmers alike can use this book to quickly and effectively learn the fundamentals of Objective-C. Readers can also learn the concepts of object-oriented programming without having to first learn all of the intricacies of the underlying C programming language.
This unique approach to learning, combined with many small program examples and exercises at the end of each chapter, makes Programming in Objective-C ideally suited for either classroom use or self-study.
This edition has been fully updated to incorporate new features in Objective-C programming introduced with Xcode 4.4 (OS X Mountain Lion) and Xcode 4.5 (iOS 6.)
“The best book on any programming language that I’ve ever read. If you want to learn Objective-C, buy it.”–Calvin Wolcott
“An excellent resource for a new programmer who wants to learn Objective-C as their first programming language–a woefully underserved market.”–Pat Hughes
Contents at a Glance
1 Introduction
Part I The Objective-C Language 2 Programming in Objective-C 3 Classes, Objects, and Methods 4 Data Types and Expressions 5 Program Looping 6 Making Decisions 7 More on Classes 8 Inheritance 9 Polymorphism, Dynamic Typing, and Dynamic Binding 10 More on Variables and Data Types 11 Categories and Protocols 12 The Preprocessor 13 Underlying C Language Features
Part II The Foundation Framework 14 Introduction to the Foundation Framework 15 Numbers, Strings, and Collections 16 Working with Files 17 Memory Management and Automatic Reference Counting (ARC) 18 Copying Objects 19 Archiving
Part III Cocoa, Cocoa Touch, and the iOS SDK 20 Introduction to Cocoa and Cocoa Touch 21 Writing iOS Applications
Appendixes A Glossary B Address Book Program Source Code
Objective-C! This book spends half the time talking about the Objective-C language itself and half the time talking about Apple's Foundation framework. The chapters are well organized and concepts are well explained, so you end up with a solid foundation in the language. It's an easy read even with very little programming experience. The book doesn't cover Cocoa or the other higher level frameworks, but you'll be completely ready to pick it up by the time you're done with this book.
I would have liked to see a more centralized presentation of memory management in the memory chapter. Instead, information on memory is presented throughout the book, with the memory chapter being more of a summary. Coming from web/scripting languages like PHP and Perl, I skimmed over the memory parts as they were presented and it's difficult to go back and find every example and mention of it.
Kochan does a tremendous job of explicating topics in a digestible way. This book best serves as an introduction to Objective-C rather than a complete language reference; it is less concerned with being exhaustive than it is with building a strong foundation.
It is important to note that this text does not strive to teach iOS programming, but merely Objective-C. That said, it does cover the Foundation Framework (one of the 3 frameworks that comprise iOS) fairly extensively.
The author's approach is particularly unique in its lack of concern for the reader's prior knowledge of C/C++ (read: you do not need to know a C family langauge to completely grasp the concepts presented).
I would highly recommend this text as an introduction to Objective-C and consider it a veritable necessity for anyone considering a further foray into iOS development.
This book is perhaps the finest book on programming I've ever read.
I started with just a little experience with C ten years ago (and the BASIC and LOGO from childhood) and within hours of picking up the book I had a firm grasp of object oriented programming concepts and was writing and compiling Objective C code.
Highly recommended coupled with Cocoa Programming with Mac OS X by Aaron Hillegass.
Cocoa Programming with Mac OS X focuses on Xcode and the Cocoa frameworks. Programming in Objective C focuses entirely on the language itself.
This was a good book for introducing myself to the language. I wouldn't use it as a guide for good practice in class design, though. I found places where I thought it could have done better on that subject, but perhaps the author was trying to deliberately avoid it, since that could have made the learning curve too steep.
You don't need to know anything about C or Objective C to learn from it. It treats the subject as if you haven't programmed in either. It doesn't go too fast. If you already know C, there are some chapters you can skip, since they will be purely review. It gives you a basic foundation for understanding the "lay of the land" of the language, and some basic classes: strings, file management, and memory management (if that's necessary), so that you can do some basic things in it, and if you need to learn more, you will understand better where to find the information. It gives some cursory information about Cocoa. This is not a book you want if you're trying to learn about that. It's just on the Objective C language.
It has instructions on how to use XCode, but I found I was able to do all of the examples using Terminal, Emacs, and the command line Objective C compiler (it shows you how to use this as well), since all of the examples had console output.
I went through another book prior to this, "Learning Cocoa with Objective C," by James Davidson, and felt confused about some language features, since it was mostly geared toward giving you just enough Objective C to get Cocoa features to work. I liked the approach of this book, because it just focused on the language.
4.5 Very efficient in explaining a new language. The language explained makes a lot of practical sense, but it seems clunky and slower at times in comparison to its family members C and C++. Nonetheless, I am excited to use the language, for it prioritizes readability and clarity, and all Object Oriented Programming principles seem present. The documentation itself is very good at explaining things technically, but I do wish there were more humor or less-technical allegories thrown in there. Overall, an informative piece that can feel slow at times.
If you already know C, then there's a great deal of repetitive material mixed in with the Objective-C additions. And the Objective-C additions aren't really explained, just shown as patterns to use -- I can type them in, and they work, but I don't really know what they're doing under the covers like I do with C/C++. I'd really like to know how properties are treated differently from conventional structure members; this would require more coverage of exactly what effects @dynamic and @synthesize have on a @property, beyond just making them accessible. Coverage of memory management (so-called ARC, Automatic Reference Counting) pretty much amounts to "it just happens, don't worry."
Good: comprehensive for those beginning with programming in general Bad: lots of repeat material for those with experience in other languages, especially C or C++ Ugly: Lots of really basic stuff makes it boring for experienced programmers,
I mostly just skimmed the book. If you are totally new to programming, this book will be helpful. The chapter on memory management is beneficial, but you can get the same information from online articles.
Good overview of the Objective-C fundamentals. The book introduces the basics of Objective-C and only briefly touches the underlying C concepts (though including blocks), some Foundation classes, Cocoa and Cocoa Touch in a few chapters in the second half of the book.
I think it's okay if you want to get a basic understanding, but it probably isn't that interesting if you've been exposed to Objective-C before.