DBMS, December 1996
DBMS Online: Desktop DBMS By Tom Spitzer

Using Vision Builder

Modeling and Application-Generation Tool Turns Analysts into Developers.

Two months ago I discussed Oracle's Designer/2000 application modeling tools in these pages. At that time I was also learning about a product called Vision Builder from Vision Software, a young development tools company in Oakland, Calif. Vision Builder is a modeling tool that automates the building of client/server applications with Visual Basic clients and Microsoft SQL Server or Oracle databases. Vision Software also offers the StoryBoard product, which I discussed in my August roundup of Visual Basic tools. StoryBoard turns prototype Visual Basic forms into slide shows that can serve as the focus for JAD sessions, and it provides a vehicle for writing both system-level and user-level documentation about Visual Basic forms.

I found that Designer/2000 presented a collection of modeling tools that worked against a common repository and supported a soup-to-nuts analysis and design methodology, including business process reengineering, logical data modeling, functional decomposition, data-flow diagramming, CRUD (create, retrieve, update, and delete) matrices, and application component design tasks. Designer/2000 is a powerful toolset for teams building large systems or reengineering mainframe systems. Although centered on the Oracle platform, Designer/2000's support for Visual Basic and Web deployment enables it to satisfy a wide range of requirements from a single model repository. Vision Builder is a much more focused product, better suited to the needs of developers coming from the PC/LAN database world into the realm of client/server and distributed database applications.

In fact, I encountered exactly that situation at the U.S. Air Force's Global Positioning System (GPS) Joint Program Office (JPO). There, Daniel Winton employed Vision Builder in conjunction with Visual Basic and Oracle to develop and deploy an application that tracks equipment and usage issues pertaining to the JPO's system. Based on the success of that application, Winton is initiating development of a new cost-estimating and reporting system for the JPO, which should be close to completion by the time this issue of DBMS is in your hands. According to Winton, that speed would not be the case if he had to hand-code the application.

Vision Builder Architecture

Vision Builder is built around two engines. One engine translates business rules expressed as assertions about how the values of data elements should be derived and validated into server-side trigger code. The other engine applies an extensive library of templates to the data structure to generate a Visual Basic application. This architecture steers the developer through the process of formulating rules that apply to tables and their columns, irrespective of the applications in which they participate. In fact, it facilitates the construction of multiple applications that share a common schema.

The client side of these generated applications can request datasets and initiate processes to add, update, or delete data. All of the insert, update, or delete logic is deployed and executed on the server. As a result, these applications are fairly server-intensive, which suits users who are deploying them on a large number of desktops. One such user is Kumaravel Chinnappan, senior manager in the Application Software Group for HCL America Inc., a Sunnyvale, Calif. company whose 7400 employees provide IS and application development services to clients around the world.

HCL has used Vision Builder to develop an asset-tracking system that manages over 1000 items at 11 sites. According to Chinnappan, previous application architectures did not suit the distributed nature of HCL's business, and they often necessitated computer upgrades whenever his group made functional enhancements to its management applications. With the thin client architecture that Vision Builder generates, adding additional application components does not increase client-side resource requirements. To extend the scope of applications, the number of users accessing the applications, or the number of rules the application enforces, the organization simply upgrades its server.

