Using Assistants to handle more complex "codes"

The preceding sections deal with handling simple codes, decodes and prompting (things such as Currencies, Companies, Countries, etc.). This approach is okay when working with small sets of relatively static information.

However in most commercial applications there are "codes" such as Customer Numbers, Order Numbers, Policy Numbers, Product Numbers.

These types of codes have several important characteristics:

An interesting way to handle them involves the generic concept of an "Assistant". 

An "Assistant" hangs around in a small window (or windows) ready to pop up and offer specialized assistance to the end-user at the appropriate time (somewhat like the one used in MS-Office applications).

The traditional F4=Prompt option used in many 5250 style applications is an example of a very specialized type of Assistant (i.e.: it pops up at the appropriate time and assistants the end-user to identify the "code" that they want to use.

However, in the Windows GUI word the concept of an assistant can be significantly extended to offer substantially more functionality to the end-user.

For example in a large order processing application there might be "assistants" for Customers, Products and Orders … which are the three predominant business objects within the application.      

In the Framework the assistant(s) could be made to appear to end-users in several ways: