Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Proc files vs Proc class
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00121297
Message ID:
00121309
Vues:
16
>>I'm wondering what the pros/cons are in using Proc files for UDF's vs. creating Proc Classes to implement UDF's. I've grown accustomed to seeing most VFP developers use Proc files, but in an effort to try to be more 'object' minded I'm wondering if creating proc classes would do the job (perhaps better)? Any insight would be appreciated. Thanks in advance.
>
>Performance-wise you may gain by using the Class approach, but not much. I've found it simpler to use a proc file for anything used by more than one form because it's easier to handle when testing forms from the command line - you don't have to keep your oApp object (or proc object or wherever they're stored) instanciated.
>
>Of course you could drop each proc-class into the forms as needed, but in this case I find it adds to the overhead unnecessarily.
>
>Any code that's used by a single form is automatically placed in a form method, though - keeps the system 'neater'.
>
>JMHO
>Barbara

The issue of testing forms from the command line is something I hadn't thought about. I'm not in the habit of doing that because I work in a very large system in which the object model we're working under requires a boatload of objects being instantiated anyway, so it is near impossible running forms outside of the foundation.

I'm going through the excercise of building my own framework for learning purposes/self-projects, so this is something to keep in mind.

I agree that placing the proc-class would not be beneficial.

hmmm..what other issues are lurking out there?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform