Click here to Skip to main content
16,006,594 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi there

I am wondering if there are rules of thumb or suggestions as to how many DLL files should be created for a solution?

What are the advantages / disadvantages to partitioning a solution into various DLL libraries from a performance standpoint?
Posted
Updated 27-Oct-10 4:14am
v2

I've never heard of anyone running into any kind of limit.

There are a number of (what I see as obvious) benefits to compartmentalizing code into assemblies:

0) Code re-use - other applications can use the same assembly, thus aleviating having to write the code again.

1) Functional separation (or abstraction if your prefer that term)

2) Ease of maintenance because you can often replace a small component of an application without forcing the user to do a complete update

There are probably a lot of other benefits that I haven't thought of.
 
Share this answer
 
Comments
Nish Nishant 27-Oct-10 10:14am    
Voted 5, proposed as answer.
Marc A. Brown 27-Oct-10 10:17am    
Agreed. Excellent description.
There is no rule of thumb for that.

A reason for using dll's is that a dll can be used in any application without having to share the source code. You can share some functionality and keep it a secret how you have done that. But it still makes it possible to reuse certain functionality/

You can change some functionality without having to recompile and maybe the need to re-install the complete application. Most updates are supplied in this way.

If some functionality changes rather often or it is uncertain if something specific needs to change in the future, you could put that specific functionality in it's own dll. This makes it easy to change, update and also easy to test. You would only need to test the functionality changed in that dll because that's the only thing that was updated. Larger companies love this because they otherwise need to perform a regression test of the complete application.

Like the name says, dll's are also dynamic. You can load dll's at runtime that were unknown at compile time of your application. Of course you would need some ground rules to get started and also know if a dll was created to function with your application. But in this way you it is possible to add plug-in capabilities in your application. This way you give yourself, and could also give other developers the possibility to extend the features of the application.

So, there's is no specific rule of thumb. Simply don't create unnecessary dll's because you would simply make it harder on yourself.

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900