Sunday, July 15, 2007

Why Cocoa

In Mac OS X you can use any number of development languages including C, C++, Open GL, Ruby and probably some others I forget about. These options are handy to have, but it’s not really any different to developing using these same languages on another platform (one that could target a lot more users).

The Business Advantage of developing in Mac OS X is Cocoa and Objective C, mostly because you get a whole lot of stuff for free. Low level things you don’t need to care about any more. Things that are a headache on other platforms.

There is an infinite number of possibilities for software development and they fall into a few categories:
Stupid Software... Shouldn’t be developed no matter how cheap it is
Brilliant Software... Should be developed no matter what the cost
Infeasible* Software... Perhaps a good idea, but a (cost-benefit)*risk analysis indicates that it’s not feasible

Infeasible software is the most interesting. What wasn’t feasible last year might just be feasible today, and that’s because companies like Apple invest a lot of time in taking away the headaches of development, so we can focus on our business problem and develop great software on the cheap.

What’s feasible on the Mac isn’t necessarily feasible on other platforms, which makes it exciting. It’s particularly exciting when you consider Agile development practices and exploring ideas. If you can explore an idea without breaking the bank, your much more likely to find something that works, and when you do, bring it back to other platforms perhaps.

What? You want an example?
Ok, here’s something really small. In Mac OS X you can create a custom view that draws stuff for your app and in 1 line of code you can convert it to a chunk of PDF data. 1 lousy line.
It’s a small thing, but it could mean the difference between your app outputting a beautiful, small, scalable PDF file and some ugly JPG. It might just make the difference between an idea that progresses and one that gets canned.

Still not impressed? Fair enough, it’s a fairly rudimentary example and it’s been in Mac OS X since the beginning. There’s much more exciting (but long winded) examples in newer frameworks such as CoreData, CoreImage and QuartzComposer.

*Infeasible isn’t actually a word, but for todays purposes let’s pretend it is and means the opposite to feasible