Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
About the Set Classlib statements for an app?
Message
 
À
29/07/2009 11:15:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01415323
Message ID:
01415476
Vues:
198
Hi Matt,

>Is there any potential problems with the number of Set Classlib statements in app.

It's basically a performance issue. The libraries you have, the longer it takes to resolve CREATEOBJECT() lines. The performance impact is more noticeable with PRG classes, though.

> Is it common to have so many as I do in an app, or have I gone off the deep end?

Class libraries? That's on the light end for many of the applications I work in. Most have a multitude of number of class libraries. However, I rarely rely on SET CLASSLIB, though. Mostly I either use NEWOBJECT(), or I have an object factory that loads class libraries as needed. Having a SET CLASSLIB statement in one part of the application to make a CREATEOBJECT() in an unrelated part work is too much coupling for my liking. It's pretty close to using a public variable, from a dependency POV.
--
Christof
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform