Organizing Workspaces within Modules
Once you have organized the module hierarchy, you must determine how you are going to organize items on workspaces within each module, as well as how you are going to organize workspaces into a hierarchy. No single "right" way exists to organize a module, and your application might suggest some natural organization. These headings provide a set of guidelines for organizing workspaces within modules.
Guidelines for Organizing Items on Workspaces
To organize items on workspaces, consider these trade-offs:
Organize Workspaces According to the Needs of the Application
Just as you can organize modules along functional or structural boundaries, you can organize workspaces within modules along those same boundaries. This table describes some of the features of each type of workspace organization:
A structural organization:
A functional organization:
There is no right way to organize a workspace; you must consider each of these trade-offs when determining how to organize items.
Keep Methods Together with Their Class Definition
One general rule of thumb that you should try to follow, which supports a structural organization, is to keep methods together with their class definitions.
This guideline is not always possible to follow, in particular, if you have public classes with private methods, as the following guideline explains.
Separate Public and Private Items
Follow these guidelines to determine how to organize public and private knowledge on workspaces:
Presenting Workspaces Visually
To present a consistent development environment, consider using these visual aids:
For example, this figure shows a public workspace that contains several API procedures, which have been reduced in size:
Creating a Workspace Hierarchy
When you create workspaces for a module, follow these guidelines:
For details about these guidelines, see Guidelines for Creating Workspace Hierarchies.
Caution: Never restrict access to the Module-assignment attribute of top-level workspaces. Other modules have to reference it.
For example, this figure shows the top-level workspace and the Get Workspace menu for the GFR module, where the top-level workspace is a palette:
Providing Navigation Between Workspaces
To help users navigate between workspaces, follow these guidelines:
For example, this figure shows a navigation dialog for accessing public items:
For details about each of these guidelines, see Guidelines for Creating Workspace Hierarchies.
Copyright © 1997 Gensym Corporation, Inc.