Technote 1151

Creating NetBoot Server-Friendly Applications


CONTENTS

Introduction

Discussion

Summary

Downloadables

This technote describes some guidelines that application developers should follow to ensure that their applications are able to work correctly in a NetBoot environment.

Introduction


In January 1999, Apple introduced Mac OS X Server and its NetBoot services which enable Power Macintosh and PowerBook computers to log in and boot directly from a server rather than a local hard drive. Since all NetBoot computers boot from a single system, NetBoot computers require no local configuration. Thus, setting up a network of Mac systems is fast and simple, and updating the server once automatically updates all Macs on the network. At the same time, NetBoot protects the System Folder and applications from corruption and includes management tools for setting system policies and controlling user access. NetBoot offers another important advantage: users can securely access their own applications, documents, and personal desktop preferences from any Mac on the network.

Because all software (including the operating system and the applications) in a NetBoot environment will reside and be launched from a server, applications must pay closer attention to how they launch and work with the System Folder. Software developers are urged to adapt their applications as necessary to the following guidelines in order for applications to run and behave correctly in this environment.


Back to top

Discussion

The key to allowing your application to be "NetBoot Server-friendly" is to keep in mind that NetBoot clients will share System and Application folders loaded from the server. If you've written your application to properly use the Preferences folder and not assume that the application is launched from a writeable volume, your application will probably work fine.

Allow launching from a locked volume


To use disk space effectively, applications may be stored on a shared locked volume. Your application should be able to launch and run from a locked volume and store the user's personal information, such as preferences and data, on a different volume. At the minimum, check for and deal gracefully with the situation when the application file is locked.

Allow multiple users to access the application simultaneously


In order to conserve disk space on the server, applications may be stored on a common/shared volume on the server.

You can check whether your application can be simultaneously launched by multiple users by installing it on an standard AppleShare server and launching your application across the network from two client computers.

Store all application preferences within System Folder:Preferences


Because a single "station" will be used by different people, each user's preferences will be retained and restored when she logs back in, either at the same machine or at a new one, via the Macintosh Manager software. In order for your application's user preferences to be retained, be sure to save them in the Preferences folder within the System Folder. Saving preferences here makes it much easier to administer the server, and allows the preferences to follow the user regardless of which Macintosh on the network she uses.

Allow users to specify the location of personal data


Since multiple users will be using the same application, it is important for applications allow the user to specify the location of their personalized documents and databases. Don't hardcode your application to store the user data in the same location as the application. This is particularly important for E-mail applications.

Avoid storing the serial number in the application


Again, because multiple users may be using the same application, don't store the serial number in the application. If serialization of your application is necessary or desired, store the serial number within the Preferences folder so that different users can have "different" serial numbers while still using the same master application file.

Don't assume that FindFolder( kSystemDisk, etc.) will return -1 for the refNum.


Always use both the vRefNum and dirID returned by FindFolder to locate important folders.

Put application-specific files for the System Folder in the "Application Support" folder when you can.


If your application has files that get stored in the System Folder, like dictionaries, and they don't need to be stored in the "Extensions" folder, they should be placed in the "Application Support" folder.

Shared Libraries don't need to be in the Extensions folder; they can be in the folder with the application itself.


It's not necessary to copy a shared library used exclusively by one application into the Extensions folder; just leave it in the folder with the application.



Back to top

Summary

Enabling your application to function smoothly in a NetBoot Server environment is not that difficult. In fact, most applications today already do things properly and are "NetBoot Server-friendly." The things to keep in mind are to ensure that you can launch your application from a locked volume and have it run on multiple clients at the same time, and be aware of how your application stores files, including those that go into the System Folder, using the "Preferences" and "Application Support" folders when possible.


Back to top

Further References


Back to top

Downloadables

Acrobat version of this Note (12K).


Back to top

Change History


To contact us, please use the Contact Us page.
Updated: 22-February-99

Technotes | Contents
Previous Technote | Next Technote