Jump to content

April 2017 »

23 24 2526272829

Recent Comments

Recent Comments

* - - - - 2 votes

Book Review: Cocoa and Objective-C Up and Running

4: Adsense

Well I just finished my first book on Mac OSX software development. First and foremost I should go into a little bit on why I am in the process of learning Objective-C and what drew me into using this book in the first place. First reason I decided to dive into Objective-C is my new desktop/development platform is a iMac. Secondly the new phone I will be getting once the tax return comes in is a IPhone 4 due to it hitting my carrier Verizon this month. Currently I have a Android phone and I am very very disappointed maybe it has to do with the fact that mine is a samsung not sure. I want to be able to develop applications for both my phone and my desktop computer. To have any potential to sell these applications I need to use the right tool for the job and according to apple this is Objective-C/Cocoa. Now that is out of the way what drew me to this book.....

First when I was looking at the selections of books out there I saw a few very high quality titles. I on the other hand have experience in development in both GUI and games from a hobby perspective and have a solid background in programming concepts. So I did not really want a long drawn out book because I know how to read a APIAPI doc I just want a feel for the language. With a background in C and C++ already this was not too much of a leap for me. This books is short and to the point unlike some others but that can be a flaw now onto the review.

After reading this book I must say this is not a book for beginners. It says it was written for beginners, however, if you have never programmed a line of code in your life this book moves way way to fast. First you need to understand that Objective-C is just a layer on top of C so you are basically using C with some runtime extensions. With this in mind this book covers C in 2 chapters. I learned C from the K&R book so this is ok for me as a nice swift refresher but for a newbie to programming this is just not going to cut it. Next the basics of OOP are covered in just a single chapter. UH..... sorry not for beginners again it took me C + structs, C++, Java, and C#, and Python and a few years of experimental throwaway practice projects to get this concept right. It took me 1 year just to understand why Interfaces in C# were even useful in the first place. Took even a year before polymorphism slapped me in the face. Uh to go on even further the basics of Objective C are again taught in 2 chapters. NOT FOR BEGINNERS can I say it enough. With no experience in programming a newbie to software development won't understand a damn thing and be confused as all hell after the first 4 chapters of the book.

Ok with all this said I still thought this was an amazing book to learn from. First and foremost I was able to breeze through the first 4 chapters and get right into learning the syntax and the way Objective-C works. After 2 chapters of learning the new runtime/language extensions it got me right into the Mac OSX Cocoa API framework kind of like the .Net framework but for Objective-C. This is where the final 4 chapters of the book take place so you can write effective GUI apps for OSX. The last chapter of the book gives some useful pointers and some more pointers to further information to learn more. That is it 11 chapters compared to the typical 30 chapter books out there. Now some people may think this is not a good thing personally I found it refreshing.

The biggest commendation I give to this author in his book is the effective use of the tools apple provides ala XCode and Interface Builder. These tools are amazing and I am so happy the author did not do what a lot of Java books do and force you to use notepad and the command line. Face it people yea Vi and Emacs are great for a quick and dirty file edit but we are in the 21st century now and have better tools use them damn it. It is amazing at how powerful these Mac tools are and if you don't learn them or use them you are stupid and the author even rightly states so. The author does not souly rely on interface builder because if you want to make your app truly fluid like Mac apps tend to be you do have to write custom view boilerplate code and they author definitely goes there. Another thing is the author does something I personally really like first he explains the concepts of the chapter then he puts you into code working on a project. This is great using what you learned helps learning it.

Word of warning there are lots of Text Walls in this book. The author expects you to understand previous concepts so a lot of the projects are code code code with some explanations here and there. If you payed attention and learned the previous content of the book you should be able to easily parse the code and understand what is going on. Personally I like this style because it really makes you think about what the code is doing and not just telling you what it is doing. If you want to get anything out of this book you have to do every example to completion.

The author also uses screenshots in a very effective manner for tool demonstrations to make sure you got it just right. This author really takes his tools to heart and I love that. Like I said earlier he states you are stupid if you don't use the tools apple provides because it makes things so much easier and makes you so much more productive. He goes into how to hook up Actions, Outlets, and Bindings through interface builder and even shows something that made my jaw drop and that is XCodes amazing data modeler for the Core Data framework. The Core Data framework is a persistence framework for cocoa that allows you to save data across sessions and even gives you some juicy free stuff along they way like undo and redo.

Overall I feel this is a amazing book and that I learned a lot of information from it. I definitely think if you are NOT A BEGINNER developer and want to dive into OSX development this book is a great way to hit the ground running. Now I just need to put this stuff to use and start a project. More on that next blog post....

Feb 11 2011 06:23 AM
I was planning to develop for Android. I bought a Motorola with version 2.1. Less than 5 months a new version came out, 2.2. Guess what: I am stuck in 2.1. My mobile won't get an upgrade. Meanwhile, my IPhone 3GS had at least one.
You say Sunsung, I say Motorola... Is there a pattern here?
Feb 13 2011 02:13 PM
The basic pattern is that Android is a Open Standard and the Iphone is not. This is also the same issue Linux has in general as well it is a non proprietary open standard which causes fragmentation. The reason you see more game on the PC(Windows) and Mac(ports or otherwise) is because they are both proprietary systems with solid backing which leads to a better consumer base.

Note: GameDev.net moderates comments.