Free Republic
Browse · Search
News/Activism
Topics · Post Article

Skip to comments.

Steve Jobs and the History of Cocoa, Part One
The O'Reilly Network ^ | 05/03/2002 | by Simson Garfinkel and Michael Mahoney

Posted on 05/04/2002 9:34:00 PM PDT by Leonard210

Steve Jobs and the History of Cocoa, Part One

by Simson Garfinkel and Michael Mahoney
05/03/2002

Editor's note: In this first part of a two-part series, Simson Garfinkel and Michael Mahoney explain why Cocoa and Mac OS X aren't nearly as revolutionary as they are evolutionary -- and still in the process of refinement. The story begins with Apple's genesis in the 1970s and takes you through key events up through 1993, when NeXTSTEP began to flounder. In Part Two (Friday, May 10), Simson and Michael pick up the story with the Star Trek project and bring you to the current iteration of Mac OS X.

If you are a Macintosh user, you've almost certainly heard of Mac OS X, Apple's "revolutionary" new operating system that now ships standard on all Macintosh computers. And if you know anything about OS X, then you know that to call the operating system "revolutionary" is a huge misnomer -- while Mac OS X brings a whole range of exciting new capabilities to Macintosh users, it's really much more an exercise in evolution than revolution.

If "X" stands for that which is unknown, then Apple's next-generation operating system is fundamentally misnamed. Unlike that other "X" operation system, Microsoft's Windows XP, very little about Mac OS X is unknown or unpredictable. Indeed, some of the most innovative goodies in OS X are actually mature, stable technologies that have been painstakingly developed over the past 15 years by Apple, NeXT Computer (which Apple acquired in December 1996), and the open source community as a whole. The real pleasure that is Mac OS X comes from the seamless integration of these technologies in a single desktop.

To be sure, Apple has taken great pains not to annoy the Macintosh faithful. The Mac OS X "Aqua" interface looks a lot like the Macintosh interface that tens of millions of people have come to know and love. Along the top of the monitor is the ever-present menu bar with the Apple in the top-left corner. There are pull-down menus, pop-up buttons, scroll bars, and even Apple's Finder.

But instead of sitting atop the Macintosh Toolbox, OS X is built upon a Unix kernel. Indeed, Mac OS X ships with an entire BSD-based Unix operating system called Darwin. There is a "Terminal" application, a copy of the GNU C Compiler, emacs, make, awk, lex, yacc, and even perl (version 5.6.0), all of which combine to make it a proficient open source development platform. But for many programmers, the real excitement of Mac OS X will be programming with "Cocoa."

Writing programs for Cocoa is both similar to and yet significantly different from writing programs for other programming environments. Like other modern application-development environments, one writes Cocoa programs by building systems of related but distinct parts, or objects, and connecting them together to form an integrated whole. Confining different aspects of a program to different pieces makes those pieces easier to design, implement, debug, and reuse. This is what is known as object-oriented programming (OOP).

But unlike development systems based on the C++ programming language, such as Microsoft's Application Foundation Classes and CodeWarrior's PowerPlant, Cocoa is built on top of the Objective-C programming language -- a language that's simultaneously simpler than C++ and yet better suited to creating graphical user interfaces. Whereas most people find programming in C++ a chore, most Objective-C programmers find the language to be a joy.

Cocoa embodies the principles of object-oriented programming from its user interface down to its very core. This greatly simplifies the task of building applications for Mac OS X. The downside is that it makes the Cocoa environment very different from the environments to which most programmers are accustomed. As a result, there's something of a learning curve -- a curve that can be pretty steep if you don't have competent instruction.

While Cocoa is a relatively new offering from Apple, the underlying operating system on which Cocoa is based is more than a decade old. Although today Cocoa is an integral part of the Macintosh operating system, much of what is now called Cocoa dates back to the NeXTSTEP OS developed by NeXT Computer, Inc., from the late 1980s through the mid-1990s.

This is very important: Cocoa is not some new fad technology Apple is trying out today but might soon discard: it is a mature, time-tested development environment that has been used and improved by many thousands of programmers over more than a decade.

Mac OS X can actually run at least four different kinds of programs right out-of-the-box. In addition to Cocoa applications, OS X can run an incredibly wide range of legacy Macintosh applications in its so-called "Classic" mode. These applications have exactly the look-and-feel of applications running on Mac OS 9 -- in fact, Mac OS X actually runs them inside a virtual Mac OS 9 operating system.

Mac OS X can also run new "carbonized" applications based on a limited set of the Macintosh Toolbox API that is supposedly native under the new operating system. And finally, like any modern operating system, OS X can also run programs written in the Java programming language.

To understand how all of these different technologies fit together, and to understand the grand unification that is Mac OS X today, you really need to know the history of Apple, the Apple II and III, Lisa, Star Trek, Steve Jobs, John Sculley, the Macintosh, and a company called NeXT.

Baked Apple

At the bottom of every press release that Apple Computer sends out today is the sentence "Apple ignited the personal computer revolution in the 1970s with the Apple II and reinvented the personal computer in the 1980s with the Macintosh." Powerful words to be sure; all the more telling because they are true.

The Apple II computer wasn't the first personal computer, but it quickly became the most popular. The computer came with a built-in BASIC interpreter, great color graphics, and enough RAM to hold an application and some data. The Apple II could display 24 lines of 40-column uppercase text, it had 6 expansion slots, a cassette interface, and a full-size 52-key keyboard. Shortly after its introduction, Apple introduced the Disk II, the world's first affordable floppy disk system.

Many schools found that buying a few Apples and putting them on a table in a windowless storage room was a cheap way to add "computing" to their curriculum. Soon programs like Apple Writer were letting students do basic word processing, a revolution in the 1970s! (Upper-case letters were displayed with reverse video.) But what really made the Apple II a breakthrough computer was an application called VisiCalc, the first spreadsheet, which was released in October 1979.

VisiCalc was a godsend to independent accountants and financial analysts who could sneak a few Apple computers into their offices. After all, it was a computerized spreadsheet -- no longer did these people have to mindlessly add up the same numbers again and again with their calculators! Unfortunately for both Apple and the program's publisher Software Arts, VisiCalc was a business application trapped on a hobbyist computer.

With its graphics and an RF interface that made it possible to display text on a standard television, the Apple II was great for playing games, but it was downright difficult to take the Apple II seriously in an office. Between 1978 and 1983, Apple's sales grew at the rate of 150 percent a year -- but those sales were almost entirely based on the home and education markets. Apple's sales force knew that the big dollars to be made in desktop computing were in the business world. To tap those dollars, Apple needed a business computer. And that computer was the Apple III.

Equipped with between 96-256K of RAM, a 1.4Mhz 6502A, an integrated floppy disk, and an optional 5MB hard drive, the Apple III should have been an instant success. Unfortunately, the system was plagued with problems from the very beginning. The machines ran hot and frequently failed. The III was supposed to be able to run Apple II programs, but the emulation was unstable and uneven.

The system was introduced in September 1980, pulled from the market shortly thereafter, and reintroduced in the fall of 1981 -- just in time to be smashed by IBM's newly-introduced Personal Computer.

IBM had designed its computer from the ground up to be a business machine. The machine had a crisp 25-line, 80-column display with both uppercase and lowercase letters, it was built like a tank, and it was even sold by the trusted IBM sales force. It had a 16-bit microprocessor that could handle up to 640k of memory ("enough for anybody," we were told). The IBM PC sold. Just two years after it was introduced, IBM's sales on personal computers passed Apple's.

Apple went back to the drawing board and tried once again to create a business computer. This time the plan was revolution, not evolution. Its next attempt at a business machine was the Lisa -- a 68000-based computer with a graphical user interface, mouse, floppy drive, desktop-based operating system, and seven applications: LisaDraw, LisaWrite, LisaCalc, LisaGraph, LisaGuide, LisaLisa, and LisaProject. The whole system came with a 5MB external hard drive and cost $9,999. Introduced in January 1983, Lisa was a high-end machine that never caught on.

Perhaps the problem was management. Apple was started in a garage in 1976 by two kids -- Steve Jobs and Steve Wozniak -- who really had nothing in the way of professional experience. So in 1983, Steve Jobs called up John Sculley, then at Pepsi-Cola, to be president of Apple. "If you stay at Pepsi, five years from now all you'll have accomplished is selling a lot more sugar water to kids," Jobs reportedly told him. "If you come to Apple you can change the world."

Of course, in order to change the world, Apple needed to have a computer that people would buy. Convinced that Lisa was a flop, Jobs pulled together a handpicked "pirate crew" of engineers who set out to make a low-cost computer that could be used by anybody. The pirate project became Jobs' pride and joy -- a project that immersed him while Sculley surveyed the rest of the company. A year later, Apple introduced Macintosh with its infamous "1984" commercial played during the 1984 Super Bowl.

Sculley may not have changed the world, but he certainly changed Apple, which even the most faithful acknowledge was a mess at the time -- a place the neighbors in Silicon Valley were increasingly calling "Camp Runamok." Sculley simplified Apple's product lines and slashed costs. Eventually Sculley decided that the source of Apple's problems was Jobs' erratic management style. He gradually stripped Jobs of his day-to-day responsibilities, and finally relieved Jobs of his duties as chairman of Apple's board.

Jobs left Apple with a few hand-picked engineers -- his closest allies -- determined to set up a new computer company and do it all again. He called that company NeXT, as in "the next big thing."

What Was Next

Every successful company has a driving ideology. At NeXT the ideology was to do everything right -- or at the very least, not to repeat any of the mistakes Apple had made.

The Macintosh operating system had always been plagued by reliability problems. NeXT solved this problem by basing its computer on Unix, the most reliable operating system that had ever been created. Macs were widely used in publishing -- the Macintosh practically created the field of desktop publishing -- and yet fonts on the Macintosh screen were never quite the same as they would appear on the Apple LaserWriter. NeXT solved this problem with Display PostScript, a system that let the computer use exactly the same fonts and drawing commands on the screen and its laser printer.

The Macintosh toolbox was great, but it was exceedingly difficult for programmers to make relatively simple modifications to buttons, scrollbars, and other objects displayed on the screen. NeXT solved this problem through the use of object-oriented programming and a new computer language called Objective-C.

But NeXT wasn't just a software company -- Jobs was also obsessed with building hardware. And this proved to be the company's downfall.

Obsessed with the idea of Zen perfection, Jobs had his designers create the first NeXT computer in the shape of a cube -- a heavy magnesium cube that was expensive to produce and difficult to ship. Convinced that networked computers were the way of the future, Jobs banned the floppy disk from NeXT's first machine -- a decision that made distribution a challenge for software developers.

Convinced that CD-ROMs were a passing fad but that rewritable optical storage was the way of the future, Jobs signed a deal with Canon to equip every NeXTcube computer with a 256MB magneto-optical drive -- a drive that proved to be finicky, unreliable, noisy, and incredibly slow.

The NeXT computer had a proprietary keyboard, proprietary mouse, proprietary video display, and even a proprietary laser printer. In a world that was increasingly moving to commodity computers running third-party operating systems like Windows, NeXT was retrograde.

Despite these caveats, NeXT actually managed to sell more than 50,000 of its workstations. Some companies, like the upscale Silicon Valley-based Alain Pinel Realtors, bought the black computers because they were exquisitely attractive. But the majority of the computers were sold for a different reason -- because businesses found it incredibly easy to develop custom applications using the NeXTSTEP operating system.

NeXT machines found their way into the banking, health care, and telecommunications arenas -- all industries that base their competitiveness on their ability to manage information and bring out new information products. In a world where time-to-market was king, NeXTSTEP literally made companies more profitable.

But as NeXT's sales slowly ramped up, the company heard the same message again and again from its customers: "Love the software, hate the hardware."

The year was 1992 and a lot of people were beginning to think seriously about the difference between selling hardware and selling software. Microsoft was just beginning to storm the world with Windows version 3 -- a graphical operating system that had the side benefit of helping Microsoft sell its graphical application programs.

Sun Microsystems had split its company into "planets," one of which was a software division that had ported the Solaris operating system to Intel-based hardware. There was even talk of "free" operating systems like Linux and BSD Lite. The world was starting to change.

That year, NeXT announced it was going to port the NeXTSTEP operating system from it's Motorola-based "black hardware" to Intel-based "white hardware." More amazing yet -- the system actually worked.

The following year, NeXT got out of the hardware business and got into the porting business, cutting deals with Data General, Sun, and Hewlett-Packard, all of which soon had versions of the NeXTSTEP operating system running on their hardware. The company even started on a port of the NeXTSTEP application framework to Windows.

It was the right idea, but the wrong time. By 1993 companies could no longer justify going with an oddball operating system simply because it was faster to develop application programs. Although NeXT Software had some customers, the company floundered.

In next week's conclusion, Simson Garfinkel and Michael Mahoney take you inside the secret mission, dubbed Star Trek, to port the Macintosh operating system to Intel-based hardware. Then they cover the port of the NeXT OS to the PowerPC, leading to the birth of Mac OS X.

Simson Garfinkel is Chief Technology Officer at Sandstorm Enterprises, and the author of many books and articles.

Michael Mahoney is Professor and Chair of the Computer Engineering and Computer Science Department at California State University, Long Beach.


TOPICS: Miscellaneous; Technical
KEYWORDS: apple; mac; macuserlist; next; unix
A few days back a question about the Mac OS came up. As I'm just learning myself, I thought this info would be valuable. (Also my first post.)
1 posted on 05/04/2002 9:34:00 PM PDT by Leonard210
[ Post Reply | Private Reply | View Replies]

To: *MacUser;CheneyChick

2 posted on 05/04/2002 9:51:38 PM PDT by Libertarianize the GOP
[ Post Reply | Private Reply | To 1 | View Replies]

To: *Macuser_list

3 posted on 05/04/2002 9:52:37 PM PDT by Libertarianize the GOP
[ Post Reply | Private Reply | To 2 | View Replies]

To: Leonard210
Thanks for this interesting article...I'm a Mac-Head. I HATE computers...But my Mac is almost like a family member.
4 posted on 05/04/2002 9:58:12 PM PDT by lainde
[ Post Reply | Private Reply | To 1 | View Replies]

To: Leonard210
The hot rumor is - - - Apple introducing rack-mountable servers - perhaps next week.
5 posted on 05/04/2002 10:03:20 PM PDT by HAL9000
[ Post Reply | Private Reply | To 1 | View Replies]

To: Leonard210
Well done post. Thanks.
6 posted on 05/04/2002 10:09:42 PM PDT by ThePythonicCow
[ Post Reply | Private Reply | To 1 | View Replies]

Comment #7 Removed by Moderator

To: theprogrammer
That or learn Python <grin>.
8 posted on 05/04/2002 10:22:59 PM PDT by ThePythonicCow
[ Post Reply | Private Reply | To 7 | View Replies]

To: Leonard210
Maybe some day they'll have more than 6% market share, too.

Yawn.

Finally got a first-hand look at the new ZitMac the other day. Man, that damn flat screen is fuzzy! It's actually harder to read type than the $129 monitors at Costco.

This is not progress, no matter how it's dressed up for the useless hipsters to waste their money.

9 posted on 05/04/2002 10:32:19 PM PDT by Hank Rearden
[ Post Reply | Private Reply | To 1 | View Replies]

To: Hank Rearden
Man, that damn flat screen is fuzzy!

No, the screen is razor sharp - but the text is anti-aliased to give a smoother image on the screen.

The anti-aliasing can be controlled in the Mac OS X System Preferences. It can be reduced or turned off if you prefer the old text rendering style.

The older I get, the more I like text anti-aliasing. It's easier on the eyes, and it gives a more natural appearance - like ink on paper.

10 posted on 05/04/2002 11:49:34 PM PDT by HAL9000
[ Post Reply | Private Reply | To 9 | View Replies]

To: HAL9000
Interesting spin. Lame, but unique.

As I get older, I appreciate a sharp display even more than I did previously. Sharp displays are commonplace and relatively inexpensive these days. The ZitMac doesn't have one; it hurts to read it.

11 posted on 05/05/2002 8:02:48 AM PDT by Hank Rearden
[ Post Reply | Private Reply | To 10 | View Replies]

To: Hank Rearden
Interesting spin. Lame, but unique.

It's not spin, it's a fact.

In this image, the upper example is anti-aliased and the lower one is not.

Anti-aliasing blends the edges of the characters with the background to smooth out the jagged stair-stepping effect that occurs in diagonal lines represented by square pixels.

Now please explain why you think the Mac OS X control panel to set the anti-aliasing level to the user's preference is "lame", because I'm not following your logic here.

12 posted on 05/05/2002 10:36:38 AM PDT by HAL9000
[ Post Reply | Private Reply | To 11 | View Replies]

To: HAL9000
Here's a simple question, then: why, out of the box, is the display fuzzy and hard to read?

No wonder Macs have 5%.

13 posted on 05/06/2002 7:03:22 AM PDT by Hank Rearden
[ Post Reply | Private Reply | To 12 | View Replies]

To: Hank Rearden
Here's a simple question, then: why, out of the box, is the display fuzzy and hard to read?

I dunno. How come when I get in a new car, the seat is too close to the steering wheel and the radio isn't already tuned to my favorite station?

That's why they build these things with controls, Hank. You set the controls to suit your individual preference. But suppose another family remember prefers different settings.... Mac OS X can remember that each user has different preferences for things like text anti-aliasing, volume settings, etc. and restores that user's personal settings when they log on.

14 posted on 05/06/2002 9:13:10 AM PDT by HAL9000
[ Post Reply | Private Reply | To 13 | View Replies]

To: HAL9000, Hank Rearden
That's why they build these things with controls, Hank.

Hank, check out the controls again. That Mac has a wide range of control, from Very Fuzzy all the way up to Unfreakin'-believably-Fuzzy...
15 posted on 05/06/2002 1:05:12 PM PDT by Bush2000
[ Post Reply | Private Reply | To 14 | View Replies]

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
News/Activism
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson