Thursday, November 26, 2009

GNUstep vs. Cocoa

I recently became interested in the idea of writing iPhone apps when the client I was working for mentioned a possible future iPhone project. I wanted to start learning the skills needed for such a project, but didn't have a Macintosh. Then I discovered GNUstep.

GNUstep is a free implementation/extension of the OPENstep standard developed by Next (bought by Apple around 1996) and Sun (recently bought by Oracle) based on NEXTstep. (I initially assumed that the NS that prefixes so many OPENstep class names stands for “NEXTstep”, but some people say it stands for "Next" and "Sun".) Cocoa under MacOS X is also an implementation/extension of OPENstep. Both use the Objective-C programming language and both have an IDE and GUI builder. The main differences between the two are as follows:

  • Cocoa is for MacOS only whereas GNUstep is a cross-platform system used primarily on Linux but also can be used on the Mac or even under Windows.
  • GNUstep does not implement the Mac's Aqua look-and-feel for two reasons:
  1. the original intent was to emulate the look-and-feel of the NEXT computers, and some people supposedly still like the retro look (really?)
  2. implementing the Aqua look-and-feel under Linux might bring Apple's lawyers down on the Free Software Foundation
  • GNUstep does not implement the UIKit classes required for iPhone development (UIKit has many classes that are similar to AppKit classes, but the UIKit classes are named differently, starting with IU instead of NS, and there are other differences).
  • Cocoa is professionally and commercially developed and used by a fairly large community of developers where as GNUstep has not received much attention even from the Linux community.
  • Cocoa is, of course, well documented by Apple and in a number of books that can be purchased from any bookstore. GNUstep documentation tends to be years out of date and incomplete, so you have to be willing to spend some time figuring things out on your own.
In the posts to follow I plan relate some of my experience as I start learning OPENstep in these different environments and move toward producing some iPhone application that I might be able to sell on iTunes.

No comments:

Post a Comment