Packaging an application

An application that you create in PocketBuilder includes one or more of the following pieces:

To decide which of these pieces are required for your particular project, you need to know something about them.

The executable file

The executable file contains:

You can choose to put all of your objects in the executable file or to split your application into one executable file and one or more dynamic library (PKD) files that contain objects that are linked at runtime.

NoteAbout the Project painter You use the Project painter to create an executable version of your target and a resource file that you can deploy to PocketPC devices, Smartphone devices, emulators, or the desktop. The Project painter allows you to streamline the generation of the files your target needs and to rebuild the target easily after you make changes to target objects. For how to create a new project using the Project painter, see “Creating a project”.

Dynamic libraries

You can deliver some (or even all) of the objects in your application in one or more dynamic libraries. Like executable files, dynamic libraries contain only compiled versions of objects, and they can include resources.

You can put any resources needed by a PKD’s objects in the PKD file itself, so that the dynamic library is a self-contained unit that can easily be reused. If performance is your main concern, however, be aware that resources are loaded faster at runtime when they are included in the executable file.

Table 27-1 next lists several reasons why you might want to use dynamic libraries.

Table 27-1: Reasons to use dynamic libraries

Reason

Details

Modularity

They let you break up your application into smaller, more modular files that are easier to manage.

Maintainability

They enable you to deliver application components separately. To provide users with a bug fix, you can often give them the particular dynamic library that was affected.

Reusability

They make it possible for multiple applications to reuse the same components, because dynamic libraries can be shared among applications as well as among users.

Flexibility

They enable you to provide your application with objects that it references only dynamically at runtime (such as a window object referenced through a string variable). You cannot put such objects in your executable file (unless they are DataWindow objects).

Efficiency

They can help a large application use memory efficiently because:

  • PocketBuilder does not load an entire dynamic library into memory at once. Instead, it loads individual objects from the dynamic library when needed.

  • Your executable file can remain small, making it faster to load and less obtrusive.

For more information about building dynamic libraries, see “Using dynamic libraries”.

Resources

Window, user, and DataWindow objects in a PocketBuilder application can use BMP, GIF, and ICO files as resources. These resources can be delivered with the application in several ways. For more information, see “Distributing resources”.