FoxPro

FoxPro Developer's Conference '94

Session 222
The 1 Hour Application

Andrew Ross MacNeill
PC Edge Inc.
(with assistance from Alan Schwartz, MicroMega Systems)


 

Introduction


 

Application Building: Methods


Components of an Application

Before we build the actual application, let’s identify the major components of an application.

Information is usually table-based. Tables are where the information is stored and manipulated.

Interface can be used to describe almost every aspect of an application. In this case, we’ll focus primarily on the screen interface. Obviously this is an important part of an application and one where we don’t want to overlook a lot of possibilities.

Access is how we allow the user to gain access to the screens. In the event-driven application we will be building, menus are the key. Unfortunately, FoxPro only provides one kind of menu builder and no samples beyond Quick Menu. We’ll discuss the possibilities available with tools such as FoxExpress.

Output is what the client is always after. FoxPro offers a fairly useful report builder to create the report formats but output also entails how the user displays information in that format.

Internals are the last part of the application we’ll discuss. These are the components that clients often take for granted but cost us, as developers, the most amount of grief. Thankfully there are some tools that are available that can aid us in this process.


Information (Tables)

Building tables in FoxPro isn’t difficult; a simple MODIFY STRUCTURE allows us to modify and add new fields to contain new pieces of information in the various formats (character, numeric, etc.). But from an application point of view, what the fields contain is far more important than how they contain it.

Data Dictionaries provide this missing link in FoxPro. Even in their most basic state, providing field descriptions for the tables, they can still provide valuable information, such as field concordance tables. In an application generator, data dictionaries provide far more than simple descriptions. They can provide picture formatting, index information, validation clauses all within the dictionary itself. This can allow us to manipulate information in the tables using the rules defined in the data dictionary.

Because FoxPro doesn’t maintain an internal dictionary, a data dictionary cannot be automatically maintained by an application. However, it is possible to build your own tools that make this maintenance transparent to building the application.

Data Dictionaries also serve one other valuable purpose: documentation. With a single report, you can identify all of the structures of your application, complete with descriptions. This can be very useful when hiring additional consultants.


Interface (Screens)

Before we discuss the benefits of Wizards and application generators, let’s make one general rule:

USE THE SCREEN BUILDER FOR DESIGNING SCREENS!

If you don’t, not only are you are spending your own valuable time doing mundane programming, you are doing your clients a disservice. Four years ago, screens had to be programmed in order to be truly useful. This is no longer the case.

FoxPro 2.6 introduced a Screen Wizard that makes it very easy to build a fully functional screen, although without internal validation. Logical fields automatically get check boxes, memo fields are placed into Edit regions and more. Application Generators can help you out even further by building in all of the rules contained in the data dictionaries, including lookups and more.


Access (Menus)

Microsoft has always ignored Menus as a major component of an application. This is very noticeable in that FoxPro 2.6 has Wizards for just about everything except menus. This is unfortunate because menus are the way in which screens and reports are all accessed. Menus have the power to make a complex application simple or a simple application hopelessly complex.

In truth, there isn’t a lot to be done with menus. If you use FoxPro’s Quick Menu, you can duplicate FoxPro’s menu structure but the best items are missing, such as the Browse menu. As well, the FoxPro Menu Builder always creates similar looking menus and while you can use GENMENUX to make changes to this look, you should try to keep the menu structure simple.

Application Generators offer us some distinct advantages in this area. They can provide sample menu structures with built in options, such as About... and Indexing options. But they always use an important rule, standardize.

If you’re not using an application generator, create some standard menu options such as a Help menu and append them to your application menus. You’re not only cutting down your own time, you’re making it easier to introduce another application to a client.


Output (Reports)

FoxPro 2.6’s Report Wizard is a very cool tool. It has an impressive array of reporting formats, everything from standard line reports to grouping and more. But creating output is not just building report formats, it involves retrieving the filtering the information to be shown.

The best tool to provide this type of functionality so far is Foxfire!

Foxfire! is popular enough that most data dictionary and application generators provide a translation tool for it. The data dictionary in Foxfire! is extensive and the interface is one that can be used by developers and end-users alike.


Internals

Using everything we’ve discussed up until now, we can build a very useful single-user application but there’s quite a bit missing from a truly functional system. Multiple users may require multiple security levels. Even single users may need Help and/or documentation every now and then. And if you tell your clients to backup on a regular basis, the first question they’ll ask is "How?"

There are some other issues that you may want to consider in an application. In Canada, bilingual systems is a federal government requirement. International applications may also have some kind of international requirements. When "right-sizing" an existing application or building a corporate-wide system, it’s not uncommon to find a need for importing and exporting information.

All of these issues are things that clients often take for granted. For developers, building these routines can often be expensive time-wise. Application generators can help out to a certain degree. As well, recently there have been some tools made available that can help in the building of these requirements in custom systems.


Security

Levels of Security

Table
Menu
Fields

Help & Documentation

Standardization
Help Generators
Windows-Style Help

Other Issues

Multilingual Support
Archiving


The 1 Hour Application
(c)1994 PC Edge, Inc.