DI & IOC study - XianWorld/xxxgame GitHub Wiki

Technology

C# & .Net

patterns & practices: Prism

Prism provides guidance designed to help you more easily design and build rich, flexible, and easy-to-maintain Windows Presentation Foundation (WPF) desktop applications, Silverlight Rich Internet Applications (RIAs), and Windows Phone 7 applications. Using design patterns that embody important architectural design principles, such as separation of concerns and loose coupling, Prism helps you to design and build applications using loosely coupled components that can evolve independently but that can be easily and seamlessly integrated into the overall application. These types of applications are known as composite applications.

Prism includes reference implementations, QuickStarts, reusable library code (the Prism Library), and extensive documentation. This version of Prism targets the Microsoft .NET Framework 4.0 and Silverlight 4 and includes new guidance around the Model-View-ViewModel (MVVM) pattern, navigation, and the Managed Extensibility Framework (MEF). Because Prism is built on the .NET Framework 4.0 (which includes WPF) and Silverlight 4, familiarity with these technologies is useful for evaluating and adopting Prism.

Other containers: Castle Windsor, StructureMap, and Spring.NET, Pico and Avalon

Caliburn-Micro/Caliburn.Micro

A small, yet powerful framework, designed for building applications across all XAML platforms. Its strong support for MV* patterns will enable you to build your solution quickly, without the need to sacrifice code quality or testability. http://caliburnmicro.com/

patterns & practices - Unity

The Unity Application Block (Unity) is a lightweight extensible dependency injection container with support for constructor, property, and method call injection.

Unity addresses the issues faced by developers engaged in component-based software engineering. Modern business applications consist of custom business objects and components that perform specific or generic tasks within the application, in addition to components that individually address cross cutting concerns such as logging, authentication, authorization, caching, and exception handling.

ninject/Ninject :1234:

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.

Castle Project

StructureMap

Spring.NET

Unity3D

StrangeIoC

A lightweight, extensible Inversion-of-Control micro-framework, written specifically for C# and Unity

    • Website

Key features

  • Core framework lets you bind anything to anything

  • Dependency Injection: Map singletons, values, factories and names; Setter/constructor DI; DI MonoBehaviours; Tag preferred constructor; Postconstruct; Polymorphic binding; Performant reflection

  • Shared event bus: communicate with any point in your app

  • Map events to Commands/Sequences to separate business logic

  • View mediation

  • Optional MVCS

  • Multiple contexts with cross-context bus

  • Don't see just what you need? Easy to extend!

  • strangeioc/strangeioc Current version: v0.7.0

Website: http://strangeioc.github.io/strangeioc/

Strange attractors create predictable patterns, often in chaotic systems.

Strange is a super-lightweight and highly extensible Inversion-of-Control (IoC) framework, written specifically for C# and Unity. We've validated Strange on web, standalone, and iOS, and Android.

MinIOC - An IOC framework for Unity

MinIOC is a small but flexible C# IOC framework that is fully compatible with Unity. If you are new to IOC, have a look here

With MinIOC, you can specify all your modules (http service, score service ...) in a context and the framework will automatically inject the required dependencies on the objects that need them.

Main features:

  • support injection by constructor, method and properties
  • handles instantiation of MonoBehaviours
  • handles instantiation of prefabs
  • create sub contexts to specify modules of your application
  • inject dependencies on existing objects
  • includes a sample projectto get you started

Minioc Wiki

sebas77/Svelto

Svelto IoC Container is the evolution of my first IoC container that I created as Proof of concept. Svelto IoC is extensively used in the project I am working on Robocraft (http://www.robocraftgame.com)

Please read my blog post for more information: http://www.sebaslab.com/svelto-inversion-of-control-container/

The ad hoc example can be found here: https://github.com/sebas77/Svelto-IoC-Example