Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 2, 2004, 07:39 AM   #1
andysmith
macrumors 6502
 
Join Date: Sep 2004
Location: West Mids, UK
Starting out in Cocoa

I'd really like to create some apps for OS X, but I'm not sure where to start.
I've never use C or C++, and I've only got a basic grasp of object based programing, mainly from PHP.

Are there any books or tutorials that I can use?

Thanks for any help
__________________
iPhone 3GS White / MacBook Pro Unibody 15" 2.8ghz 500gb 4gb
andysmith is offline   0 Reply With Quote
Old Oct 2, 2004, 08:49 AM   #2
RacerX
macrumors 65832
 
Join Date: Aug 2004
Cocoa Starting Point
RacerX is offline   0 Reply With Quote
Old Oct 2, 2004, 05:37 PM   #3
jeremy.king
macrumors 603
 
jeremy.king's Avatar
 
Join Date: Jul 2002
Location: Fox Lake, IL
There is a good compilation of links and a couple book recommendations here.

http://forums.macrumors.com/showthread.php?t=90331
jeremy.king is offline   0 Reply With Quote
Old Oct 3, 2004, 08:04 AM   #4
andysmith
Thread Starter
macrumors 6502
 
Join Date: Sep 2004
Location: West Mids, UK
Quote:
Originally Posted by kingjr3
There is a good compilation of links and a couple book recommendations here.

http://forums.macrumors.com/showthread.php?t=90331
Thanks
This book looks good:
http://www.amazon.co.uk/exec/obidos/...618200-5489267
But it says it's for people who have knowledge of C++ - is that essential? Where would I start out with that?
__________________
iPhone 3GS White / MacBook Pro Unibody 15" 2.8ghz 500gb 4gb
andysmith is offline   0 Reply With Quote
Old Oct 4, 2004, 04:07 PM   #5
jeremy.king
macrumors 603
 
jeremy.king's Avatar
 
Join Date: Jul 2002
Location: Fox Lake, IL
Quote:
Originally Posted by andysmith
Thanks
This book looks good:
http://www.amazon.co.uk/exec/obidos/...618200-5489267
But it says it's for people who have knowledge of C++ - is that essential? Where would I start out with that?
With the other book recommendation

http://www.amazon.co.uk/exec/obidos/...056260-2575813

You really need to understand OO &&/|| C/C++ if you want to get a good understanding of Obj-C and Mac development. I must say so far, I like the book. I have cruised through the first 8 chapters so far and am trying to follow along with all the examples (especially the evolving Fraction class) using my interim system (a PC ) running Cygwin's gcc compiler and jGrasp (thanks bousozoku)
jeremy.king is offline   0 Reply With Quote
Old Oct 4, 2004, 05:22 PM   #6
andysmith
Thread Starter
macrumors 6502
 
Join Date: Sep 2004
Location: West Mids, UK
Quote:
Originally Posted by kingjr3
With the other book recommendation

http://www.amazon.co.uk/exec/obidos/...056260-2575813

You really need to understand OO &&/|| C/C++ if you want to get a good understanding of Obj-C and Mac development. I must say so far, I like the book. I have cruised through the first 8 chapters so far and am trying to follow along with all the examples (especially the evolving Fraction class) using my interim system (a PC ) running Cygwin's gcc compiler and jGrasp (thanks bousozoku)
That book looks good - so can I just use the examples in that OK with the XCode tools?
__________________
iPhone 3GS White / MacBook Pro Unibody 15" 2.8ghz 500gb 4gb
andysmith is offline   0 Reply With Quote
Old Oct 4, 2004, 05:52 PM   #7
logicat2001
macrumors regular
 
