views:

171

answers:

8

I've been developing for quite a while but while I consider myself competent (or better) with C++, Java, C# & AS3/Flex in areas from web-servers to desktop applications to 3D games, I'm aware all these languages are pretty similar; even on the libraries side I know what to look for based on using libraries that do similar things in another language.

But Objective C I understand to be a different kettle of fish, and developing for mobile devices has always struck me as likely to be hard work since you have to develop on your PC and test on the actual device itself - my experience developing for PS2 put me off such things due to poor debuggers and other tools.

What's the reality? Is it a paradigm shift to move from web-servers and desktop apps and rich web-clients to iPhone... or for an experienced developer is it just another language to learn and new libraries to play with? Is there anything to be scared about at all?

edit: My main question on Obj-C specifically was if it's a different way of programming, like it would be moving to Haskell from Java for instance. It sounds this is not the case.

A: 

On a scale of 1 to 10, it's about a 6.

jeffamaphone
+1  A: 

Apple does use Objective C and it is different then normal C. So Iphone and IPad development can be hard if you've never used Objective-C before. If you are familiar at all with a language called SmallTalk, then Objective-C will be very easy for you to pick up.

Now other mobile devices, such as Android, uses Java. If you are competent in Java then Android development may be easier for you.

Some devices use Windows Mobile. If you are a .NET programmer, you can use .NET compact framework to develop Windows Mobile Apps.

Just so you know too, most mobile SDKs come with an emulator to test your app on. So if you don't have an iPhone, for example, you can still test your app with the emulator. I understand that the emulator is supposed to be 99% as accurate as an actual device

icemanind
The blackberry doesn't use windows mobile at all. Where did you get that idea? And as an addendum, an emulator by nature emulates the hardware as close as it can, the iPhone has a simulator which doesn't try to emulate things like timing let alone the architecture it runs on. As a result, it is no substitute for a device, and I would not recommend releasing anything without having tested it on a device thoroughly.
jer
Obligatory nitpick: it's "Smalltalk", not "SmallTalk", but yes, any kind of Smalltalk experience will serve you well.
Frank Shearar
Blackberry corrected. I was in the middle of 2 thoughts when typing that. I thought one thing and typed something else. Sorry for the confusion!
icemanind
+3  A: 

For starters, ObjC is fairly easy to grasp so long as you focus on the fundamentals. Don't worry about the syntax, there's not much there above C which I will presume you already are familiar with. There are excellent books out there this book is the definitive guide I recommend to most new users, Erica Sadun also has a good book on iPhone development, I recommend both of these highly.

Secondly, the tools aren't hard to use, and you will be pleasantly surprised with the debugger and other tool integration. Instruments was a long time coming, but it's indispensable for catching things like memory leaks, cpu time usage, and now power consumption.

But really, nothing to be scared about, and as for another platform to learn; well, yes and no. There is always going to be another thing to learn, regardless of iPhone or something else. Don't resist. :)

jer
A: 

I don't think there's anything to be scared of.

The simulator's pretty alright, even if it can't handle some things - it's hard to simulate the accelerometer, for instance!

Once you're over the hurdle of figuring out what certs you need and setting up the iPhone development account and such, it's fine.

It's a bit of a pain writing something, loading it on the device, trying it out, etc., but the fact that you can actually debug the code running on the device makes it rather a lot nicer than it could be. (I had to maintain an application for the Nokia 9110, and there I had to edit, compile, load, run, crash blindly, stare at code, guess, edit, compile, etc.)

Frank Shearar
To be fair, there's no reason apple couldn't simulate the accelerometer; they have one in all their new machines EXCEPT the Mac Pro afaik, which is I think the only reason they don't do it. Maybe that, and the fact that they don't want a repeat of the star wars light sabre people swinging their macs around from above their heads.
jer
It was exactly that that I was thinking :) A Mac mini's just the right size for a flail...
Frank Shearar
A: 

As a long time Windows C++ / .NET developer, I didn't find it very difficult to begin developing in Objective C.

There are some syntax differences that take some getting used to, but in general it similar enough to C/C++ to not feel like a completely new language.

Learning the library code and what you can and can't do easily seems like the larger challenge to me, which is going to be a challenge with any new platform.

Avalanchis
Every camp has their intricacies, and you are right, coming from .NET makes the learning curve a little steeper. However, not too difficult if you organize yourself well. Don't be afraid to keep notes on silly things even like remembering to insert a nil when creating an NSArray using the arrayWithObjects: class method or similar.
jer
A: 

I am writing a beginner book called Hello! iPhone, and I've made a mailing list of beginner tips to help people get started. After a week or so of tips, you'll be much more equipped to check out other books and understand the basics a bit better to judge.

http://loufranco.com/beginner-iphone-programming-tips/

It will take you through Hello, World and some other simple stuff (Outlets and Actions, basic memory management, etc).

Lou Franco
+1  A: 

Objective C is different but not far removed from normal OO methods. The syntax was the larger barrier for me.

The problem I saw was/is you learn ObjC for iPhone, and you can't take the skill (ObjC knowledge) outside the Applesphere really. I haven't seen a use for it. I have a handful of books I went through to get my feet wet. Some of these, the Apress books, contained errors in the code walkthroughs causing me to Google the book errata countless times.. so be careful of that, if you learn that way.

Also, unless this has changed, you can only develop under OSX with the SDK tools because no Windows version exists to my knowledge.

With that, you also have to play by Apples development rules to get published into the AppStore, which has had its share of dev horror stories.

That said, a working app is fun and beautiful in the end.

Kevin
Just as you can't take .NET out of the Microsoft sphere really.
jer
Haven't used .NET a whole lot but I can see where that is most likely true. I was thinking more along the lines of PHP/Ruby/etc.
Kevin
John
I remember writing applications targeting Windows in Objective-C using the OpenStep API (which is what it was known as at the time, it's now known as Cocoa). Of course, this was in the 90s before NeXT acquired Apple and was paid $426mil for the privilege :p And even that said, there's projects like GNUstep for other unix platforms, and there's even a win32 backend for it.
jer
+2  A: 

There's definitely a "paradigm shift" (ugh, buzzwords):

  • You don't have all the memory in the world (and there's no swap either)
  • You don't have all the CPU time in the world
  • You probably don't want a binary bigger than about 20 MB (the size that can be downloaded over the cell network)
  • You can't just change the server backend to make things right.
  • Graphic design is important if you want to be successful (but you don't want to bloat your app)
  • Web requests take a while (a website with redirects feels really slow compared to the desktop beside it).
  • JavaScript animations are painfully slow (ever tried the Google Maps website on an iPhone?)
  • UI design is heavily constrained by the size of the user's finger (even though the iPhone 4 has a comparatively huge screen).
  • UI design is really tedious.
  • The user can do more things than clicking and typing.

I find that the biggest difference is in the UI, not in the language. Languages are easy. Libraries require a little reading/searching/asking around, but then they're easy. UI design and UI programming are very difficult to do well.

tc.