Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Life is Beautiful for PRG Based Classes
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00524299
Message ID:
00525249
Views:
41
Larry,

>PMFJI, but why does the source file have to be a text file?

I'll give you an example of where pure text would be a great advantage (and then I will give you some more)...

I recently wrote a program that gathers all code/expressions/properties from a given VFP project and builds a table with everything in it. It was kind of a pain...for some items I had to walk a table, for PRGs I just StrToFile(), etc, etc. I take all the code and put it in a database where you can do global searches, etc. using a nice frontend. Every developer here uses the tool extensively.

Now, imagine all VFP code in text files. I could write my app much more simply, or I could use grep-like tooks to parse through from the OS level. Text has been around forever, so the tools that process text have been around forever too (and they rock).

>IMO, VFP uses DBF files for its stuff because it is very fast with regard to this format. The routines are already there to parse a DBF file so the internal tools use them.

Gerry has stated that a PRG-based class instantiates faster than one in a VCX/SCX format...can we get confirmation on performance figures? WHich method is faster, and under what conditions? What about memory usage?

>You can have your two-way deal using the VCX/SCX as a table and simply adding/modifying the Methods/Properties fields as needed. If you want to add a new item, just add the record and modify the appropriate fields. if you want to position it (graphical item), then close the file and open it in the visual designer and make the necessary adjustments.

But use _what_ to add a record. Only VFP can talk VFP. On the other hand, numerous tools can talk text.

As I said, I will now give other reasons that text is beautiful...

- very standard, and can be read anywhere using any tool.
- easier to diff when it comes to branched source control.
- everything is in one format, as opposed to items being buried in Property viewers or Report Writers, etc. (all the various VCX/SCX/FRX/MNX yada yada) Yes, you can do everything in code in VFP if you wish, but having everything in text files natively would assure that everything was accessible by looking at one type of file.

As I stated in another message: personal preference aside, it is hard to argue that text has its advantages. Other than the speed thing (which we still aren't sure about), what do you see as the upside of the VCX/SCX style format?

JoeK
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform