Brett Martensen is a Senior Systems Consultant with SRI Strategic Resources, Inc. He specializes in tools and techniques, including CASE, prototyping and JAD, to develop database applications. Areas such as entity relationship data modeling are his forte. He has a M.Sc. in Computer Science (1976) from Queen's University (Kingston, Ontario).
When developing a prototype, one is faced with reaching a maximum level of functionality across the maximum scope of the application, but within a minimum time frame. Two productivity tools help reach these conflicting goals: the CASE (Computer Aided Software Engineering) tool, which is the specification engine, and a DBMS (DataBase Management System), which is the application engine.
I recently participated with a team to develop a prototype system for Canada Post Corporation. This prototype had to be robust enough to be used across the country, at a number of different user sites during a three-month trial. Thus, it had to be more functionally complete than would normally be expected of a prototype.
Background
A prototype is a miniature system which approximates the final system but provides only a subset of the application's scope and functionality. As such, a prototype comes with all the benefits associated with modeling. A model is easier and certainly less expensive to change than a real system.Prototyping permits developers to elicit, model and then capture user requirements for a system. Like the buildings on a movie set, a prototype must look real even though it is only a facade. On a movie set, certain buildings have rooms, some of which are furnished. Similarly some features in a prototype are fully implemented, while others remain as images only. There are four levels of functionality used when describing a prototype:
Level Functionality
one Screens only two Screens with field entry and edit, some controllable flow. three Level two plus Create, Retrieve, Update and Delete of data and Menu linking screens together. four Level three plus Integrity checking, a correctly structured database and some application specific algorithms working.Most prototypes end up as a mixture of these levels applied to different parts of the application.The prototype developer must be able to respecify the data model and quickly regenerate the database structure because a prototype is not a static model; it goes through a number of iterations.
A typical prototype development iteration consists of analyzing the requirements (read documentation, conduct interviews); specifying (data model, functional specifications); designing (display layout, reports); developing (program, fill in tables of data); demonstrating and using; and finally, reviewing the design with users using Joint Application Design (JAD) techniques.
The JAD is a meeting in which a consensus can be reached amongst the user population as to the system requirements. The results of the JAD provide the requirements for the start of the next iteration.
Theoretically, this cycle should be repeated three times during a prototyping project. Ideally, each iteration of the prototype progresses closer to the specification for the final system. A rule of thumb is that sixty percent of the remaining requirements are captured in each cycle. After the second cycle, the system should be 84 percent correct and after the third cycle, 93+ percent correct (rather like golf where each shot gets you closer to the hole). At some point, however, diminishing returns make further iterations pointless.
The Canada Post Prototype
The Canada Post Corporation prototype was developed using E-R Designer from Chen and Associates, a CASE tool for data modeling to specify the data model; and ZIM from Sterling Software, Zanthe Systems Division, a powerful 4GL DBMS to develop the prototype.ZIM is a natural choice for prototyping projects. It directly implements an Entity-Relationship data model which it keeps in an Active and Integrated Data Dictionary. An entity-relationship database structure allows transferring the conceptual data model produced in the specification stage directly into the database data dictionary. An Active data dictionary is important because the programs can access all the metadata. An Integrated data dictionary stores display specification information as well as the database structure. An advantage of choosing E-R Designer is that the data model can be exported and used to create the ZIM database description without rekeyboarding.
ZIM also runs code either in interpreted or compiled mode. Since prototype performance is not a consideration, the interpreted mode is used. This mode has a macro substitution capability which allows names of entities, relationships, displays, and ZIM routines to be substituted in the programs and resolved at run time. The data dictionary stores all these names, as well as segments of ZIM code for macro substitution. Thus, the data dictionary becomes the repository of the prototype specifications, data, displays and programs.
Other tools such as WordPerfect and internally developed ZIM utilities increased productivity further. We used WordPerfect's line draw facility to draw boxes and rapidly design the displays. Then below each display, the position of all the fields and their prompts were specified. A short ZIM program analyzed this information and created the display form specifications in the ZIM data dictionary.
One of ZIM's most useful prototyping features is the way in which display forms relate to entities in the database. If a field on a display form is given the same name as a field in an entity, then the ZIM command CHANGE Form FROM EntitySet fills in the fields of the current form from the fields of the same name in the current record of the entity set. Similarly, ADD EntitySet FROM Form creates a new record in the entity set from the data entered on the form.
This functional relationship between display form fields and entity set fields is re-inforced by maintaining the metadata in the data dictionary for each entity set field. (See Table 1.)
The other ZIM database information normally needed length, decimals, indexed and required are also stored in the data dictionary. Other useful attributes, such as default value, data mask and validation rules, exist for the fields in the display form.
We developed a number of generic, table-driven modules for the prototype's functional side. The concept of table-driven software is extremely powerful: by simply modifying the data in the tables, the developer can rapidly change the way in which a module functions, what it operates on and how it appears to the user. For example, we developed a menu program which was totally table driven. By changing the tables, the routines executed when the menu items were chosen, the menu structure and menu functions were modifiable.
With the table-driven approach, code can be reused. For example, only one modify routine can be applied to any entity set, and an enhancement made to a routine is universally available in the prototype system. Thus, the only nonreusable code is the application-specific algorithms, which are all linked in via the program name attribute attached to each field.
For the Canada Post Corporation prototype, generic table-driven routines were developed for
Menu Level 1 and 2 screens (slide show) Entityset Lister, which provided access to the functions of: Sort list Pick record Print list Find record Add record Modify record Delete record HelpThis list doesn't include "Reporting" since programming a general-purpose reporting module is difficult to perform using the table-driven approach. The Print list routine provided simple reports. More complex reports which needed to were hand-coded in ZIM. Reports that did not need to function were presented as Level one screens.There exist both a spreadsheet and business graphics package which take data from a ZIM database and allow for its manipulation, analysis and presentation. Given that the Canada Post Corporation application involved large quantities of statistical information, both these packages were linked into the prototype to assist the user in performing ad hoc inquiries and analysis of the data. These two packages were especially useful for the design and creation of new and existing reports to elicit user feedback. They added substantial functionality to the prototype with very little effort.
The modules of the prototype were linked together in the calling sequence as shown in Figure 1.
This prototype environment can be easily extended as new generic routines are developed. A table-driven ad hoc inquiry function could be built and linked in via the menu.
Since the purpose of a prototype is to develop a working model with frequent feedback from the user population, it is appropriate to add a feature which captures users' ideas while they are fresh in their minds. Since "help" was available throughout the prototype, a suggestion box feature was added to the "help" module which allowed for on-line and in-context idea capturing. These ideas were collected, printed and analyzed during the JAD sessions. User feedback was very general on the first iteration: "We also need to be able to store information about our services," for example. In subsequent iterations, suggestions became more specific: "Use the word 'item' rather than 'product'."
The final goods delivered from a prototyping project consist of the working prototype and a large quantity of documentation. The documentation covers the working prototype and user requirements that were not implemented in the prototype, such as complicated application-specific algorithms or feedback from the final JAD.
Conclusion
The combined use of CASE tools and 4GLs allows for greater productivity in prototype development. Using generic table-driven modules results in less software development. As a result, the workload shifts to the specification and analysis tasks. As in so many situations where technology is applied to the automation of the simpler tasks, fewer people are required, but the ones remaining need more expertise. The skills of business and functional analysis, data modeling, and design, become more important than programming.
Reference
Application Prototyping: A Requirements Definition Strategy for the 80's, Bernard H. Boar, Wiley-Interscience Publication, John Wiley & Sons, New York, 1984.
Figure 2