From Win32 to Cocoa: A Windows user’s would-be conversion to Mac OS X

Ten years ago around this very time—April through June 2008—our intrepid Microsoft guru Peter Bright evidently had an identity crisis. While our staff hopefully enjoys a less stressful Memorial Day this year, throughout the weekend we’re resurfacing this three part series that doubles as an existential operating system dilemma circa 2008.

Part one ran on April 21, 2008, and it appears unedited below.

A couple of Gartner analysts have recently claimed that Windows is “collapsing”—that it’s too big, too sprawling, and too to allow rapid development and significant new features. Although organizations like Gartner depend on trolling to drum up business, I think this time they could be onto something. “Collapsing” is over-dramatic—gradual decline is a more likely outcome—but the essence of what they’re saying—and why they’re saying it—rings true.

Windows is dying, Windows applications suck, and Microsoft is too blinkered to fix any of it—that’s the argument. The truth is that Windows is hampered by 25-year old design decisions. These decisions mean that it’s clunky to use and absolutely horrible to write applications for. The applications that people write are almost universally terrible. They’re ugly, they’re inconsistent, they’re disorganized; there’s no finesse, no care lavished on them. Microsoft—surely the company with the greatest interest in making Windows and Windows applications exude quality—is, in fact, one of the worst perpetrators.

The unfortunate thing about this is that there is a company that’s not only faced similar problems but also tackled them. Apple in the mid-1990s was faced with an operating system that was going nowhere, and needed to take radical action to avoid going out of business. And so that’s what Apple did. Apple’s role in the industry has always been more prominent than mere sales figures would suggest, but these days even the sales numbers are on the up. There are lessons to be learned from the company in Cupertino; I only hope they will be.

A little background

I’ve never been a Mac user. I’ve used Macs from time to time, of course, but never owned one myself. As with many Brits at school I was brought up on a diet of Acorn Archimedes and RISC OS. RISC OS brought with it many notable features: it had a spatial file browser , its menu bar was optimally located, it used bundles for applications, and it had a taskbar/dock before anyone else did. The Archimedes was, however, a footnote in the history of computing, and the only computers I’ve ever have been PCs.

I got my first PC in 1997. It was a Dell Pentium II with Windows 95. I got it because I was interested in computers and I wanted to learn how to program them, so I picked up a student edition of Visual Studio 97 and duly learned C++. At that time, Windows was really the only game in town; Macs were ever so expensive and, as everyone knows, there was no software available for them.

Microsoft was pretty good to me at the time. The Windows OS was fast and reasonably stable. We didn’t have to worry about allocating memory to applications or rebuilding our desktops, and although the preemptive multitasking and protected memory were not perfect, the system was obviously more stable than any Mac.

I got cheap student copies of Visual Studio 6 and Office 97. I bought the Windows 98 upgrade on the day of its release, wowed by its sleek new look (gradients in the title bars!). Microsoft sent me copies of an exciting new operating system called “Windows NT 5 Beta 2” which I eagerly installed and ran as my primary OS until it expired; Microsoft even sent me a copy of Windows 2000 for my trouble. That OS was bullet-proof; it was quick, it ran all the applications I wanted, it supported my software—what more could someone ask for?

I began working in late 1999 as a software developer, writing all sorts of programs in Java, Visual Basic 6, C++, SQL Server, and whatever else I had to use. Again, I felt well-treated by Microsoft. MSDN Library was an invaluable developer resource; Microsoft was open about what it was doing, giving out betas of Windows XP (or Whistler, as it then was) to all and sundry, and it felt like the company knew what it was doing. Redmond had a roadmap of Whistler and Blackcomb; it had a .

This was attractive to someone who programmed for a living. Developers felt valued, like the company cared about them. I enjoy programming, and I enjoy writing software. I did then; I do now. So for me, this is really a key piece of what a platform has to offer.

A brief history of Macs

The Mac at this time was still struggling with its archaic OS and its underpowered hardware, and the entire platform felt stagnant.

In 2001, Apple just about managed to get OS X out the door—dragging Mac software kicking and screaming into the 21st century—but had so little confidence in the thing that it still made the computers default to Mac OS 9. Even Mac proponents regarded OS X as little better than a beta. But it was the start of a big change in the fortunes of the Mac platform. Although OS X was slow and buggy, it also hinted at being something more; a platform for the future. The infrastructure was sound, and Quartz was downright modern. Its Cocoa API and Objective-C were an exciting development platform offering interesting new features like “System Services.”

Part of this was by accident. If Apple’s Copland project had come to fruition, it probably wouldn’t have happened at all. Apple’s intent was to update the aging OS piecemeal, adding protected memory and preemptive multitasking, and, piece by piece, update the core OS libraries to better support these modern features. Eventually this would become sufficiently advanced that the “Gershwin” OS would be “fully modern,” whatever this meant (even Apple wasn’t sure).

Feature creep and mismanagement resulted in the cancellation of Copland. Instead of developing a new OS from the existing one, Apple decided to purchase a modern OS and use that as the basis for its future operating system. This resulted in the purchase of NeXT, and NeXTstep went on to form the basis of Mac OS X.

NeXTstep was pretty radical in its day; it’s thanks to NeXTstep that OS X uses Objective-C and has an Objective-C library. Display Postscript in NeXTstep became Display PDF in OS X. NeXTstep had the same combination of Mach and BSD code that became MacOS X’s Darwin kernel. Obviously, this still left Apple with a lot of work to do; NeXTstep couldn’t run Mac apps, which was obviously a big problem for a MacOS successor, so Apple devised the “Classic” virtual machine to provide support for legacy applications. New applications would use the new Cocoa or Carbon APIs.

This approach—forced on it due to screwing up the Copland project—put Apple in a strong position. The new OS was free of many of the legacy constraints that the Copland approach would have caused; the clumsy old APIs were restricted to the Classic environment, and they didn’t form a part of the modern OS core. Although the new APIs were not entirely new—the Obj-C Cocoa API was based on the NeXTstep API, and Carbon was similar to the old MacOS API—they were cleaned up, allowing bad decisions of the past to be fixed.

[ufc-fb-comments url=""]

Latest Articles

Related Articles