Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to put complex method code
Message
 
 
À
10/01/2001 11:42:05
Mike Mattos
Nationwide Computers
Mississauga, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00461101
Message ID:
00461808
Vues:
11
Hello, Mike.

I see your problem more clearly now. My previous answer was oriented to another situation.

>I've noticed that the damn project manager seems to find more & more of the big system on every build of the small COM servers, so I am ending up with BOTH, a copy in the main project, and a copy in the COM project!

For what you said, I think you have a problem trying to decouple functionality in a highly coupled system. If you're trying to isolate functions in COM components and you end up with a lot of code that's being dragged into your project "magically", this is because you're including something (a class, a prg, whatever), from what you only need a small piece, but as it has references to other components, those are included, and all it references too.

For example, you're trying to build a component to handle customer information, but you use a procedure file with, say, a function to parse an address, but you get lots of code that handles vendors, products, or just generalities that you don't need. Even worst, many of that functions can have calls to other procedure files, forms, classes, etc. One class referenced gets you the whole class library into the project, and so on...

I got into this before. The best thing for me was to start breaking down long PRGs into smaller ones. Actually, I try to put everything in separate files. I prefer to have hundreds of little PRGs or VCXs, than bloated monster files.

If this could drive to too many files, you can probably arrange them in different directories, but that's up to you.

>by design, I re-use some names to load different programs , it helps with security and makes the system more flexible! ( eg CASE 1 set proc to sales
> CASE 2 set proc to support
> DO Inquiry )

I have had troubles with this. You have to be carefull, as components are stored within EXEs just by its name, so this would be as far as you have different files with the same functions inside, but won't work if you have different files with the same name (inside the EXE there are no directories).

Let me know how're you doing and if I can help any more.

Good luck!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform