Ninject alternatives and similar packages
Based on the "IoC" category.
Alternatively, view Ninject alternatives based on common mentions on social networks and blogs.
-
Scrutor
Assembly scanning and decoration extensions for Microsoft.Extensions.DependencyInjection -
Unity
This repository contains all relevant information about Unity Container suit -
Castle Windsor
Castle Windsor is a best of breed, mature Inversion of Control container available for .NET -
Microsoft.Extensions.DependencyInjection
The default IoC container for ASP.NET Core applications. -
StructureMap
A Dependency Injection/Inversion of Control tool for .NET -
Simple Injector
An easy, flexible, and fast Dependency Injection library that promotes best practice to steer developers towards the pit of success. -
TinyIoC
An easy to use, hassle free, Inversion of Control Container for small projects, libraries and beginners alike. -
DryIoc is fast, small, full-featured IoC Container for .NET
DryIoc is fast, small, full-featured IoC Container for .NET -
VS MEF
Managed Extensibility Framework (MEF) implementation used by Visual Studio -
Meet Grace
Grace is a feature rich dependency injection container library -
Stashbox
A lightweight, fast, and portable dependency injection framework for .NET-based solutions. -
Simplify.DI
Simplify is an open-source set of lightweight .NET libraries that provide infrastructure for your applications. DI and mocking friendly. -
ServiceLayer
Design and Implement ServiceLayer that Integrated With FluentValidation -
AdaskoTheBeAsT.FluentValidation.SimpleInjector
FluentValidation extensions to SimpleInjector -
AdaskoTheBeAsT.AutoMapper.SimpleInjector
AutoMapper extensions to SimpleInjector
Access the most powerful time series database as a service
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Ninject or a related project?
README
Ninject
Ninject is a lightning-fast, ultra-lightweight dependency injector for .NET applications. It helps you split your application into a collection of loosely-coupled, highly-cohesive pieces, and then glue them back together in a flexible manner. By using Ninject to support your software's architecture, your code will become easier to write, reuse, test, and modify.
Write your code so it's flexible...
public class Samurai {
public IWeapon Weapon { get; private set; }
public Samurai(IWeapon weapon)
{
this.Weapon = weapon;
}
}
...and let Ninject glue it together for you.
public class WarriorModule : NinjectModule
{
public override void Load()
{
this.Bind<IWeapon>().To<Sword>();
}
}
Features:
Focused. Too many existing dependency injection projects sacrifice usability for features that aren't often necessary. Each time a feature is added to Ninject, its benefit is weighed against the complexity it adds to everyday use. Our goal is to keep the barrier to entry - the baseline level of knowledge required to use Ninject - as low as possible. Ninject has many advanced features, but understanding them is not required to use the basic features.
Sleek. Framework bloat is a major concern for some projects, and as such, all of Ninject's core functionality is in a single assembly with no dependencies outside the .NET base class library. This single assembly's footprint is approximately 85KB when compiled for release.
Fast. Instead of relying on reflection for invocation, Ninject takes advantage of lightweight code generation in the CLR. This can result in a dramatic (8-50x) improvement in performance in many situations.
Precise. Ninject helps developers get things right the first time around. Rather than relying on XML mapping files and string identifiers to wire up components, Ninject provides a robust domain-specific language. This means that Ninject takes advantage of the capabilities of the language (like type-safety) and the IDE (like IntelliSense and code completion).
Agile. Ninject is designed around a component-based architecture, with customization and evolution in mind. Many facets of the system can be augmented or modified to fit the requirements of each project.
Stealthy. Ninject will not invade your code. You can easily isolate the dependency on Ninject to a single assembly in your project.
Powerful. Ninject includes many advanced features. For example, Ninject is the first dependency injector to support contextual binding, in which a different concrete implementation of a service may be injected depending on the context in which it is requested.
Everything else is in Extensions
Yes, sounds slim and focused, but where is the support for all the features that the competitors have?
Generally, they are maintained as specific focused extensions with owners who keep them in sync and pull in new ideas and fixes fast. These are summarized on the extensions section of the project website. Most are hosted alongside the core project right here.
License
Ninject is intended to be used in both open-source and commercial environments. To allow its use in as many situations as possible, Ninject is dual-licensed. You may choose to use Ninject under either the Apache License, Version 2.0, or the Microsoft Public License (Ms-PL). These licenses are essentially identical, but you are encouraged to evaluate both to determine which best fits your intended use.
Refer to LICENSE.txt for detailed information.
Changes history
Resources
*Note that all licence references and agreements mentioned in the Ninject README section above
are relevant to that project's source code only.