PDA

View Full Version : Jump from C to Objective-C




R.Youden
Jan 13, 2007, 03:16 PM
I am learning C programming for working with DSP and embedded programming for an Electronics Degree but I would like to try my hand at programming for application building. I understand that most programming uses Objective-C. How much does this differ from C? I have a book on X-Code programming and when I have finished with C I will look at jumping across.



robbieduncan
Jan 13, 2007, 03:23 PM
Objective-C is a super-set of C. You can do everything you can do in C. And you have a full object system to work with as well. If you are programming Mac apps then you'll have access to Cocoa, a massive object-oriented library for programming apps.

If you have no idea about object-oriented programming (and if you are only used to straight C you won't) I'd recommend reading up on the general concepts first.

R.Youden
Jan 13, 2007, 03:25 PM
Do you have any books that are good for objective programming that is mac based?

robbieduncan
Jan 13, 2007, 03:30 PM
I have one, pretty poor, book released sometime around 10.0 - 10.1 timeframe. I'd not recommend it!

Everyone seems to like the Hillegass Book (http://www.amazon.com/Cocoa-Programming-Mac-OS-X/dp/0201726831)

bousozoku
Jan 13, 2007, 04:42 PM
It's too bad that Bruce Eckel doesn't do Objective-C because I really like the Thinking in... series of object-oriented programming books for Java and C++.

The Hillegass book is good, though, but it won't give you the broader perspective that would be more useful.

Catfish_Man
Jan 13, 2007, 08:13 PM
The big jump going to objc is moving to thinking in objects. That'll take some time and practice.

Llywelyn
Jan 13, 2007, 10:30 PM
What part of it is giving you difficulty? Best way to learn the syntax is to start hacking at it.

As to the "philosophy" of it: just get some work thinking in an object-oriented paradigm. You can use Objective C as the "base language" to learn it (for me it was C++ and later Python). Studying UML may also help.

Soulstorm
Jan 14, 2007, 01:34 AM
This book is the best introductory book to Obj-C I have ever read.

Programming in Objective-C by Steven Kochan (http://www.amazon.com/Programming-in-Objective-C-Stephen-Kochan/dp/0672325861)

iEdd
Jan 26, 2007, 12:35 AM
For someone with zero assumed experience, would these 2 books get me from newbie to decent with Obj C and Cocoa in Xcode? I've programmed in java, but the book was based around windows IDEs and Java updates confused things.
Obviously the mac book is based on a mac, but is the book by Steven Kochan based around Xcode or other software for mac?
I'd really like to get into writing small Cocoa apps but I don't want a book that assumes prior C knowledge or assumes I have windows.
Thanks.

jhande
Jan 26, 2007, 01:56 AM
The big jump going to objc is moving to thinking in objects. That'll take some time and practice.

And practice and yet more practice. Coming from a procedural background it really took a long time for me to wrap my head around OOP.

OP whenever you make an objc program, make an effort to see whether you really have created viable objects, or procedural programs in disguise.

iEdd
Jan 26, 2007, 06:00 PM
I have one, pretty poor, book released sometime around 10.0 - 10.1 timeframe. I'd not recommend it!

Everyone seems to like the Hillegass Book (http://www.amazon.com/Cocoa-Programming-Mac-OS-X/dp/0201726831)

Just a note to anyone wanting to buy this book, it's 88% (:eek:) off at Barnes and Noble, bringing it to $5. I've ordered both the books in this thread :)

mduser63
Jan 26, 2007, 06:41 PM
Just a note to anyone wanting to buy this book, it's 88% (:eek:) off at Barnes and Noble, bringing it to $5. I've ordered both the books in this thread :)

That's for the older edition. Probably worth paying full price for the new edition, as it covers things about Cocoa that didn't exist when the first one was written (Bindings is a big one).

Nutter
Jan 26, 2007, 06:55 PM
Obviously the mac book is based on a mac, but is the book by Steven Kochan based around Xcode or other software for mac?
I'd really like to get into writing small Cocoa apps but I don't want a book that assumes prior C knowledge or assumes I have windows.
Thanks.

Steve Kochan's book is written with XCode in mind (well, ProjectBuilder actually, an older version of XCode). He doesn't assume prior C knowledge.

Read that and then Hillegass' book, and you'll be well on the way.

By the way, Objective-C is relatively unknown and unused outside the Mac world, so you're unlikely to find any Objective-C material that is Windows-based.

iEdd
Jan 26, 2007, 10:56 PM
Thanks Nutter
That's for the older edition. Probably worth paying full price for the new edition, as it covers things about Cocoa that didn't exist when the first one was written (Bindings is a big one).

Damn. Ah well.. I might have to think about the newer edition later on then. Is the old edition obselete now, or will what's in it still work?
EDIT: That's why I got confused, the link posted above is for the old edition :(

XnavxeMiyyep
Jan 26, 2007, 11:07 PM
http://www.cocoalab.com/BecomeAnXcoder.pdf

That pdf is a great start if you already know how to program in C (like I did). It would probably be pretty good for those without any programming experience at all too.