Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Commonly misused and abused VFP features
Message
De
31/12/1999 13:27:32
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00310951
Message ID:
00310968
Vues:
31
Are we having fun yet? :-)

>Here's the beginning of a list of commonly misused and abused features, functions, and commadns fo VFP.
>
>1: Inheritence has to be the single most commonly misused feature of all OO languages.

Sure can be, but I'd rather see it abused than not at all :-) Can you give a good example?

>2: SET FILTER TO ... is very often used where another construct would do the job much more efficiently and with better performance.

YES YES YES. My point in the other thread exactly. The only filters I generally use are on my Marlboros.

>3: & the macro expansion feature is too often used where it is either not necessary or ther is a bettter way to accomplish the same goal.

There is great confusion in the land between the uses of (), &, and EVAL().

>4: Filtered indexes, are often used where they are not necessary. The same result can be obtained using SQL without the overhead of having an extra index tag around all the time.

I have never used a filtered index in VFP. I cannot see the point.

>5: UNIQUE indexes, not only are they misused but they could easily be totally removed from the product without any alteration in capabilities.

Again, never used 'em (in VFP). Also a source of great newbie confusion between UNIQUE, PRIMARY, and CANDIDATE.

>6: PUBLIC variables are often used in situations where they are totally not required.

Like...hmmm...in ALL situations? My only disagreement with you on this is with some objects. Like I might want to fire up a public instance of Excel the first time I need it and not in my startup code.

>7: SET EXACT is often used to cover for not understanding the way strings are compared in xBase. This causes the loss of a lot of functionality that is inherent in the product in order to adapt to a lack of knowledge.

Agreed.

>8: == is often NOT used where it should be. See SET EXACT above.

Very much agreed. I know I'm guilty of that one at times.

>10: PACK is too often sued in situations where any benefit it porovides is far outweighted by the costs associated with it.

Some additions:

11: Using a single control to show joined records. If you have a parent with 10 records and a child with 10000, joining them to show a 10000 row grid is suboptimal. Break them out.

12: Become friends with the "File Edit View" menu structure. Users like this. Users are familiar with this.

13: Do not code processes that are not undoable, nor dialog cycles that rely on a succession of dialogs that cannot be escaped from.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform