Apple's Bundles
Monday, January 9, 2006 at 3:03PM On the eve of The Steve's keynote at MacWorld, Apple is getting a lot of buzz around the Intertron. Today at the office I was discussing an application with Nathan and I advised him to simply copy Foo.app to his other machine. I commented that such action should work flawlessly, as that is the whole point of Bundles. This drew a hiss from a non-Apple wielding coworker. The reply smashed on the bundle for 'hiding' things from the user and being a good idea for 'morons'.
I agree. The bundle is great for morons and does hide things from the user. But I think those are all necessary ideas when writing applications for consumers.
Myself and many of my hacker friends all got our start on Linux. Hand compiling everything does not scare us. As a matter of fact, we think it's fun. Well, I used to. Then I decided I no longer needed to hand-hold the compilation and install of every single byte so that I could control all of my computer's actions. Gentoo is great, but I do really want to wait 2 days to emerge world when I could use Debian and apt-get foo? Can I just live with the fact that it wants to install 2 or 3 libraries that I don't really need?
The Application Bundle is one of my favorite parts of OS X. For those that aren't familiar, the Bundle is actually a directory that contains all the doodads that an application needs to function. They are presented to the user as opaque files that you simply double-click on. Graphics, localization, sounds, UI files (nibs), plugins, and libraries can all be included in them so that user need only download Foo.app and double click on it to use you application. No in- or un-installers necessary. If they don't want to use it anymore, they throw it away.
Standard libraries and system resources are installed in the normal system locations. If you want to distribute libfancypants with your app, there is no need to demand your users either install from source, find a package, or install it in /usr/local and risk it being overwritten. You simply include it in your bundle! The user no longer has to deal with the implications of one app needing version 1.1 of libfancypants while another demands 1.2!
I am well aware of the trade offs here. The first that comes to mind is lack of reuse. If everyone is distributing libfancypants in their bundles then we are wasting disk space. The second is not knowing what the application is installing, since it's all hidden.
I have one answer to all the concerns I can imagine: The most expensive resource a user can spend is time. If I've got libfancypants installed in 12 different apps and it wastes 25MB then I am more than happy to allow that space to be wasted. It is much more useful to me that all my applications work properly and don't sent me into a fit of rage when an app suddenly stops functioning because some smartass (likely me) 'upgraded' something and broke dependencies.
Bundles save me time. Universal Binaries that will become a part of all our lives any month now are just another cool benefit. Binaries for both PPC and Intel are included so that the end-user doesn't need to know the difference.
I don't want to see this adopted by Linux, mind you. The demographic there is much different than your average OS X user. I think the thing that separates your average OS X hacker type from your average Linux one is the decision (perhaps not conscious) that they just aren't that worried about those little details. Some would liken this to giving up and using Windows. People who say that haven't used OS X enough to see that you it will let you figure things out when you need to. All the tools are there, they are just thoughtfully stowed until necessary, rather than sitting out in the open with their sharp, rusty edges.
UPDATE: I just thought of one other thing -- Security! This concept allows many applications to be installed into the User's home directory and does not require permissions outside of what they already have. Bonus!
Hardware,
Linux,
MacOS,
Operating Systems,
Windows 
Reader Comments (1)
Yes, bundles are wonderful. I don't know why I didn't think of dragging the app over in the first place. I knew it could be done. I guess I am still a little traumatized from the days I had to work on Windows.
It's still hard to grasp how amazing Macs are. Somedays I forget how incredibly easy they are. It's hard to get used to not having all kinds of files spewed into multiple directories.
*hugs my Mac*