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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

1 dll or multiple dlls?

Status
Not open for further replies.

carriemjohnson

Programmer
Aug 26, 2002
11
0
0
US
I'm developing in an application that has gotten fairly large. We currently use 1 dll to do several of our processes. But are looking to expand our functionality using the same dll tools. My question is - is it better to use 1 dll (even though it's going to be quite large) or is it better to split the information into multiple dlls?
 
It depends on the situation. You should group related COM objects into one dll for clarity and for the sake of better being able to maintain the stuff.
If everything is closely related then there's no reason to separate the dll in multiple smaller dll's (it won't give you a performance gain, if that's what you're looking for).
Greetings,
Rick
 
Depending on how large things are going to get, you could divide the DLL into logical blocks. To go one step further you could put interfaces between these logical blocks. This would enable you to recompile one logical block with out having to recompile the whole lot.

Keep in mind that large DLL's take longer to load.

My personal opinion is that if things can get grouped into logical blocks, make seperate DLL's. Except maybe for the smallest of functional blocks, but then I group these small functional blocks into there own DLL. Think of each of these DLLs as being a black box with defined inputs and outputs (the interfaces). When something goes wrong it is usually relatively easy to say, that black box did not do what it was to supposed to do. Now you know exactly where to go look.

Another thing against large DLL's is that it is far to easy to be undisciplined. The black boxes with there defined interfaces, in a way, forces you to write disciplined code, which leads to far easier debugging. The Big Viking
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top