Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Java or Objective-C?

Java or Objective-C?
Thread Tools
Forum Regular
Join Date: Sep 2004
Status: Offline
Reply With Quote
Sep 24, 2004, 12:51 PM
 
I'll soon be getting my first Apple (iMac G5). AS well as the usual stuff, I'd like to do some development on it, primarily for fun and for my own education. I do a little bit of Java development at work, but not much - unfortunately I'm more of a manager than developer these days. So, my question is quite simple. For fun programming on the Mac, what would you recommend, and why? Java, or Objective-C? If Objective-C, what's the best way to learn (books, tutorials, etc)?
Paul

Wassenaar, The Netherlands.

Home: iMac G5 1.8GHz
Work: Powermac Quad and MacbookPro 17" C2D
     
Senior User
Join Date: Feb 2001
Location: Deer Crossing, CT
Status: Offline
Reply With Quote
Sep 24, 2004, 01:08 PM
 
If you want development to be fun, then work in Objective-C. I say this because Interface Builder keeps you from hand-coding the GUI and turns it into a fun game of drag-n-drop. Plus you can wire up basic actions (like setting a button to toggle showing/hiding a drawer) without having to write a lick of code.

What got me moving with Obj-C development was Eric Tremblay's 2-day course ( www.macdev.ca ). Now, unless you live near Biloxi you won't be able to take this class so the next best solution would be to get Aaron Hillegass' book, Cocoa Programming for Mac OS X. This is the Amazon link to the book: --> http://www.amazon.com/exec/obidos/ASIN/0321213149/

This book forms the basis of a week-long course given at the big nerd ranch ( www.bignerdranch.com ) and comes highly recommended. If you buy this in a store, make sure you have the 2nd edition as the latest edition works with XCode while the 1st edition works with Project Builder. Not that there are huge differences, but XCode's layout is a bit different.

Believe it or not, Cocoa Programming for Dummies is also a good primer on Obj-C / Interface Builder programming as well.
20" iMac G5! :D AND MacBook 1.83GHz!
Canon Digital Rebel Kit + 75 - 300mm lens. Yum Yum! :D
Check out my OS X Musical Scales program
     
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status: Offline
Reply With Quote
Sep 24, 2004, 01:35 PM
 
I second that recommendation. I have Aaron's first edition of his book. It's great, and his web site has an area where you can discuss the challenges in his book, so you aren't left high and dry.

I would only use Java if you need your code to be cross-platform.
     
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Sep 24, 2004, 02:12 PM
 
I would recommend either. If you already know Java, then it would be easier to stick with Java and just learn to use Cocoa-Java. You get the exact same process to wire up nice interfaces (all the same options... only the naming conventions change) with the familiar language. Cocoa-Java is not portable, so any applications written with it would be strictly MacOS X, but it is a very powerful and fun environment.

I have use both Cocoa-Java and Obj-C-Cocoa, and find them both to be great languages. Obj-C does have it's own great features that take object orientation in a slightly different direction, but Java's syntax is generally easier to read.
     
Forum Regular
Join Date: Sep 2004
Status: Offline
Reply With Quote
Sep 25, 2004, 12:49 AM
 
Thanks for the advice guys. I've ordered the book recommended above from Amazon, as well as another one Amazon recommended to partner it (I fall for their marketing every time...) and will give Objective-C a shot. It's always fun to try something new.

Now, anyone got any good ideas for a programming project?
Paul

Wassenaar, The Netherlands.

Home: iMac G5 1.8GHz
Work: Powermac Quad and MacbookPro 17" C2D
     
Mac Elite
Join Date: May 2001
Location: ~/
Status: Offline
Reply With Quote
Sep 25, 2004, 02:04 AM
 
Start off following the examples in your new books but once you've got those done I'd suggest you take an aspect of a hobby you enjoy and write a program to help you do it. Let's say you like cross-country hiking; write a program that helps you log your hikes and manipulates that data in some way or performs calculations based on it. In the case of a hiking log beautify the data and draw some charts using Quartz 2D and print them out (paste them on your refrigerator to impress your friends) or perform caloric burn calculations and figure out how physical fit your hikes are making you.

Many programs despite their bells and whistles just provide means to input data into a computer and then summarize that data to make it easier to get a handle on. Using a hobby or something else you enjoy as the basis of your programming projects tends to make you more apt to follow through with them since you've got a good understanding of what you're trying to accomplish and you've got a stake in the completion of your work.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:12 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2