Find out why Mac OS X has two built in file containers


When Apple moved to Mac OS X, it wanted to avoid the use of resource forks while still retaining the ability to make complex items appear as single icons. Instead of creating a new container technology, Apple simply modified an existing file system container, the common folder. A bundle is nothing more than a normal folder that is used to group related resources in one location. Packages take this concept a step further: A bundle with the bundle file attribute set appears as single opaque item in the Finder and is known as a package.

This package-based approach allows software developers to easily organize all the resources needed for a complicated product into a single package, while simultaneously making it harder for normal users to interfere with the resources. Where a user sees only a single icon in the Finder representing an application, in reality it is a folder potentially filled with thousands of resources. If you encounter a folder with a name that appears to be a file extension, you are probably looking at a bundle. For example, /System/Library/Frameworks/Cocoa.framework/ is a bundle that contains multiple items related to that software, but it appears as a normal folder. The contents of a package, on the other hand, are revealed only when you right-click (or Control-click) the package and choose Show Package Contents from the shortcut menu.

From a deployment perspective, the use of bundles and packages in Mac OS X presents another dilemma. On the one hand, bundles and packages simplify deployment because otherwise complex items can be managed as single items. Thus, you can copy an entire application and all its accompanying resources by simply copying a single icon. On the other hand, bundles and packages are treated as normal folders by third-party systems and transfer mechanisms, which in many cases means that the bundle-bit attribute will be stripped away, and the once-opaque package will appear as a folder in the Finder. This will prevent the package from opening as intended. Further, it confuses users because they will see a folder instead of an application icon, which can also lead to accidental partial copiesif they don’t know to copy all the items.

Using File Containers

To work around these several show-stopping issues that prevent you from successfully using many third-party tools to store or transfer items with Mac-specific file elements, you can place items that you intend to deploy inside file containers. Containers are special files that can encapsulate other files, folders, or even entire file systems. From the outside, a container file appears as a simple monolithic data file that is easily stored and transferred via any method. The contents of the container file, however, can be as varied and complicated as your deployment requires. Container file formats can have other features that make them extremely attractive for deployment use. For example, most container file formats use some form of data compression. Throughout this article you will be introduced to other benefits of using file containers for deployment.

Mac OS X has two built-in file container technologies that allow you to safely deploy items containing file attributes, resource forks, bundles, and packages:

- Archive file This container file type allows you to store individual or multiple files and folders in a single compressed monolithic file.

- Disk image This container file type allows you to store the contents of an entire file system in a single monolithic file. There are many disk image variations and options.

The container files created by these technologies can be safely stored and transferred using nearly any deployment mechanism.

Choosing the Format for Deploying Items

With the archive and disk image container formats, you have a total of three possible formats for deploying items: traditional drag and drop, archived files, and disk images. Consider the following pros and cons before choosing a deployment format:

Drag-and-Drop Deployment

Pros:

- Doesn’t require any encoding or decoding.

- Doesn’t require any special tools on any system.- Simple for inexperienced users.

Cons:

- Mac OS X file elements may not be preserved if storing or transporting using thirdparty mechanisms.

- Multiple items may not be transferred properly when using certain third-party mechanisms, as related items may become separated and lost during the transfer.

- No default file checksums to verify content.

- No default compression, thus no storage or bandwidth savings.

- No default encryption to secure content.

Legal Disclaimer

Our website is not responsible for the information contained by this article. Webworldarticles.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.


This article was sent to us by: Kyle Ferguson at 07212010

Related Articles

1. Optimizing NetBoot Performance
The NetBoot service, and network-based system deployment in general, is among the most demanding services you can subject your network and servers to. Therefore, before s...

2. Mac OS X users manage their authorization rights
Even if you don’t want to enforce strict usage policies, you will still create accounts on Mac OS X for your users. The choices you make regarding user account types...

3. How to create simple NetBoot images
Many clients can read from the same NetBoot image, but when a client needs to write anything (such as print spools, browser caches, and other temporary files) back to its ...

4. Enabling ARD Remote Management
Apple Remote Desktop (ARD) 3 is the remote control, management, reporting, and deployment tool for Mac OS X systems. Every Mac OS X v10.5 system includes the client-side ...

5. Mac OS X file attributes and permissions
Mac OS X uses a unique file system, the Mac OS Extended format, that provides both perceived simplicity and enhanced metadata attributes. These file system features are r...

6. Printers in Snow Leopard and Gutenprint
Printers come in varying shapes, sizes, and configurations. As the primary output device on your computer, the printer becomes an important tool for converting the digital...

7. The NetBoot service explained in detail
The NetBoot service is most commonly used to provide a temporary operating system. In this article you will learn how to further accelerate the system deployment process b...

8. How to create ZIP archives in Mac OS X
Pros: Mac OS X file elements are retained if encoded and decoded using the correct Mac OS X tools. Multiple items contained in a single file tha...