Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Preface

Preface

Objective-C gets a raw deal in the IT industry. Though it's a powerful and dynamic object oriented language, it doesn't get nearly the amount of recognition that C++, Java, and others get.

When I wrote Cocoa Touch for iPhone OS 3, I knew that it needed a companion book, one which helped people over the hump of learning Objective-C before moving on to the higher level frameworks, Cocoa, and Cocoa Touch.

So when the opportunity came to write a book dedicated to Objective-C, the language, I jumped at it!

In the end, I feel I have been given an opportunity to contribute to the foundation of new Mac, iPhone and iPad developers knowledge through this book, and I'm tremendously excited by that. I love the idea that this book might be a catalyst to helping Objective-C grow, not just on these, but across many different platforms. There's no reason that Objective-C shouldn't be used more on platforms such as Unix, Windows, and so on.

As a reader, you are expected to have only a limited knowledge of computers. I have tried to approach the subject from the absolute bare essentials, but you will need at least a basic background in how to navigate around a computer.

If you already know some programming languages, that won't hurt you here. Some of what I discuss will be review for you, but don't worry, there's plenty of specifics for Objective-C that you will pick up.

If you already have a background in Objective-C, I hope that you will find some nuggets of information you didn't know in this book. I've tried to keep it in an accessible form so that you can look up specifics that you're looking for. You may not read it cover to cover, but it should give you the ability to jump to specific parts and gain insight into how to do what you are looking to do.

With regard to conventions used within this book, I've tried to be reasonably consistent, and also tried to generally err on the side of Apple conventions when prudent. The only notable exception has been in my use of the phrase "method" to indicate functions on instances and classes. Apple generally prefers the term "message." This is in part due to the influence of Smalltalk on Objective-C.

When referring to keyboard shortcuts, I opted to use the term "Command-Key" to indicate keyboard shortcuts using the key directly to the left of the space key on most Apple keyboards. You may also know this as the "Apple" key, since prior to only a few years ago, it included a small Apple logo on it. Additionally, the key next to the Command-Key, has been called the "Option-Key" and the key next to that, the "Control-Key". These should all be consistent with Apple documentation conventions.

When referring to variables which store objects in them, I will often refer to them as "instance variables". Some books like to use this term, or it's abbreviation, "ivar" to refer to variables that are part of a class. For these, I prefer the term "member variable." To me, member variables can be instance variables, but not all instance variables are member variables.

When referencing methods in the text, I have used the standard apple convention of referring to them using the method name, but without parameters. So, for example, the method:

-(void)someMethodUsingParam1:(NSString *)param1 andParam2:(NSString *)
param2;

Would be written in the text as: -someMethodUsingParam1:andParam2. If it's a class method, the leading hyphen is replaced with a +, just as if you were writing the method in your class definition.

With regard to sample code, in chapters where I have instructed you to build specific full-on projects, I have generally tried to include full listings for the code. In cases where I have not, you can always download the projects, complete with artwork and other supporting files from the book's website. There are also chapters where it didn't really make sense to make a full-on project to demonstrate a technology. In these cases, the code listings are more snippets that you can use as a basis for your own code. Since these snippets don't comprise fully functional projects, there will not be example projects for these on the web site.

I hope that you find this book as enjoyable an experience to read as I had writing it. To me, the mark of a good technical book is that it doesn't sit on my shelf. It holds a place of honor on or near my desk because I keep returning to it, time and again. I hope that this book holds such prestige in your library, and that it becomes a dog-eared, cover-torn, page-scribbled-on reference that remains useful to you for years to come.

Jiva DeVoe

book@random-ideas.net