Monday, January 23, 2006

BBEdit's perspectives on OS X 10.4 and MacTel

This post was a draft last year, but I think the story is interesting enough that it's worth republishing now that MacTel stuff is out. Emphases mine. Mac developers are a determined lot.
Developer::Pipelines | A Mac Text Editor Migrates to Intel

First, with Mac OS X 10.4, the OS itself was no longer a moving target. In earlier releases of the OS, its underlying architecture—notably the kernel APIs—was in a state of flux and subject to change. And change these low-level APIs they did, as Apple refined the kernel and underlying frameworks to make improvements. As a consequence, each new release of the OS left broken applications in its wake, an unpleasant outcome that dissuaded many Mac users from switching to Mac OS X...

In 10.4, the kernel programming interfaces (KPIs) have been frozen, and a versioning mechanism lets drivers and other low-level software handle those situations when the KPIs are changed to support new features. The result is an underlying infrastructure for the OS that's stable and consistent across different platforms. This, in turn, makes the porting process manageable.

According to the BBEdit engineers, Mac OS X 10.4 does a good job at hiding the hardware details, while still providing low-level services (such as disk I/O). In addition, its APIs are mostly platform neutral, which means no special code is required to counter side-effects when invoking the APIs on each platform. Put another way, the code to call an API is identical for both platforms, and the results of the API call are identical; no glue code is necessary.

... BBEdit 8.0, which was released in late 2004, uses the full Unicode conversion and rendering features of Mac OS X. These APIs automatically read a file's encoding scheme and manage the data transfers and file I/O appropriately. By choosing to use Unicode early on, the Bare Bones Software engineers not only expanded the number of languages the editor could support, but also avoided what could have been a serious problem with reading and writing files when migrating to the x86-based Mac platform.

Another key revision made in BBEdit 8.0's code design was that the application began using Mac OS X's Preference Services API, rather than storing binary data in a custom resource. This modification also side-stepped the Endian problem...

No comments: