Amr Badawy
Amr Badawy

Reputation: 7673

Which is better one DLL for all or many DLLs?

We are working on a big portal that developed in SharePoint 2007 ..

We put custom code in Dlls .. some suggest to put all code for many components into one single dll instead of one dll for each component ..

My opinion is to put each component into a separate dll to affect memory in a good way ..

So, which is the better really .. to put all components into one single dll or have one dll for each component ?

Upvotes: 0

Views: 278

Answers (2)

Zuhaib
Zuhaib

Reputation: 1420

You should create different assemblies for any reusable code. If you are not planning to reuse your code then its better to have the code in one assembly .. as it increases performance..

You should also check the following two threads

Does .NET assembly size affect performance? .NET Cross-Assembly Performance Hit

Upvotes: 1

Alex Martelli
Alex Martelli

Reputation: 881913

If your components are separately reusable, packaging them as separate assemblies / DLLs is sensible. If they're a tangled mass of mutual dependencies, bundle them all into a single assembly or DLL. You fail to tell us which is the case, so I don't think we can help any further until you do!-)

Upvotes: 2

Related Questions