Home > Articles > Operating Systems, Server

  • Print
  • + Share This

Bundles

In Mac OS, each application was a single file. This file would contain two forks; the data fork contained the actual binary, and the resource fork contained all of the extra resources needed. The concept of forks is very similar to that of directories; they’re both ways of presenting hierarchies in a filesystem. The NeXT team decided that they were too similar, and dropped forks.

Instead of forks, NeXT made extensive use of bundles, which are directories with a well-defined structure. When viewed in a graphical file browser, bundles are conventionally shown as files, rather than directories. A NeXT application is a bundle (directory) with the extension .app. This contains the binary, any nonstandard libraries it needs, and any other resources. Double-clicking the bundle in the file browser launches it.

Bundles are used extensively in an OpenStep system. The standard format for rich text is RTFD, which is a bundle containing an RTF document and any other objects—typically graphics—contained within. Another innovation that used bundles was the concept of the framework. A framework is a bundle containing a library and a set of header files. Frameworks also support versioning internally, as well as multiple architectures. Since they encapsulate both the interface and the implementation in a single place, they’re very easy to install, use, and uninstall.

As an aside, installing software on any OpenStep system, including GNUstep, usually involves little more than dragging the .app bundle to the correct place, while uninstalling is simply a matter of deleting it. In a heterogeneous environment, it’s possible to share applications on a file server, since the bundles support platform-specific binaries and resources. You can even create your own .app bundle containing versions of your code built with OS X, GNUstep/Linux, GNUstep/FreeBSD, GNUstep/Solaris (SPARC) or GNUstep/Solaris (x86). Users just double-click the bundle to run it (or use the openapp command-line tool), without needing any awareness of the other platforms’ code.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.