Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is one concrete Class per Class Lib a poor/good idea?
Message
De
24/06/2004 11:11:08
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
24/06/2004 03:17:55
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00916585
Message ID:
00916870
Vues:
43
Hi Walter

I write only to give Anthony another perspective...

>IMO, The disadvantage of having one class per classlibray is that it clutters up the project manager which does not make it easier to find classes. If you group your classes logically into groups than it might be easier to quickly get at the class you need. For example, I've got a classlib that handles the integration of Crystal Reports into my projects. It only contains classes directly related to Crystal Reports. Another library contains the personal framework. A third one will contain reusable project depended classes. The 4th the project dialogs and forms.

If the classlibs are named well, this problem is eliminated. If you pick up any new framework you will see the disadvantage of having to dig into various libraries just to find a single class.

Lego blocks are shipped in a box, but they are not preassembled into arbitrary forms within that box. I prefer for the project manager to show me the exploded parts list, rather than artificially hiding the various parts. That's because I can't anticipate what pieces will be needed and what pieces won't be needed for a given project.

>
>Also, a large number of classlibraries will make your executable significantly larger, since the whole VCX/VCT is copied into your exe including tableheader etc. It will add approx 1.7 Kb to your exe for each and every classlib. In my case it would increase the filesize about 10 - 15%.

Having a project bloated by drawing in unused classes has a far more significant detrimental impact on exe size. In the example I'm remembering the filesize was 3.2Mb versus 54Kb, an increase of 592%.

Until the business objects were relocated to separate VCXs it was not uncommon to get massive exe/dlls. The only excuse was the vendor didn't think about it. I believe that most people are not thinking about this issue when the start out. I think the default behavior should be to not combine things into classlibraries unless there is a specific advantage to doing so.

That vendor would have separated everything out, except that the retrofitting doesn't warrant the change. So a mistake is perpetuated rather than corrected. I can't tell you how many times I'm paying for that decision by having to get customers to install FTP client software, just so they can download files because they are too big to email.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform