Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET PROCEDURE TO - advantages/disadvantages?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00222480
Message ID:
00222705
Vues:
25
>Hi,
>
> Could somebody explain me advantages and disadvantages of using one big procedure instead of many little programs? I had a discussion with my manager about it (I prefer the first way), but I need some arguments...
>
> Your help will be greatly appreciated.

Hi Nadya,

Since so many folks have taken the point of view that the procedure file shouldn't be used, I'll take the other side. I will, agree, however, that the large, monolithic file is dead as a doornail. Since the additive of the ADDITIVE clause to SET PROCEDURE, there is little, if any, need for this type of procedure file. About the only one I can think of is one that would provide system level services.

First, because of the ADDITIVE clause, there's no longer any need to lump everything into one big prodcedure file. They now can be loaded and unloaded as necessary.

Second, there is a drawback to using OOP (in terms of creating a class to do what the procedure file would) in some cases. If you have a routine that is called repeatedly, you can suffer some performance degradation in implementing a class rather than a procedure file. Simply put, it takes longer to call a method of an object than it does to simple call a UDF in a procedure file. This doesn't apply in all instances, because the loss of performance may be inconsequential. However, it is a consideration to be aware of.

A lot depends on the nature of the solution and the problem being addressed. More important, in my mind, is the degree of functional cohesion that the procedure/class attains.

Just my 2 cents.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform