Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

the best approach of code re-use

Status
Not open for further replies.

hankgao0703

Programmer
Jul 18, 2001
27
CA
hi,

I am currently working on serveral projects simulatnerously, since these projects are closely connected, so in logic, there are a lot of code that can be reused(or shared). I just wonder which is the best way to reuse/share such codes across several projects.

Could you tell me what you think about the following ways:

1. traditional cut/copy
2. object encapulation
3. static library
4. Dynamic link library
5. COM component

Thanks in advance!

Hank
 
Hi

Well, this really depends on your way of working.

Previously, I was using a DLL for this but managing the different versions could drive you mad or, at least, lead to a nightmare.

Now, I write general classes that I store in a defined directory to which applications point to. If I need to change one or more classes, I just need to recompile the applications that were using the previous versions of these shared classes. This could look odd but it's very easy.

I always used static linking so I rely as little as possible to the dll's, libraries, ... on the user's machine

My two cents

Thierry

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top