Join Date: Apr 2003
Location: Minneapolis, MN
I'd strongly recommend the Aaron Hillegass book and forget about the "Programming in Obj-C" until later, or pick them both up simultaneously. Aaron's book deals more with the Cocoa frameworks, while Programming in Obj-C deals with, well, Obj-C. Obj-C is a superset of C; that is, it's exactly 100% the same as C with a tiny handful of additions (I think it adds one or two basic data types, and one new operator. It's amazing what Brad Cox, the guy who designed Obj-C, was able to accomplish so elegantly and simply.) However, if you're going to focus on Cocoa programs, you'll be spending alot of time trying to figure out how the frameworks are structured, and how best to utilize the powerful functionality therin. Yes, you will bump up against lower-level C programming, but it'll probably be infrequent until you start to grasp what you can accomplish within the Cocoa frameworks alone.

The Hillegass book mixes enough theory, training and walkthroughs to lay some basic concepts down while giving you a grand tour of the Cocoa frameworks. Even if you don't understand everything in it, you should enjoy the process without getting frustrated. However, this isn't some watered-down, programming for dummies material. Aaron's been working with these frameworks long before Apple purchased Next computers. Here's a quickie bio:

Quote:
Aaron has over 18 years of experience as a software engineer and developer trainer. He wrote the Big Nerd Ranch course on Cocoa, drawing from his experiences working at Apple Computer, Inc. and NeXT Software, Inc. as the senior trainer and curriculum developer.

Aaron is the author of "Cocoa Programming for Mac OS X." This book, published by Addison-Wesley, is generally regarded as "The Book" from which to learn Cocoa programming. He is also the co-author of Core Mac OS X and Unix Programming.

Aaron has developed and deployed very large systems using Cocoa, WebObjects, and/or PostgreSQL for clients including Cogent Design, Nortel Networks, and the United Parcel Service. He has taught at the University of Washington and the New College of Florida.
Bottom line: remember that it's completely AOK to be confused when learning. That's part of the process and if you weren't confused and challenged, I'd be concerned that you weren't learning much of anything. It all depends on your learning style. If you can, see if you can locate them at a local booksellers and browse first.

Best,
Logicat

Last edited by logicat2001; Oct 4, 2004 at 06:04 PM.
logicat2001 is offline   0 Reply With Quote
Old Oct 5, 2004, 08:34 AM   #8
andysmith
Thread Starter
macrumors 6502
 
Join Date: Sep 2004
Location: West Mids, UK
Thanks - very helpful

I'll have a look for the books locally then - probably not for a while, I need to finish reading 'Mac OS X Panther in a Nutshell' (I want to fully get to grips with OS X first).
__________________
iPhone 3GS White / MacBook Pro Unibody 15" 2.8ghz 500gb 4gb
andysmith is offline   0 Reply With Quote
Old Oct 17, 2004, 12:23 PM   #9
bastardx
macrumors member
 
Join Date: May 2003
Location: Eugene, OR
As someone that has come from more of a Java background to Objective-C, I have one piece of advice: read carefully about memory management. This is very important for the transition from a language that is fully garbage collected(meaning when you create new objects, you don't have to delete them manually), to a language where you have to be more responsible with your memory usage.
bastardx is offline   0 Reply With Quote
Old Oct 17, 2004, 01:19 PM   #10
logicat2001
macrumors regular
 
Join Date: Apr 2003
Location: Minneapolis, MN
And regarding memory management in Cocoa, it's not confusing once you learn it. Also, it's nothing like the low-level management of memory in C.

There are two or three simple rules that, if followed, will prevent you from needing to worry about memory management and object persistance. Again, Hillegas' Cocoa book lays it out very simply.

The other Cocoa book that has proven itself invaluable is "Cocoa Programming". It's my go-to book for answers to specific Cocoa implementation questions; there's not much in the way of tutorial work included. Different chapters cover specific classes, programming methods, and Cocoa philosophies. It's really a fantastic reference, and the most explicitly helpfull one I've seen.

The only drawback of the 1st edition of "Cocoa Programming" is it only covers the API through 10.2. The 2nd ed. of Hillegas' book, now available, covers the bindings and controller additions of 10.3; an area that will radically change your programming methodology (as long as you expect to only release your software for 10.3 +).

Best,
Logicat
logicat2001 is offline   0 Reply With Quote
Old Oct 17, 2004, 05:42 PM   #11
iCreate
macrumors member
 
Join Date: Sep 2002
Location: Near Insanity
Send a message via AIM to iCreate
Quote:
Originally Posted by logicat2001
I'd strongly recommend the Aaron Hillegass book and forget about the "Programming in Obj-C" until later, or pick them both up simultaneously.
I picked up Hildegass' book both editions and find that they weren't all that helpful. Yes you simply type what is there and get the results he has, but without the underlying foundation in Objective-C most will be lost.
"Programming in Objective-C" by Stephen G. Kochan is the best for learning the language and he also guides you into the Foundation framework. Once you understand this Cocoa is a snap. Starting at the other end and working your way back is confusing to everyone I've come across that starts programming for OS X this way. So I recommend andysmith go with "Programming in Objective-C" it's a must and then find a good Cocoa book. I don't find the Hidegass book all that friendly to noobs.
__________________
MacBook Pro 15" Quad 2GHz i7-16GB RAM-1TB 840 Evo SSD-750GB HD-10TB Pegasus R4-10TB Drobo FS-28" Dell 2815Q 4K Monitor-Mavericks
iPad 64GB Wifi/3G-iOS 5
iPhone 5 64GB-iOS 7
iCreate is online now   0 Reply With Quote
Old Oct 21, 2004, 07:45 AM   #12
blueknight
macrumors newbie
 
Join Date: Oct 2004
Getting to grips with OOP

If you have only done PHP then you might need to learn about OO programming, this site has a great introduction to OOP mainly aimed at Java developers but concepts work in Obj-C.

http://sepwww.stanford.edu/sep/josman/oop/oop1.htm

If you find tutorials for Obj-C hard to find try just learning C as 90% or more will work in Obj-C, in fact many languages can work in Cocoa making it very cool indeed!

Actually you don't even need to do C, C++ or Java or Obj-C... you can make a pretty decent app using Applescript - check out the Apple developer site for more info
blueknight is offline   0 Reply With Quote
Old Oct 22, 2004, 12:26 AM   #13
macfreek57
macrumors 6502
 
Join Date: Jan 2002
Location: Baton Rouge, Louisiana
Send a message via AIM to macfreek57
if you download apple's developer tools, they should have a very fairly good tutorials. i downloaded the version they had about a year and a half ago and the included tutorial was pretty helpful. of course buying one of those books will probably be better, just not free (how i like things ).
macfreek57 is offline   0 Reply With Quote
Old Oct 25, 2004, 07:54 AM   #14
netytan
macrumors 6502
 
Join Date: May 2004
Quote:
Originally Posted by blueknight
If you have only done PHP then you might need to learn about OO programming, this site has a great introduction to OOP mainly aimed at Java developers but concepts work in Obj-C.

http://sepwww.stanford.edu/sep/josman/oop/oop1.htm

If you find tutorials for Obj-C hard to find try just learning C as 90% or more will work in Obj-C, in fact many languages can work in Cocoa making it very cool indeed!

Actually you don't even need to do C, C++ or Java or Obj-C... you can make a pretty decent app using Applescript - check out the Apple developer site for more info
Agreed, Applescript can be a good way to create small Apps, but I can't see myself - personally - using it for anything more than my own little utilities.

On the subject of learning OOP you might want to look at Python. Besides Python being easy to pick up there’s also much more documentation on Python than there is Applescript. And since Python and Obj-C classes share the same roots - Smalltalk – you might find it of more use to you.

Where as you might find classes in Java and C++ are a little different; they are more like PHP classes!

Conceptually though, the ideas behind OOP are language neutral. Still, I think worth mentioning. But then I am pretty new to Cocoa myself .

Have fun,

Mark.
__________________
12" G4 IBook (1GHz) named Darwin: 60GB HardDrive, BlueTooth, Airport Extreme coming soon?
netytan is offline   0 Reply With Quote
Old Oct 25, 2004, 08:21 AM   #15
jsw
Moderator emeritus
 
jsw's Avatar
 
Join Date: Mar 2004
Location: Andover, MA
I'm also new to the whole "Mac programming" thing. At least on anything since System 7. Coming from a strong Java background, it's requiring me to unlearn some stuff and has reinforced just how common basic OOP concepts are in other areas.

I agree that Hillegass' book ("Cocoa: Programming for OS X") is a great (and thorough) intro to Cocoa. "Cocoa Programming" is also good, but just a bit cumbersome IMHO. However, I don't see any way around getting Kochan's "Programming in Objective C" concurrently with Hillegass.

From my point of view, Cocoa provides you the keys to the GUI kingdom. Using Hillegass' examples, you'll learn to do most of what you need to learn in order to build a GUI, complete with interactions between components and with the user.

However, to actually do anything aside from GUI logic, you need Objective-C (unless you punt and use Java to fill in the gaps... as I've been guilty of doing). And Kochan's book is an excellent intro to that language - and it doesn't require familiarity with any language first (he starts at the beginning and teaches Objective-C, as opposed to assuming you're coming from C or C++ or Java or whatever background).

Before using Java, I used C++ for many years, and C before that. While I agree that Objective-C often looks like C (of course, since it's a superset), the differences are enormous in terms of how you use the language. Kochan does a great job of explaining it.

As far as AppleScript: it's great for inter-application glue. It's good (but often tedious and mystery-prone) as a simple way of interacting with apps. But it's not as good as Python, Java, Objective-C, shell scripts, or really any other approach when you're not directly trying to tell other apps to do things. It's good to know, and very, very useful in its defined area, but not a great general programming tool.
__________________
You'll be the one moaning for me to give you some. - THC(taken out of context)
jsw is offline   0 Reply With Quote
Old Nov 10, 2004, 02:13 PM   #16
hotwire132002
macrumors 65816
 
hotwire132002's Avatar
 
Join Date: Jan 2004
Location: Cadillac, MI
Send a message via AIM to hotwire132002 Send a message via MSN to hotwire132002
I'm also trying to begin cocoa programming--is there a good online tutorial anyone can point out? The only link I saw in this thread was at the beginning--and I skimmed through it, but didn't see anything that looked great.

By the way--I'm completely new to (any form of) C, so I need something that doesn't assume I know C.
hotwire132002 is offline   0 Reply With Quote
Old Nov 10, 2004, 02:26 PM   #17
logicat2001
macrumors regular
 
Join Date: Apr 2003
Location: Minneapolis, MN
Start at CocoaDevCentral for a pile of Cocoa articles (also compiled from Stepwise) and links to other reference material and tutorials.

Other than that, start reading and coding. If you want to learn how to cut code, just start cutting code.

Best,
Logicat
logicat2001 is offline   0 Reply With Quote
Old Nov 10, 2004, 05:09 PM   #18
hotwire132002
macrumors 65816
 
hotwire132002's Avatar
 
Join Date: Jan 2004
Location: Cadillac, MI
Send a message via AIM to hotwire132002 Send a message via MSN to hotwire132002
Quote:
Originally Posted by logicat2001
Start at CocoaDevCentral for a pile of Cocoa articles (also compiled from Stepwise) and links to other reference material and tutorials.

Other than that, start reading and coding. If you want to learn how to cut code, just start cutting code.

Best,
Logicat
Thanks for the help. I'll check it out
hotwire132002 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Xcode or cocoa? Pajamaxllama iPhone/iPad Programming 9 Oct 22, 2013 09:01 AM
Can anyone help me with ikscannerdeviceview in cocoa rameshkumar Mac Programming 1 Apr 15, 2013 07:19 AM
BecomeAnXcoder : A free book for starting with Cocoa using Objective-C msaljaber iPhone/iPad Programming 0 Feb 7, 2013 05:30 AM
Help with my first Cocoa App eugiel Mac Programming 1 Sep 30, 2012 08:18 AM

Forum Jump

All times are GMT -5. The time now is 11:15 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC