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:
00525371
Views:
42
Hi Joe,
There really is no peceptable difference between VCX-based classes and comparable PRG-based classes. The initial class instantiation takes approximately 20%-25% more time. However, we are talking about multiples of 10,000th of a second. Not very significant, IMO. Once the class is cached then the difference goes down to approximately .7%. Now we're getting into multiples of 100,000th of a second. I usually don't track things down this far. ;-)

As for the now on-going debate about TXT-based source being better than table-based source, who knows. There are benefits either way.

Table
1. Use of SQL commands to search, update and insert items. I'm a database application developer. SQL (VFP's, SQL Server's and now Oracle's version) is my second language so it is very easy to do some things that way. If I came from the UNIX world where you have utilities like Grep, I might feel differently but I didn't so I don't.
2. Adds some overhead to modifying your work thereby adding some level of security. In doing so, some neophyte developer can't simply come in and modify what you have done. Sure they can wipe out what you've done or corrupt it, but changing it is a different matter. The corruption possibility can occur just as easily with a txt file based system by truncating the file.

ASCII
1. Source control easier when comparing differences of branching
2. Use any editor to modify files - Personally I discount this because I don't want to use NotePad to edit my files. The editors out there that handle ASCII files simply edit ASCII files. You can just as easily use them on a DBF file, if you knew the structure and where to put the information.

Personally I don't care one way or the other. If they make it that way, I'll learn to live with it (just as I have learned to live with and exploit the DBF-style source).

Regards.

>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
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform