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 si开发者_C百科ngle dll or have one dll for each component ?
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!-)
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
精彩评论