Using Assistants to handle more complex codes

Visual LANSA Framework

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:

  • The information associated with them is often quite dynamic.
  • They are used all over the application and cross business objects. For example, when creating a new Order references to the "codes" for Customers and Products are heavily used.
  • They are used all day every day by the end-users. Using these "codes" and moving around within them is at the core of the application's functionality.

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: