Last updated: February 12, 2019
GNUstep Application Development Platform
GNUstep is a free and open source application platform which is very similar to Apple’s Cocoa platform, and originating in the same product lineage. GNUstep actually predates Cocoa, but due to the popularity of Cocoa, GNUstep acts as a sort of open source Cocoa clone.
History of GNUstep
After Steve Jobs left Apple, his new company, NeXT Computers, developed a new application and development platform (as well as a new operating system underlying it).
This was written in Objective-C, an object-oriented superset of C which NeXT licensed from StepStone, a company founded by the language’s creators.
This application and development platform, called NeXTSTEP, eventually led to the development of Apple’s Cocoa and GNUstep. This path from NeXT’s product to GNUstep takes several years and involves several related stories.
Objective-C Becomes a Free Language
Because Objective-C was processed into C code, and then compiled as C, it relied on a C compiler. In order to make Objective-C available to developers on Unix platforms with a minimum of developer hassle, the Objective-C preprocessor needed to link to GCC, the GNU C Compiler.
After some initial plans to keep the language proprietary while still integrating GCC, Richard Stallman of GNU decided that the language would need to be GPL licensed. StepStone agreed, and Objective-C became a Free language.
However, the runtime that made Objective-C useful, was held back and remained proprietary. Several different developers worked on open source replacements for the Objective-C runtime, and the one currently in use was developed in 1993 by Kresten Krab Thorup.
Free Implementations of NeXTSTEP
In 1991 Paul Kunz, a developer at Stanford Linear Accelerator Center, wanted to be able to run HippoDraw — software written for the NeXTSTEP platform — on another platform.
Rather than porting the application itself, he developed an object library that mimicked the user interface API of NeXTSTEP. This allowed him to run HippoDraw without changing a single line of code in the application itself.
In 1993, Andrew McCallum released Collection Library for GNU Objective-C, which mimicked another set of core NeXTSTEP object libraries.
NeXTSTEP Become OPENSTEP
In 1993, NeXT began collaborating with Sun Microsystems to create a version of the “top layer” of the NeXTSTEP platform (user interface and programming API) that would be compatible with their Solaris operating system.
Naturally, most of this work involved stripping out the parts of NeXTSTEP that were tightly integrated to the hardware and operating system.
There was also some refinement and redesign of the platform’s development API, breaking it into well-defined “frameworks.”
This work led to the release of the OpenStep standard (which was an open specification, available to the public) and the development of the OPENSTEP platform (which was a proprietary implementation of OpenStep).
OPENSTEP replaced NeXTSTEP, and is the first version in this product lineage that is obviously recognizable as a precursor to Cocoa and GNUstep.
This was the version that introduced the core Foundation and AppKit frameworks, as well the family of NS-prefixed classes.
OpenStep Gets a GNU Implementation
After the OpenStep standard was published, Andrew McCallum, Paul Kunz, and others at GNU rewrote their Objective-C libraries to match the standard.
The effort was, quite naturally, dubbed “GNUstep” — the name had already been suggested informally as early as 1991, when some hoped that NeXT would give the entire project over to the Free Software Foundation.
Over the course of the next several years, the project expanded to become a fully compatible, free and open source implementation of the OpenStep standard. The first version to fully implement the specification came in 1998, and the official 1.0.0 release was in 2001.
Cocoa: the Next Step for OPENSTEP
Apple bought NeXT Computers, and rehired Steve Jobs, in 1996. The OPENSTEP platform was integrated into the new Mac operating system and renamed Cocoa.
Cocoa has changed a great deal in the intervening decades, especially as Mac moved to OS X from the Mac OS, and Cocoa expanded to include Cocoa Touch for iOS.
When Cocoa moved away from the OpenStep specification, GNUstep moved away from it as well. Its developers now consider it simply an implementation of Cocoa, with only historical ties to OpenStep.
GNUstep is a free and open source Cocoa implementation. Though it lags behind Cocoa a bit, the intention of the development team is to keep GNUstep in sync with Cocoa as much as possible.
What’s the Point?
Cocoa is a proprietary application platform, tightly bound up with the Mac OS X and iOS systems. Why would anyone want to have an Open Source version of this? Why does GNUstep continue to exist?
One of the biggest reasons for this is that it makes it possible for an application developer to design for OS X or iOS. From there, you can port the app to Unix, Linux, Windows, BSD, and Solaris. Thus GNUstep provides you with a cross-platform development environment.
This gives you many of the advantages of the Java Virtual Machine or Flash. But there is considerably less overhead. What’s more, some argue it creates a better overall architecture.
It also makes a lot of sense to target initial development at Cocoa. That’s because you deal with the often difficult requirements of the App Store right up from. Then you can easily port to the other environments.
Additionally, many developers simply like the platform. Apple has put a lot of thought and work into the design of Cocoa, and many people who develop for Linux and Unix environments like having the platform available for building new applications.
GNUstep can also be rolled into an operating system distribution, tightly integrating it the way that Apple integrates Cocoa. It doesn’t have to be used this way, but it can. When integrated like this, GNUstep can be used to power the desktop environment.
Languages for Development
The primary development language for GNUstep is Objective-C. GNUstep itself is written in Objective-C, as are most applications. It is possible to run code written in a handful of other languages (notably, Java and Ruby), but Objective-C is really the
As of this writing, GNUstep does not support Apple’s new Swift programming language. Apple released the language as open source very recently, and GNUstep intends to support it as soon as possible.
Learning and Reference
GNUstep offers a great development platform for coders who want to create applications on many different platforms. Although there is a limited amount of information on GNUstep, you can learn a lot more about it by looking into Objective-C and Cocoa.
Further Reading and Resources
We have more programming guides, tutorials, and infographics related to coding and developer resources:
Objective-C Resources: get started and move into advanced areas of Objective-C programming.
Cocoa and Cocoa Touch Introduction: learn the closely related API for creating applications for Mac OS X and iOS.
Swift Introduction and Resources: the new language designed specifically with Cocoa (and indirectly GNUstep) in mind.