The magazine of the Melbourne PC User Group
dBase 5.0 for Windows
James (Jim) D. Duff
|
 |
dBASE 5.0 for Windows is the long awaited Windows database management system (DBMS) upgrade for the many users of this popular Xbase language. I have installed the new version on my 486/66 PC with 8 MB RAM operating under Windows 3.11 and DOS 6.2. The disk requirement for minimum configuration is 10 MB, with up to 24 MB being required for a full installation with Help, Tutorials etc.
At the outset, I must say I like the advertising line that came with the product: "This changes everything... without changing a thing" You get the best of both worlds: a new database development environment for those eager to develop object-oriented Windows based application systems, together with a vehicle for maintaining the investment in the broad base of existing "legacy" systems.
dBASE 5.0 for Windows comes on a set of seven, 3.5-inch diskettes plus the following manuals:
- Getting Started (68 pages)
- User's Guide (326 pages)
- Programmer's Guide (372 pages)
- Language Reference (1040 pages)
- dBASE for Windows Object-Oriented Primer (83 pages)
- Quick Reference Guide (98 pages)
- Using Crystal Reports for dBASE (36 pages)
Although I have installed and begun to play with the new version of the product, I have decided to structure this review around the content of some of the manuals. This is the best approach I can think of to give the reader some appreciation of dBASE 5.0's size and scope of functionality. I will complement this approach, however, with observations made as I have progressed through the new version.
Getting Started
This manual takes you through the simple installation procedures and introduces you to the user interface. I liked the motor car's tachometer view of installed progress and had no difficulty during the installation procedure.
After double-clicking on the dBASE for Windows icon, the user is presented with the initial user interface comprising Menu, Speed and Status bars on a Desktop (Figure 1). The initial window within the desktop is the Navigator, which is a directory dialogue box allowing the user to view Tables, Queries, Forms, Reports, Labels, Programs, Images, Sounds, Catalogues or All of the above. A database table is easily viewed by double clicking on its icon (Figure 2 shows a table browse with the memo field expanded).
|

Figure 1. dBase 5.0 initial window
|

Figure 2. Sample table browse with memo field expanded
|
A minimised icon on the desktop is the Command icon, appropriately presented as the Genie's magic lantern. This is where the old familiar dot prompt facility now lives, presented in an improved layout consistent with the Windows approach. On maximising this icon, the user sees two windows: one for input, the other for output, with each window able to be resized as the user needs (Figure 3).
You have the choice of working through the Navigator or, for those who still like the dot prompt, via the Command window.
Two other major icons on the Speed Bar are the Expert and the Tutorial. The Expert provides facilities for automatically generating queries, forms or reports, guiding the user through steps in their correct sequence. As the name implies, the Tutorial takes you through user selected areas of the product you wish to look into.
The number of Icons on the Speed bars is consistent with the current function being performed. As an example, six icons are used for setting the sequence of objects, and four for object alignment within the Screen Designer. About the only criticism I have of the product so far is that the explanation window for the speed icons is at the bottom of the screen, while the speed icons themselves are near the top.
User's Guide
After skipping through the Getting Started manual, the User's Guide is the next logical read to help get a more detailed feel for how the new version hangs together. The manual takes you through four parts designed to get the non-programmer, like me nowadays, productive: (I) Tables, (II) Queries, (III) Forms and (IV) Tools.
Although I have an Xbase programming background, I now prefer to develop applications systems from a higher level, without having to actually write any program code. After I decide what I want, I get into point and click mode and dBASE 5.0 generates event driven Windows based applications for me. Most, if not all, of my needs in this respect are covered in the User's Guide.
Among the several easy to use tools within dBASE 5.0 is the Forms Designer. Having set up a table, you can easily create a form to update and view its contents. Using one of three alternate operations, the Form Expert is invoked to lead you through a default form layout process. A default screen is created from the table(s) linked to your screen and you are then free to alter the form to your own liking. A control palette comprising Text, Entry field, Combo box, Spin box, List box, Push button, Check box, Radio button, Line, Rectangle, Browse, Editor, Image, Vertical scroll bar, Horizontal scroll bar and OLE gives you all the major types of objects you need to put on a screen.
|

Figure 3. Command and output windows, with result of
a Browse command
|

Figure 4. Properties window for "First Name" object/field
|
The properties of each object (field or field label) on the screen are accessed in the Design view by clicking the right mouse button on the particular object (Figure 4). This invokes the Object Inspector wherein you can specify Properties, Events and Methods for each object, including the form itself. These properties, events and methods are the Object-Oriented (O-O) equivalent of all the parameters - and then some - that went into the old @ SAY/GET in former dBASE versions. Objects/fields on the form are linked to database fields through the object inspector/data link property (Figure 5).
The click of a speed bar icon then gets you directly into the Run window (Figure 6), where you can immediately add, modify or view the data in your table(s). Another click and you are back in the Design window to fine-tune that form. Unlike earlier versions of screen designers where you saw Xs or 9s representing fields from your database, the Design view shows you actual data from the first record in your database. So you are seeing live data as you design your form.
|

Figure 5. Choose Field window for Data Link property
of "First
Name" object
|

Figure 6. Form view
|
Programmer's Guide
This manual is the natural progression from the User's Guide. It is aimed at those who wish to learn the dBASE language, or for existing dBASE programmers wishing to update their knowledge on the latest techniques of the language.
After an introductory chapter on programming in dBASE, the manual is presented in five parts plus 3 appendices: (I) Program basics, (II) Objects and classes, (III) Forms, (IV) Tables and (V) Windows environment.
dBASE 5.0 has an excellent new feature, called Two Way Tools, that anyone who has ever used a program generator has been dying to see. Program generators provide users with the ability to paint a screen or report, the bread and butter of database applications, and generate a program with the click of a mouse or key. The application generator takes the screen or report specifications and generates a source program which is then compiled and executed.
Traditionally, this type of program generation has been a once-off affair, whereby the eager programmer would tweak the generated source code to reflect enhanced processing requirements which could not be accommodated by the original application generator. Having advanced along this route, the original specification would be valid no longer, with further changes having to be maintained through the source code.
If a person is wont to step outside the safe haven of the screen/report specifications and modify the source code generated by dBASE 5.0, all is not lost, as the Two Way method reflects the source code changes back in the specifications.
I am pleased to say that I do not need to avail myself of this piece of functionality as the toolset provided by dBASE 5.0 gives me all I need to generate multitable screens and reports without recourse to programming.
Language Reference
One is overwhelmed just by looking at the quantity and scope of functionality in this well presented set of documentation. In addition to initial chapters on Introduction, Language definition and Syntax conventions, the manual covers:
- 529 commands and functions
- 26 system memory variables
- 7 pre-processor directives
- 21 pre-defined classes
- 175 properties
These language elements are further defined by category, or ability to perform different tasks:
- Programs
- Memory variables
- Error handling and debugging
- String data
- Numeric data
- Date & time data
- Expression and type conversions
- Table basics
- Fields and records
- Table organisation
- Printing
- Input/output
dBASE IV Windows and dBASE IV Menus (for compatibility)
- Forms
- Objects
- Keyboard and mouse
- Colors and fonts
- Environment
- Disk and file utilities
- Low level access
- Pre-processor
- Shared data
- Windows programming
- Classes
Object-Oriented Primer
Forget the 1040-page Language Reference; the best bang for bucks is the little 83 page Object-Oriented Primer. This is the best written primer I have read on any subject for a long time. It explains very clearly and concisely the pathway through: the new approach to systems design; event-driven programming; event handlers; objects; properties; classes; sub-classes; members; methods; inheritance; encapsulation; instances; instantiation; and polymorphism. It explains each of these concepts in relation to dBASE, giving the reader an appreciation for the O-O features of the language.
Quick Reference Guide
This provides a handy alternative to the other manuals and is grouped by commands and functions, system memory variables, pre-processor directives and classes.
Using Crystal Reports
Time and space have not allowed for a review of Crystal Reports, but if the rest of the product is anything to go by, report generation will be a breeze.
Summary
dBASE 5.0 for Windows is the natural step up for the existing large world-wide base of users of this popular language as well as for anyone wishing to start out in the database world for PCs. (I have not touched on the client/server aspects of dBASE which are now available for accessing SQL databases on larger server computers).
I had decided some time ago that I would not cut my teeth on O-O on any of the lower level programming languages like Pascal or C++, but would wait until a higher level application development environment came along - preferably dBASE, as I was familiar with its syntax and semantics. dBASE 5.0 for Windows has provided all this, and more, for me.
In summary, I have found dBASE 5.0 for Windows well worth the wait. The user interface is up to the best in Windows standards, the scope and quality of functionality are excellent, and the old dBASE performance bugbear has now well and truly passed.
Reprinted from the March 1995 issue of PC Update, the magazine of Melbourne PC User Group, Australia
|