04.08.2013 Views

Chapter 16 Customizing Your Development ... - dFPUG-Portal

Chapter 16 Customizing Your Development ... - dFPUG-Portal

Chapter 16 Customizing Your Development ... - dFPUG-Portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

456 The Fundamentals of Visual FoxPro 6.0<br />

incremental changes, how did you deal with the issue of discarded and outdated files? You<br />

didn’t dare erase all the files, so when REPORT5.PRG was replaced by REPORT5A.PRG, you<br />

just brought REPORT5A.PRG along and left REPORT5.PRG to gather dust.<br />

As I’m writing this book, my company inherited an application that has more than 600 files<br />

in one directory. (And we found out that they had just moved this application from the root<br />

directory into its own subdirectory not too long ago.) The first job is to clean out the junk, and<br />

it looks like we’ll get down to fewer than 100 files by the time we’re done. Imagine the disk<br />

space savings, not to mention the boost in productivity when doing additional maintenance on<br />

the system!<br />

With the advent of FoxPro 2.0, the number of source code files required for an application<br />

nearly doubled. Instead of having a single .PRG (and its compiled .FXP) for a screen, two<br />

additional files were needed—the .SCX and the .SCT—and then two more: the generated<br />

screen .SPR (and its compiled .SPX). Menus presented the same situation with the<br />

.MNX/.MNT/.MPR/.MPX combination, and each report generated through the report writer<br />

required two files—an .FRX and an .FRT. Now throw in a few dozen .DBF, .CDX, and .FPT<br />

files, and suddenly even simple applications were back to having hundreds of files in one<br />

directory.<br />

Fox Software suggested a solution that’s been carried forward by Microsoft: Use separate<br />

directories for each type of source code, so that your directory structure for Visual FoxPro<br />

looks like Figure <strong>16</strong>.5.<br />

Figure <strong>16</strong>.5. The standard Visual FoxPro directory structure contains nearly<br />

a dozen subdirectories.<br />

Well, I have some problems with this layout. First, I can never keep the names of all of<br />

these directories straight. I valiantly struggled with “Why did they spell out REPORTS but<br />

abbreviate PROGS?” “Did I call it PROGRAMS or PROGS?” and “Was that in REPS or<br />

REPORTS?” And looking through previous versions of FoxPro as well as the default

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!