I've been programming professionally in C, and only C, for around 10 years in a variety of roles.
As would be normal to expect, I understand the idioms of the language fairly well and beyond that also some of the design nuances - which APIs to make public, who calls what, who does what, what is supposed to reentrant and so on. I grew up reading 'Writing Solid Code', it's early C edition, not the one based on C++.
However, I've never ever programmed in an OO language. Now, I want to migrate to writing applications for iPhone (maybe android), so want to learn to use Objective-C and use it with a degree of competence fitting a professional programmer.
How do I wrap my head around the OO stuff? What would be your smallest reading list suggestion to me.
Is there a book that carries some sort of relatively real world example OO design Objective-C?
Besides, the reading what source code would you recommend me to go through.
TIA
The purpose of object oriented programming (OOP) is to produce well designed reusable code. In principle OOP can be done in any language, even assembly. This is because all OO language compilers/assemblers (e.g. C++) ultimately translate the high level constructs of the language into machine language.
There are three major pillars on which object-oriented programming relies: encapsulation, inheritance, and polymorphism.
The core idea is: Thinking in an object-oriented way is a great way to understand the problem you are trying to solve. It allows you to build software that is more maintainable and easily understandable for other people.
Even though the book I am about to recommend you is not specifically for Objective-C (it goes through all concepts of OOP without diving into any specific language) it is probably the best book I've read yet on the subject for a beginner needing an introduction to the subject, it helped me a lot!
The book is: The Object-Oriented Thought Process
I like this book because it assumes absolutely no knowledge of OOP whatsoever, but it is not dull in wasting time with basic programming concepts. It eases you from the procedural paradigm and then to the OO paradigm. If the author starts to use technical terms he is sure to explain them clearly first. The language is easy to follow and the book is most importantly not boring to read, it does not make use of heavy academic language.
The book is also good to give you some examples along the way to make explanations more clear to understand.
Note that the book I'm suggesting here was published (2nd edition) in 1991.
Object Oriented Programming: An Evolutionary Approach by Brad Cox, the creator of Objective-C, is the book he wrote to introduce his language to the world, and that was a world unfamiliar with the very idea of object-oriented programming. So the book goes very gently and introduces all the basic ideas.
Brad Cox had some ideas about how Objective-C was going to deliver really powerful re-use of components, but things haven't really gone the way he predicted. Still he was a smart guy and I'd recommend his book if you can get hold of it.
For completeness I'll second tuğrul's pointer to https://stackoverflow.com/questions/7571/cocoa-and-objective-c-resources, which has all the modern books listed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With