views:

172

answers:

6

Basically I want to try and develop a basic iPhone app. I have 2 - 3 years experience in Java, and am currently studying C now - have done pointers memory management, etc. but very briefly.

Is Objective C going to deviate too much from the C that I have learnt so far, so it will be like learning a brand new language? Or should I be able to use what I have learnt thus far?

Also, what is the best IDE to do this in, currently for c i use dev-c++ - i read that it is possible to develop i phone apps using objective c in this ide but was wondering if there wwere a better option available. Possiblly netbeans :D

A: 

I believe it's very similar. Theres little new syntax really. I'd say you'd get a handle on it in a few days MAX based on your experience

dubbeat
+3  A: 

Objective-C is a strict superset of C, so anything that compiles under a C compiler will also compile in your Objective-C compiler.

Essentially Objective-C turns C into an OOP by adding small-talk style messaging to allow communication between objects.

To answer the additional part of your question, XCode is the Apple recomended IDE, and I beleive the only official way to build iPhone apps.

Edd
A: 

Everything that you learned about C is usable in Objective-C: Objective-C is a superset of C and any C program is correct Objective-C.

Moreover, everything that you know about Java is useful in Objective-C: most of the difference is syntactic sugar.

About IDE, the official way is Xcode on a Mac. It is free and is shipped with iPhone and iPad simulators.

mouviciel
I beg to differ. The OO philosophies of Java and Obj C are quite different. Java belongs to the Simula-style OO languages while Obj C belongs to the Smalltalk-style languages. Certainly the differences are more than "syntactic sugar".
KaptajnKold
Java was directly inspired by Objective-C. A lot of the syntax is modeled on C++, but the OO ideology came from Objective-C. It uses dynamic dispatch, interfaces are ripped directly off of protocols, equality is determined by an Objective-Cish method, etc. The languages are so similar that Apple nearly wound up moving all its Objective-C frameworks to Java.
Chuck
I am not going to disagree if you argue that there are many similarities between the 2 languages. My point was merely that there are significant differences too, and that they amount to more than syntactic sugar. And just to be clear: Java owes much more to C++ than Obj C. While it may have borrowed some concepts from Obj C, it fundamentally remains a Simula-style language.
KaptajnKold
+1  A: 

It's very close to C as really it just adds an OOPS layer over the top of normal C. As someone was very familiar with C but never used C++ extensively enough to feel totally at home with it I find I really quite like coding in it.

The syntax is a little odd compared to C++ which does take a bit of getting used to, but once over that hurdle then there's nothing much which will cause you any pain, and a lot of gain.

Of course most of the challenge is not actually learning Objective-C, but coming up to speed with the cocoa API

Cruachan
A: 

You have to build using XCode tools on a Mac. That doesn't mean you have to edit in XCode, but you're going to be using it to construct the build system, debug, and perhaps run your builds in it (although you can also do that using xcodebuild on the commmand line).

Andrew McGregor
+1  A: 

I'm exactly in the same path: I learned (and used) C in the past, am using Java now and learning Objective-C.

To develop iPhone apps you must download the XCode IDE and iPhone SDK from http://developer.apple.com/iphone/program/

So you MUST HAVE a Mac to develop iPhone apps. There are a couple projects to compile from C# (http://monotouch.net/) and Java to iPhone's ObjC, but I don't recommend you this. Better get a Mac. An Intel Mac, by the way (XCode does not support now PowerPC Macs)

If you know how to develop in Java, you can apply all you knowledge in a different syntax. Yes, there are subtle differences, but start thinking like a "Java to ObjC translator" and you'll be able to develop your first apps.

Also I recommend the following book to start learning: Beginning iPhone 3 Development: Exploring the iPhone SDK

Diego Freniche