dBASE™ PLUS is a great rapid application development (RAD) environment. However, many folk are not sure where to start in the development of an application or how to use the tools included with this amazing software.
The purpose of this tutorial is to guide a database developer through the process of creating an application in dBASE™ Plus, from building the database to its final deployment.
dBASE™ PLUS is a 100% pure object-oriented programming tool. The tutorial project will focus on using the dBASE™ PLUS data access objects; it will guide you through the objects used to create forms, reports, and an application menu; and it will show you how to deploy a complete application.
This process will take some time, so this is broken down into individual parts. As a student you can work along when you have time and come back and pick up where you left off. Do not assume that you can just "whip through it" and be done quickly. While the application created during the process of this tutorial is not a "complete" application, it still has many inter related pieces. In the past, users have, for the most part, taken a minimum of one week to complete this project.
If you find any typos, errors, or have a difficult time understanding any part of this tutorial, please use the dBase, LLC public newsgroups. Information on these can be gotten at the dBase, LLC website: http://www.dbase.com. Use the "Support" link, and in the menu is a "Support Options" page. At the bottom is a link to the newsgroups themselves.
Note that there is a new (as of Feb. 14, 2017) newsgroup: dbase.tutorial that should be used for questions about the tutorial.
The first update to the tutorial since 2002! dBASE™ has evolved and changed a lot in the last 15 years. As Michael's life has taken him away from the dBASE community, I (Ken Mayer) have chosen to pop back in and take this back and work on it again.
dQuery is gone, and replaced in dBASE™ PLUS 11 with a new Data Module Designer, which looks a bit like a simplified version of dQuery. In dBASE™ PLUS 8 through 10, there is a more simple Data Module Designer than the one in dBASE™ PLUS 11 -- basically a form that you can place your data objects on, but no grid, etc.
dBASE™ PLUS 11 comes with a lot of dmAssist™ programs and wizards that we will not be discussing in the tutorial. Look for an updated version of The dBASE™ Book PLUS (it will be the 2nd edition) coming soon, which will discuss these to some extent.
Other changes as noted in the text itself. There's a lot. However, I hope that with all the changes this tutorial becomes relevant again for those trying to learn dBASE™ PLUS.
The original tutorial was created using the sample data that was available at the time. It was written initially by Ken Mayer while he was working at a job he didn't really enjoy, and then improved (vastly) by Michael Nuwer, who was working at a job he liked. (Indeed completion of the tutorial, because Michael was working at a University, helped him get a better position ...) Michael created new data to be used for the tutorial in later versions.
Since 2002 when Michael last worked on the tutorial, the software has been greatly improved. This version of the tutorial is meant to take the concepts and programming techniques from the original (as well as much of Michael's text), but update it to the current version of dBASE™, which in 2017 is dBASE™ PLUS 11. The update will include the current tools (such as the Data Module Designer), and updated screen captures, as well as the process for setting up the data, and more.
The sections at the top of each part of the tutorial will include references to The dBASE Book, The dBASE Reports Book, and The dBASE Book PLUS as appropriate. These books, written by Ken, are available from both dBase, LLC, and from Ken's website (Ken's dBASE™ Site (The Books)). You could make a claim that I am hyping my books, which I am, but they aren't required to do the tutorial.
I left Michael's list of updates below for previous versions of the tutorial below.
This Edition of the Tutorial Project is tailored to dBASE™ PLUS. In addition, Phase II, Creating the Database, and Phase III, Creating the Data Modules, have been rewritten so as to take full advantage of the dQuery II interface.
Support has been added for the "inherit from" menu item when creating data modules with dQuery. This option was not available in dB2K.01. It is available with dB2K.04 and dBASE™ PLUS.
The use of a Source Code Alias has been removed. In the second edition, the Source Code Alias caused more confusion than any other part of the Tutorial. A Source Code Alias is an extremely useful tool and you should considering using it when you build your applications. But there is plenty of new material to learn before introducing this topic.
An onClose event handler has been added to the BASE.cfm form. This event handler is intended to release from memory any form derived from the custom class. Pervious versions of the Tutorial Application could cause system resource problems because forms were not properly released.
We have added some code to the custom combobox control which handles those times when the combobox appears to change data but it doesn't. This code was included in the first edition of the Tutorial, but seems to have gotten lost in the Second edition.
Finally, the walkthrough application has been restructured so that it will run in without a database alias. In the previous Edition, the walk through was an executable file. Now it is a collection of source code files. (November 11, 2002)
This is the Second Edition of the Tutorial Project. The first edition was written for Visual dBASE 7.01 by Ken Mayer and last updated November 8, 1999. The text of the Second Edition is a complete face lift so that it corresponds with the many new features offered by dB2K. The updates were made by Michael Nuwer and released June 30, 2001. Among the new features found in dB2K are dQuery/Web, Source Code Aliases, and Dynamic External Objects (DEO). The Second Edition integrates each of these new technologies into the Tutorial Project.
Another significant change that will be apparent to anyone who has worked through the First Edition of the Tutorial is the addition of a new Chapter on Creating Custom Components. In the First Edition, the Tutorial used a pre-created set of custom controls. In this Edition you will create your own custom controls and use them in the application.
Other new material includes a brief discussion of data validation and creating calculated fields in the Chapter on "Creating the Data Modules". A new report, the Customer Account Statement report, is added to the Chapter on "Creating the Reports". This report offers some interesting material related to the linkage tables and calling the report.
Other changes include 1) the use of DataModule objects rather than DataModRef objects and 2) the use of TextLabel objects rather than Text objects. Both the DataModule class and the TextLabel class were introduced in February 2000 when Visual dBASE 7.5 was released. The DataModule class reduces much of the complexity associated with dataModRef objects and the textLabel class reduced the memory overhead associated with Text objects.
The Project Explorer is no longer included in the Tutorial. With the introduction of DEO, compiling and building an application has become rather simple. The Project Explorer is, therefore, no longer needed.
For those who have paid very close attention to the code used in the First Edition, you will notice that the canClose method that was in the DataForm.cfm has been moved to base.cfm. Since the DialogForms and the Dataforms were calling this method, it seemed appropriate to locate it so that either form would inherit it.
There are many people who have helped with this Project. The First Edition would not have been completed without:
In addition, there were many folks who helped test the tutorial before the First Edition was released to the general public. Ken received some good comments from various Beta testers, including a lot of re-writes for clarity in the text, a lot of the "Notes" were added based on input from the testers, and some (gasp) bug fixes in the code. These tester were: Robert (Bob) Newman (Bob found a really serious problem in the deployment section of the tutorial, as well as lots of good commentary throughout), Richard Sandies, Frank Polan, Barbara Betcher (Barbara suggested the Goals section for each of the different Phases of the tutorial, and provided screen shots for some of the areas she had concerns over -- this was very helpful), Steve Robertson, Denise Allred, Richard Clark, Bernard Mc Clement, Richard Forrest, and Jørgen Feder. The second group of Beta tester were Roy Manuell, Santo Lo Galbo (Santo tested on the Italian version of Visual dBASE 7, and it worked there, which is good to know), Gerald Lightsey (Gerald provided tons of nit-picky commentary -- which is good -- various typos and minor glitches got found, as well as a few big ones, particularly in the Invoice report), Wes Rue (the first to complete the project through to the end), and Jim Garrett.
The Second Edition of the Tutorial owes a great deal to the dBASE community. Over the last few years that I have been active in the dBASE Newsgroups, I cannot remember one cross word directed at "Ken's Tutorial". But there has been a ton of praise and gratitude. The overwhelming support of the user community voiced day after day both encouraged and energized this update.
Ken Mayer encouraged Me (Michael Nuwer) to write the update and had faith that I could pull it off. The Second Edition of the Tutorial also benefited from a great group of testers. Tim MacAlpine set the pace during the testing period. He was often the first to find my errors and cleared the path for others. Barbara Betcher, who was a beta tester for the First Edition, offered her help again. The clarity of this document owes much to her detailed comments. Duane Bays and John Creed brought a great deal of experience to the testing period. Their extensive comments saved me from making some big mistakes. I would also like to thank Mario Trzesniowski, Don Archibald, Jean Chenaille, and Don White for offering valuable contributions to this project.