Javascript IoC / DI frameworks

dependency-injection, ioc-container, javascript

Solution

Please have a look into wire.js. This is my choice and it works great.

The main features are:

- Simple, declarative dependency injection

- A flexible, non-invasive connection infrastructure

- Application lifecycle management

- Powerful core tools and plugin architecture for integrating popular frameworks and existing code.

- Support for both browser and server environments

Also please check some alternatives npm modules for DI

Problem

For strongly typed static languages like Java, IoC / DI frameworks / toolkits are invaluable to decouple the complex systems thus make the sub-components unit testable and their composition fluently. Most of us cite that Javascript as loosely typed dynamic language already offers the major benefits of IoC / DI in spirit, while some insist that higher level abstraction / implementation should be in place. For the latter, what are those common IoC / DI implementations in Javascript realm?

Original source