A
RESOURCE entry, or simply
resource, stores information about a set of classes. This information controls the classes
that can be instantiated by a frame when that frame is initialized. Therefore, when
you browse, edit, or execute a frame, it must be able to access the RESOURCE entry
that was used when the frame was created.
SAS/AF software also uses resources to load classes efficiently. When a resource is loaded
with a frame, SAS performs a single catalog
I/O operation to load all appropriate
class information into memory. If you were to instantiate each class at run time using
separate LOADCLASS or _NEW_ functions, SAS would perform a catalog
I/O operation for
every class.
The
SAS/AF classes are stored in sashelp.fsp.AFComponents.resource
,
and the SAS/AF legacy classes
are stored in sashelp.fsp.build.resource
.
Organizing and manipulating
resources and the classes that they contain is an important part of
project management. You can create custom RESOURCE entries to
-
make your components available
for use in a specific project or application
-
make your components available
to specific groups of developers
-
arrange related classes in a manner
that makes sense for your needs
-
reduce the number of classes that
a frame is required to load by removing classes that you know are
not needed
Multiple resources help you maintain and organize class libraries for development
in SAS/AF software. For example, you could use the RESOURCE entry containing the standard classes
provided by SAS (sashelp.fsp.AFComponents.resource
), the resource containing SAS legacy classes (sashelp.fsp.build.resource
),
a resource entry containing classes that were developed for a particular
project, and a resource containing classes that you are developing.
When you are ready to deploy the components, however, you could create
a single resource that contains only those classes used by the application.
You can use the Resource Editor to create, organize, and manipulate resources, as
well as the classes that the resources contain. The Resource Editor is invoked when
you open an existing RESOURCE entry or when you create a new RESOURCE entry.
You can also use the Resource Editor to specify which classes in a resource you want
to display when the resource is displayed in the Components window. You
can select a class and toggle its display status by selecting the
Toggle
Display Status check box. Although the resource should
contain all classes that the application will use, only those components
that can be dropped onto a frame should be set to display. For more
information about resources and the Components window, see
Associating Resources with FRAME Entries.
For complete information
about working with the Resource Editor, see the
SAS/AF online Help.