| ## Developing a Database Application: The dBASE Plus Tutorial Ken Mayer, Senior SQA Engineer, dBASE Inc. Michael Nuwer, dBASE user

Phase X Closing Comments

### Cleanup

After everything we've done, we have some settings in dBASE Plus that we may not want to leave around.

These settings have to do specifically with the custom forms and custom reports.

The next time you go to create a form or report, dBASE Plus is going to assume you want to use the custom one in the tutorial directory that you last used. You may want to solve that NOW by doing the following:

- Go to the navigator and click on the Forms tab
- Double-click the "Untitled" form
- In the designer, go to the "File" menu
- Select the "Set Custom Form Class" option
- Click the "Clear Custom Form Class" button
- Click "OK".
- You will see the form clear out.
- If you get any errors click "Ignore" (for each)
- Close the blank form without saving it ...

Repeat the above for a report, or you will run into the same issue there.

This will save you some frustration when you next go to create a new application.

One other thing you should do is to type, at the command window:

       CLOSE DATABASE

This will ensure that the tutorial database is closed, and that the next time you go to create tables you don't accidentally save them to that location ...

### What Have We Learned?

First we have learned that dBASE Plus is a powerful software package and object oriented programming is it's foundation. We learned about classes, properties and events.

Next, we learned about Re-Usability! That is what all that stuff with custom datamodules, custom forms, custom controls, and custom reports is about. You should always try to use these, and try to design any code that you place in your custom objects so that it is as generic or re-usable as possible. We learned about (although these terms weren't used) inheritance, polymorphism, and encapsulation.

We learned how to create an MDI application that works like most other data driven applications.

We learned how to create database aliases and use them as databases.

We created some parent/child relationships among our query objects (in the datamodules). We created forms that showed these relationships as well as reports that used them.

We used datamodules in forms and reports, and in one case the same datamodule was used in both a form and a report.

We created forms with child-forms or dialog forms, whatever you want to call them.

We created reports with groups, with totals, and more.

In the process we learned something about how the Object-Oriented Database Manipulation Language (OODML) is used, and created code to manipulate data using it.

And we learned about how flexible and powerful dBASE Plus can really be.

Believe it or not, we really only scratched the surface of the abilities of dBASE Plus with this tutorial. While we sometimes scratched fairly deeply, there's a lot more going on under the hood. There are objects in dBASE Plus we haven't touched. We didn't write any code that was independant of forms and reports to manipulate data. We didn't use any ActiveX controls, OLE abilities, and so on.

When it comes right down to it, every time one of the authors use dBASE to write a new application we learn more about what it can do. So will you.

### Now What?

You should get used to the following misc. bits of information (provided in no particular sequence):

- Any application of any size and complexity that you develop (or anyone else does) in dBASE Plus will take some time, but using techniques shown in this tutorial you can reduce that time drastically (custom forms, reports, datamodules, controls).
- Any tutorial cannot possibly show you how to do every part of any one application, and therefore we have not tried to do so. This application could easily have a lot more going on, including some automatic updating of quantities on hand, more reports and a lot more. This is a learning tool not a real-world application!
- There are bugs in dBASE Plus -- indeed, any program of this size (including ones from Microsoft and others) contain bugs. However, in nearly all cases there are workarounds.
- Learn to use online help -- it's more up to date than the printed documentation.
- Use the How To documents to enhance your knowledge of dBASE Plus development techniques.
- Use the dBase Users' Function Library (dUFLP) in the Knowledgebase to learn more about dBASE Plus coding, to give you more functionality, and such. Remember that this is FREE code (but follow the guidelines and don't claim credit for code that is someone else's).
- Along the lines of the above suggestion there are a lot of other developers who have freeware code at their web sites that may help out. Use the dBASE web ring to find some of these. There's a lot of good stuff out there.
- Use the dBASE Newsgroups to post questions and get assistance with your applications.

Note: You are hereby granted full permission to use any or all of the code in this tutorial for any application you write. If the code is in the .CC (Custom Control) files or the Preview.wfm, please make sure you credit the authors, and if the code comes from instructions in the tutorial, assume the authors to be either Gary White, Peter Rorlick, Ken Mayer or a combination of the three.

### Ok, We're Really Done

With luck, you learned something about creating applications in dBASE Plus.

The process of creating this tutorial has caused both authors to stretch their own knowledge, and in some cases we have actually changed some of our own development techniques based on what we learned in building this project for you.

After you get over the learning curve, you will find that development in this product is largely enjoyable process. Enjoy it, and maybe we'll see you out in the newsgroups!

Go back to the tutorial menu

Last Modified: November 11, 2002

The Legal Stuff: This document is part of the dBASE Plus Tutorial created by Ken Mayer and Michael Nuwer. This material is copyright © 2002, by Ken Mayer and Michael Nuwer. dBASE Plus is copyrighted, trademarked, etc., by dBASE, Inc., the BDE (Borland Database Engine) and BDE Administrator are copyrighted, trademarked and all that by Borland, International. This document may not be posted elsewhere without the explicit permission of the authors, who retains all rights to the document.