1

Not sure why it is hard to find exact definition of 'Module' in inversion of control.

I understand 'Component' is well defined and easily found in IoC related articles as it is the one being registered and resolved as denpency to be provided.

Somehow it is not explicitly mentioned what Module is.

swcraft
  • 2,014
  • 3
  • 22
  • 43

1 Answers1

3

Few of the terms that relate to Dependency Injection are well-defined. What you call IoC, I call Dependency Injection (DI).

Terms like server, service, client, component are not at all well-defined. They mean all sorts of things to different people in different contexts.

You don't write what DI Containers you've looked at, or even on which platform (.NET, Java, etc.), but some DI Containers come with a 'module' system that enables you to package a bundle of configuration code that defines (parts of) your application. IIRC, Castle Windsor calls them Installers, Autofac calls them Modules, StructureMap calls them Registries, and so on.

FWIW, one of my goals with my book about DI was to provide a consistent pattern language related to it. In it, I consistently call them DI Containers, the main pattern is called Constructor Injection, etc.

I am, however, not a proponent of using DI Containers. Instead, I endorse Pure DI.

Mark Seemann
  • 225,310
  • 48
  • 427
  • 736