Chinnappan recognizes the trend toward using the World Wide Web as the client-side deployment vehicle for distributed database applications such as the ones he is developing. Although Vision Builder 1.0 does not explicitly support the generation of Web-based clients, Chinnappan and I expect that future versions will do so -- particularly with the imminent introduction of a version of Visual Basic that we anticipate will be much more Web-oriented than the current version 4.0. (Editor's note : Vision Software plans to release a new version of Vision Builder in the fourth quarter of 1996, and it will add support for Intranet clients.) In the meantime, Chinnappan's group is working on converting the application forms generated by Vision Builder into ActiveX controls that can run within the Web browser context.

Attaining Proficiency with Model-Based Development

I suspect that developers will go through three phases when learning how to make the most productive use of this tool. In the first phase, you gain fluency with the dialogs used to specify rules, generate server objects, and define client-side application components. When you master these tasks, you can foresee exactly which server objects and client components Vision Builder will generate in response to your specifications. You'll go through this learning process whenever you work with application-generation tools. At first, the phenomenon of having an application generated from your specifications seems like magic; the first thing I do is examine all of the forms, code modules, and server objects that were generated and try to understand how they relate to my model. Once you understand these connections, you are in a position to begin modifying the generated components by choosing specification options other than the defaults and, in Vision Builder's case, embedding your own hand-written code in business rules. In the third phase, you learn how the templates work and become sufficiently fluent with the templates and the template language syntax. This familiarity empowers you to customize templates to gain fine control over the structure of the generated application components.

Daniel Winton at the Air Force GPS JPO is just entering the second phase. The people at Vision Software say that this rate of progress is typical; the product has only been on the market since April 1996. With no client/server experience and limited experience developing data-oriented applications in Visual Basic, Winton embarked on the project, relying on the tool to do the development work for him. His job has been to collect and formulate the application requirements in a fashion that lets the tool perform its job effectively. By enabling developers like Winton to create applications in which derivation and validation logic executes on the server without requiring them to learn server-side languages, Vision Builder significantly broadens the pool of developers who can work on such projects.

Although I suspect that developers with a lot of experience programming Visual Basic or RDBMS trigger code will resist turning these tasks over to machines, we should wise up. Code-generating machines such as Vision Builder are less likely to make mistakes than people are. They promote consistency, both by generating entire systems from common templates and by enabling implementation of larger projects by smaller teams. From management's standpoint, the machines support a greater investment in the analysis phase of development (rather than in the coding phase). In essence, we are turning the coding over to the developers at Vision Software, whom we are counting on to produce bug-free applications that scale effectively. If I run into a problem, at least I'll know where to go.

Defining Business Rules

Vision Builder keeps its repository of information about data structures, business rules, and application components in an Access database. This database yields several ways to start a Vision Builder application. You can create a database in Access and define table structures and relationships. When you open this .mdb file in Vision Builder, it will convert the .mdb file into a repository by adding repository tables to the database. You can use an external data modeling tool, such as Logic Works' ERwin or Asymetrix's InfoModeler, to define the structure of the database and have it generate an .mdb file, which you can then open as a Vision Builder repository. Finally, you can create an empty repository and use Vision Builder's reengineering manager to read schema information from your SQL Server or Oracle database into your Vision Builder repository. HCL started its project using ERwin but found that simply using the data design tools within Access was more productive; doing so reduced the number of steps involved in changing data structures.

In any case, I recommend having a copy of Access available, at least to make minor alterations to your structures, add index specifications, create relationships, and build predefined queries. Access stores queries as QueryDef objects, which represent SQL statements. Vision Builder is very good at automating the creation of multi-table forms based on QueryDefs. Working with Access in conjunction with Vision Builder and Visual Basic also provides a platform for querying and reporting on the repository itself. You will want to perform these procedures when applications become larger and more complex. All in all, I'm beginning to view Vision Builder as a high-powered upsizing tool for Access applications.

Once you have created a data model and built a Vision Builder repository, you can start asserting business rules. Business rules take the form of statements such as "Payment for an order is due one month after shipment," "Total price of an order is equal to the sum of the extended price of each line item plus freight and tax," "An item's unit of measure must be a valid unit of measure listed in the unit of measure table," and "A shipped but unpaid order may not be deleted but only purged after payment." The Vision Builder Business Rules Designer interface takes a little getting used to: It presents a set of tab pages, each of which has a different structure based on which tab is selected: Columns, Relationships, Constraints, Events, or Properties. The latter four tabs apply to tables, but choosing the first ("Columns") tab leads to a secondary set of tabs relevant to rules applying to columns. This overloading enables the Designer to collect both table-level and column-level rules within a common form. When one of the other table-level rules tabs is selected, the tab control disappears from the bottom half of the form.

The top portion of the Relationships page displays a tree view of the relationships in which the selected table participates. The bottom of the page presents a radio-button interface for selecting the referential-integrity rules applicable to the currently selected child table. The Constraints page lets you declare rules that determine whether an update to the selected table will be accepted or rejected. (See Figure 1.) You must assign a name to each constraint that you declare; I suggest that you formulate a naming convention for each type of named rule before you begin. You can either enter rules directly into the text box or use the rule expression builder to assemble a constraint formula for each condition. This formula evaluates functions based on either the existing or candidate values of multiple columns in the row being updated. The expression builder provides a graphical way to build a formula by selecting standard SQL operators, built-in or user-defined functions, or keywords that determine whether an insert, update, or delete operation is occurring. You can extend the list of available functions with functions or stored procedures that you write and register with the repository.

The Events tab page lets you define custom server-side logic. When you set up events, you depart from Vision Builder's standard declarative rules-based development paradigm and move into the realm of custom coding. Using this mechanism to manage your custom code provides significant organizational advantages. Vision Builder divides events into three categories: The first are hand-coded extensions to generate trigger code to perform functions such as generating custom sequences or executing logging functions. The second are events that trigger functions such as sending mail when the value of a specified column is beyond some threshold. The third are user-defined modification events that provide hooks for special processing in the generated application's user interface. Between the ability to include user-defined server-side functions and procedures in constraint expressions, and the ability to define several types of events, Vision Builder provides sufficient opportunities for customizing server-side logic. In the HCL America application already mentioned, Kumaravel Chinnappan used these capabilities to carry out special processing of assets based on the type of equipment and its location.

Returning to the Columns tab displays a grid listing all of the columns in the selected table. This grid also displays the derivation and validation rule and any caption that you assign to the column. A tab page displayed on the bottom half of the form lets you define each rule and enter notes to document usage of the column. Derivation rules can be one of several types, including Default, Sum, Count, and Parent Replication, the last of which copies the value of the corresponding column in the parent table. Validation defines either a condition expression or a lookup table that specifies the source of a drop-down list in the generated application. You can require a value or prevent user modification of the contents of a column. The Presentation tab lets you specify the label to be applied to the column on generated forms, an edit mask, a status bar message to display when the generated control based on the column being specified is active, and a custom template that overrides the default control for the column's data type. Setting up rules for all of the columns in your database is tedious, but it makes for a highly structured result.

Client-Side Application Design

You create application components by dragging tables and query definitions from the Vision Builder repository into the Application Designer window. (See Figure 2.) As you do, Vision Builder creates the specifications for forms that will represent those tables and query definitions, and it establishes links that determine how users will navigate through forms in the generated application. Having done this work, Vision Builder displays a box that represents the form in the Application Designer window. You can add recordsets to a form by dragging a table or query definition onto the form's box in the Application Designer window or by selecting the form and choosing the Add Table command from the right-mouse context menu. The Form Properties dialog provides a significant amount of control over the form's runtime behavior. The left side of the dialog displays a tree view of the recordsets that participate in the form.

The right side of the Form Properties dialog displays properties of the recordset that vary based on its position in the data hierarchy for the current form. Here you indicate whether to display the selected recordset, and if so, whether the form can be used for insert, update, and delete operations on the recordset. You can specify additional recordset query criteria using either hard-coded conditions or runtime parameters for child data sources. Finally, you can select the template to use for generating portions of the form that display recordsets, which lets you control whether the recordset is presented in a form or tabular display.

When you build an application, Vision Builder's client application-generation engine merges the specifications assigned in the Form Properties dialogs and in the presentation tab of the business rule designer with the forms and Basic modules in its template library. The result is a good starting point for a functional application, with a main menu that lets you select any of the application's top-level forms. The default behavior is for each form to start by presenting a query dialog in which users can qualify the recordset that will be returned by the server.

You can modify the generated application in a number of ways. Vision Builder is sensitive to the desire of many developers to "tweak" generated code; it supports various types of customization. For example, it supplies an Add-in that becomes part of the Visual Basic design environment and lets you add a column to the current recordset and open the Vision Builder Application Designer's Form Properties dialog within Visual Basic. Be careful: If you start modifying forms outside of the Vision Builder infrastructure, you lose the ability to preserve your changes and regenerate your application later. If you want tight control over the user interface, you should create your own template library. When you graduate to phase three of model-based development, you will be able create custom template libraries with your own code calling the Vision Builder API functions; I'm not there yet.

Graduation Day

I am ready to graduate to phase two with less than a week of experience using the tool under my belt. Although the dynamic layout of the forms within Vision Builder's dialogs continues to bother me, I now know what to expect and where to go to create various types of rules. My sense is that Vision Builder offers a very viable starting point for developing client/server applications with Visual Basic and either Oracle or Microsoft SQL Server. My biggest concern is how much control I will have over application performance in applications that must scale to relatively large data sets. For the smaller applications that I anticipate clients will want, I will gladly trade some control over the presentation and tuning of the application for the order-of-magnitude productivity improvements reported by organizations such as HCL America and the Air Force GPS Joint Program Office.


Tom Spitzer is managing consultant for application solutions in the San Francisco office of AmeriData Consulting. You can email Tom at tspitzer@ameridata.com.
Vision Software Tools Inc., 2101 Webster St., 8th Fl., Oakland, CA 94612; 800-984-7638, 510-238-4100, or fax 510-238-4101; http://www.vision-soft.com; email: sales@vision-soft.com.

Figure 1.


Vision Builder Business Rules Designer displays the contents of the Constraints tab page, which lists constraints defined for the current table -- in this case, Orders -- and lets you declare more constraints. Each of the tab pages reveals a great deal of functionality.


Figure 2.


Vision Builder's Application Designer window. I dragged the Customer table into the window, and it created specifications for a startup form, the customer list form, and the customer form automatically. If I now add the Orders table, Application Designer will create a form for it and link it to the customers form. I could also add Orders to the Customers form by dragging the Orders table name into the Customers form box.


Subscribe to DBMS and Internet Systems -- It's free for qualified readers in the United States
December 1996 Table of Contents | Other Contents | Article Index | Search | Site Index | Home

DBMS and Internet Systems (http://www.dbmsmag.com)
Copyright © 1996 Miller Freeman, Inc. ALL RIGHTS RESERVED
Redistribution without permission is prohibited.
Please send questions or comments to dbms@mfi.com
Updated Monday, November 18, 1996