Is it better to have more number of dll's

I'm designing an application. I found that to make it more modularize, the number of dll's getting increased. Is it a better design to have more number of dll's?

Regards ArunDhaJ

-------------Problems Reply------------

This is a common but tricky question. Personally I don't like overly fragmented dlls, as it makes it quite hard (IMO) to track and deploy. I prefer a limited number of more chunky dlls.

In addition to project/dll management, this also reduces the amount of work "Fusion" has to do when loading things.

You should obviously aim for reusable components, but just don't go mad making them too granular - consider "System.Windows.Forms.dll", for example; quite a lot in there!

Vertically, the obvious ones to keep separate are UI / repository / logic concerns; horizontally I tend to have one column of dlls per logical area - but you can still compartmentalize that with namespaces, so you don't have to keep a dll to just one thing.

The goal is not to have a certain number of assemblies, but to have a meaningful separation. Certain architectural models suggest a certain structure, e.g. a 3-tier application might have separate assemblies for data access, business logic and front-end (and keep in mind that the dependencies between your assemblies ideally form a tree).

I think this question is subjective, because it depends on everyone individual opinion.

In my opinion, a project should need as many dll's as there are modules, not including dll's for data and business tiers.

In general, components of an assembly that belong together should of course remain together. Marc Gravell's example of System.Windows.Forms is a good one IMHO.

That is a very general question... I don't see why not as long as the dlls do not depend on one another.

Each dll loaded adds a little overhead (the OS needs to keep track of it, more dllmain's to call for each thread start/end.

But in practice, unless the number of dlls is enormous (hundreds) these overheads a likely to be not significant.

Many dlls is more to install (and update), and means more projects to build in development.

But the balance of modularisation vs. lower overhead is always going to be highly subjective and only really answerable in the specific.

this depends but i would say yes,

it's easier to use them for future projects and also you can compile the one you are working with which can decrease the compiling time depending on how large your project/other dlls are.

Is it a better design to have more number of dll's? = Is it a better design to have more modules?

So, if that it depends of your application logic, how big is it, how many logical "layers" it uses.

It's up to a application architect(eventually you) to divide this layers.

surely it's better have more little functions that a big one, but this rule isn't true for application modules(solution projects)...

There is no right/wrong answer to your question, its just down to a matter of preference. I would say as a general rule of thumb, try to keep your DLLs to a minimum, reason being it's just easier to manage.

Classes need to merit their own DLL so if you feel you have quite a few classes that relate to specific areas of functionality (such as DAL, BLL) it is common practise to move these into their own assembly.

If you have just a few classes that perhaps relate to a specific area you can just section them off using a separate Namespace (as Mark suggested).

Category:c# Views:1 Time:2010-01-12

Related post

  • How do I update version number of dll generated by VS2005 web deployment project using NAnt 2009-06-05

    I have a NAnt script that compiles our web application, but would like to programatically update the version number of the assembly it generates. I have sourced the version numbers already and you can assume they have been stored in some NAnt variabl

  • Minimizing the number of DLLs while keeping Composite WPF modular 2009-12-08

    I've been working on a Composite WPF application and just read some good guidelines on partitioning code into assemblies. The author of the article supports minimizing the number of assemblies where possible. How do you balance making your Composite

  • error number: 0x80040707__Description: Dll function call crashed: ISRT.VerGetFileVersion 2013-06-09

    i install program this error apear and setup terminate. anyone can help me..... --------------Solutions------------- Name of the program? Which architecture Windows 7 are you running, 32 or 64 bit? Have you tried installing the program in compatibili

  • Microsoft Visual C# 2008 Reducing number of loaded dlls 2010-02-27

    How can I reduce the number of loaded dlls When debugging in Visual C# 2008 Express Edition? When running a visual C# project in the debugger I get an OutOfMemoryException due to fragmentation of 2GB virtual address space and we assume that the loade

  • Is there a cap on the number of modules WinDbg can see? 2011-11-18

    Does anyone know if there is a cap on the number of DLLs WinDbg can see ? I believe Visual Studio was once capped at 500 but I can't find a source for this claim outside of some second hand accounts at work. I'm trying to debug a hairy scenario and W

  • VSTS Code Coverage bug? 2008-09-23

    Has anyone experienced this VSTS Code Coverage "bug?" Do you have any suggestions? I am doing code coverage analysis with Visual Studio, which is generally an easy task now with the tools that are included. However, I have an issue that I can't overc

  • Calling 32bit Code from 64bit Process 2008-09-24

    I have an application that we're trying to migrate to 64bit from 32bit. It's .NET, compiled using the x64 flags. However, we have a large number of DLLs written in FORTRAN 90 compiled for 32bit. The functions in the FORTRAN DLLs are fairly simple: yo

  • difference between baseline and benchmark in performance of an application 2008-12-06

    what is a baseline and what is a benchmark? what is the best definition for these and how do you baseline a set of numbers and benchmark another set? --------------Solutions------------- HI Gagneet, I'm on the Windows performance team: here is how we

  • Does ilmerge optimize the output? 2009-01-21

    I have a number of DLLs that are merged using the ILMERGE.EXE tool from Microsoft. All the DLLs have 'optimize my code' unchecked. When trying to debug code in a web application the modules screen (in Visual Studio) shows the dll has been optimized.

  • Splitting application layers into different assemblies 2009-03-30

    There is a debate going on at my company. Some are advocating moving business, data and business entities in one assembly for Discoverability purposes. make it easy to find what you're looking for. Reduce the number of dll's we need to add to a proje

  • How is skill building for Sharepoint different from ASP.NET? 2009-04-24

    How much of ASP.NET or C# is required for Sharepoint development? Do you need experience with things like developing N layered web applications, design patterns, test driven development, strong SQL background etc? I hear that Sharepoint development i

  • Disadvantages and Advantages of separated projects/DLLs in .NET? How many of them are too much? 2009-04-27

    The question involves some other related questions, I'll just throw every single on of them feel free to answer one or many of them. What are the advantages of separating Projects/DLL? What are the disadvantages of separating Projects/DLL? If I creat

  • Porting a PowerBuilder Application to .NET 2009-05-05

    Does anyone have any advice for migrating a PowerBuilder 10 business application to .NET? My company is considering migrating a legacy PB application to .NET (C#) and I am just wondering if anyone has any experience - good or bad - that you would lik

  • Referencing the same interface in different assemblies 2009-07-14

    I want to implement architecture involving different .NET assemblies (i.e. modules). Some of these modules should provide services which are used as .NET interfaces by other modules. The modules should be loaded and registered dynamically at runtime,

  • Are ASP.NET Web Site projects inherently slow at compiling, or could I have deeper issues? 2009-07-15

    I've been working on a legacy ASP.NET Web Site (versus a Web Application) project at a client for some time now, and its slow compile time has me wondering: Are web site projects known to be slow(er) at compiling (than Web Application projects)? It's

  • What is Windows Vista's equivalent for the Version tab in Properties? 2009-08-13

    In Windows XP, whenever you right-click to select Properties to a particular DLL, you will be able to access the Version tab. In windows Vista, there is the Details table, which had some, but not all, the usual displayable items in the Version tab. I

  • What is the simplest built in way in windows to copy and rename files where the rename involves appending some before the extension 2009-08-22

    I have a directory (source) with a bunch of files and these two dlls file1.dll file2.dll I want to copy these to destination but on the copy have them renamed file1_a.dll file2_a.dll Basically append _a to every dll copied I need a very basic way to

  • What is the best way to initialize an application? 2009-09-10

    What is the best way of initializing and terminating an application? The library needs to be initialized/terminated only once and can be used by any number of dlls. Is there any standard design to accomplish this? This initialization has to be the ve

  • How can I detect the type of a dll? (COM, .NET, WIN32) 2009-09-14

    I need to process a number of dll's and exe files in a folder and determine what type of file I am dealing with: .NET, COM, Win32 or some other alien life form. I've been trying to determine the easiest way to detect the type of a DLL, what do you th

Copyright (C), All Rights Reserved.

processed in 0.100 (s). 11 q(s)