Thursday, 8 October 2009

Creator Codes and Modern File Browsing

John Gruber recently commented on Snow Leopard's lack of creator codes, or any replacement functionality. For the uninitiated, creator codes were the mechanism by which the classic MacOS handled double clicking on a file: the file was always opened by the application that created it. On other OS's, all JPEG files had to be opened by the same program. On classic MacOS, those that were created in Photoshop would open in Photoshop, and those created in GraphicConverter would open in that by default, and so forth.

MacOS X apps didn't tend to set creator codes by default. Some apps ported from MacOS 9 such as Photoshop would set them, but the majority did not. However, if a creator code was set, the system would honour it and open the correct app… until Snow Leopard. In Snow Leopard, the only way to make a file open with a different app to the default is to set it manually in the Get Info window. Crucially, an application cannot set that while saving, the user has to go and do it. 

I'm not going to comment on the state of play here, but rather on a point Gruber made:
Take a step back and consider that the term creator code itself shows just how different things are today. When the Mac was created, nearly all documents were proprietary binary file formats. The only app that could read MacWrite files was MacWrite, etc. Even when apps could read other apps’ file formats, they typically did so only through an import/export process.
He goes on to say that now we work with many different types of open file format in many apps, so the question "Which app should open this file?" is not always answered with "The app that created it".

Thinking back to when I first switched to Mac, back in 1993 (the System 7 days), I don't think the proportion of open file types was too much lower. We saved graphics as TIFF, vector stuff as PICT, text files as plain text, databases as comma separated. Granted, I had loads of ClarisWorks or Quark files, but they're comparable to all the iWork and inDesign files I have today, which are also in proprietary formats. I don't think that's it.

You may have read John Siracusa's laments about the demise of the spatial Finder. To sum up, a spatial file browser has one window per folder, and opens each folder in a new window. That window appears in the same place as it did last time you opened that folder. To the user, the window (size/position/layout) is the folder. We've now switched to a browser style file manager, where a window is just a helpful device to pick files, and you move them around with impunity, knowing that your settings are not stored anywhere. Think about iTunes and iPhoto: browser based media managers. Even opening an image in Preview presents you with a window with a sidebar for putting multiple images in a single window. Compare to opening one in SimpleText back in the day, where the picture had its own window with nothing else in it.

In the user's terms, it used to be that the window was the document. The two were equivalent. Now, in a trend that started with the World Wide Web and has now moved into the rest of the operating system, a window is merely a container for one or more documents. That's a fundamental change in the user's concept of what a window is.

How does this relate to creator codes? Well, if the user equates a document and its window, then it is completely natural to open a document in the same app. Anything else would violate that mental model. Sure, a file could be manually opened by dragging it onto another app's icon, but that separate action was considered to be a "convert" action. Just opening a document put it exactly as you left it last time, with window position saved, the same editing tools available, and other such things.

With the trend to browser style windows, there's no longer that expectation. Double clicking a file no longer means restore the state of this document so I can work with it. And that's why it's no longer reasonable to say that the best app to open a document is the one that created it.