.DLL/.SO: What? Why? How? How exactly? Why so many?

Why dynamic libraries? Because:
  1. Using them decouples software updates, reducing download bandwidth.
  2. It decouples software dependencies, reducing build times.
  3. They are loaded dynamically, reducing memory use.
  4. They can be loaded selectively, reducing program size.
What should be put in a dynamic library?

The right things to put into dynamic libraries are those parts of a piece of software that are likely to change more often, as the system evolves. Dynamic libraries then make for easy updates, helping avoid users’ having to download the entire sdk (or game) each time something gets updated. File formats are always a hotspot of change, so all manner of file loaders should be kept separate from the main trunk. So are polymorphic behaviors, hardware-/platform- specific code, language/locale dependencies, etc.

 
ref/why_dll.txt · Last modified: 2006/10/06 15:54 by chuck_starchaser