I saw and done myself a lot of small products where a same piece of software is separated into one executable and several DLLs, and those DLLs are not just shared libraries done by somebody else, but libraries which are done exclusively for this software, by the same developer team. (I'm not talking here about big scale products which just require hundreds of DLLs and share them extensively with other products.)
I understand that separating code into several parts, each one compiling into a separate DLL, is good from the point of view of a developer. It means that:
- If a developer changes one project, he has to recompile only this one, and dependent ones, which can be much faster.
- A project can be done by a single developer in a team, while other developers will just use provided interfaces, without stepping into the code.
- Auto updates of the software may sometimes be faster, with lower server impact.
But what about the end user? Isn't it just bad to deliver a piece of software composed of one EXE & several DLLs, when everything could be grouped together? After all:
- The user may not even understand what are those files and why they fill memory on his hard disk,
- The user may want to move a program, for example save it on an USB flash drive. Having one big executable makes things easier,
- Most anti-virus software will check each DLL. Checking one executable will be much faster than the smaller executable and dozens of libraries.
- Using DLLs makes some things slower (for example, in .NET Framework, a "good" library must be found and checked if it is signed),
- What happens if a DLL is removed or replaced by a bad version? Does every program handle this? Or does it crash without even explaining what's wrong with it?
- Having one big executable has some other advantages.
So isn't it better from end users point of view, for small/medium size programs, to deliver one big executable? If so, why there are no tools allowing to do it easily (for example a magic tool integrated in common IDEs which compiles the whole solution into one executable, not each time, of course, but on-demand or during deployment).
This is someway similar to putting all CSS or all JavaScript files into one big file for the user. Having several files is much smarter for the developer and easier to maintain, but linking each page of a website to two files instead of dozens optimizes performance. In the same manner, CSS sprites are awful for the designers, because they require much more work, but are better from users point of view.