Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
10 Things to Avoid in VFP Development
Message
De
30/12/1999 09:26:30
 
 
À
30/12/1999 09:07:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00310318
Message ID:
00310331
Vues:
43
11. Never try to create persistant relationships between remote views

>Hi All,
>
>Jim's PANDA post about public variables and the fact that I have spent some mentoring time lately compels me to write this list:
>
>
  • Don't use PUBLIC variables. They're hard to track down and not good design. Use object methods. This is Jim's mantra and a good one.
    >
  • Don't use Formsets. Formsets suck. Formsets are the black holes of VFP objects; hard to manage and impossible to escape once you've used them.
    >
  • Don't overload your Form.Refresh. Too much logic in Form.Refresh slows down an app considerably. Especially try to avoid requerying or SCAN type ops in Refresh.
    >
  • Use type and object prefixes! It's not that hard to get in the habit of and it makes your code a helluva lot readable.
    >
  • Forget SET FILTER. SET FILTER can slow down your app much worse than a parameterized view.
    >
  • Don't forget your SETs. Remember to set your SETS in the BeforeOpenTables event of a DataEnvironment when a form uses a Private Datasession.
    >
  • Parameterized views require parameters! If the parameter is a Form property, then the view will error on opening unless you've set NoDataOnLoad for the cursor to .T. You can requery in Form.Init to get the proper rows.
    >
  • All tables should have primary keys! All of them. No exceptions to this rule. None. Ever. For any reason.
    >
  • Avoid code repetition. If Apply and OK buttons both save code, then they should call a common method to save.
    >
  • Consistancy! Think long and hard about right-click and dbl-click behaviors for controls. Be prepared to explain why clicks act differently for different instances of the same control type. DOCUMENT those differences with ToolTips.
    >
    >There are doubtlessly a gazillion other no-no's.........
    --Todd Sherman
    -Wake Up! Smell the Coffee!
  • Précédent
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform