Projects tagged ‘container’ and ‘dependency’


Jump to tag:

Projects tagged ‘container’ and ‘dependency’

Filtered by Project Tags container dependency

Refine results Project Tags injection (5) di (4) php (2) framework (2) inversion (2) control (2) ioc (2) wiring (1) event (1) dotnet (1) micro (1) gamba (1)

[5 total ]

0 Users

If you're looking for a very simple IoC library in PHP to wire up simple dependencies and you can live with constructor dependency injection this is the project for you! Features (currently): ... [More] Constructor dependency injection Ability to inject static values as constructor parameters Can traverse dependency chain and initialize a dependency structure Very simple INI style configuration Can detect circular dependency at runtime [Less]
Created 12 months ago.

0 Users

Usage Manual Using The Container As a Factory, And No More "new" Statements! In this first example we learn how to obtain class instances from a Gamba Container, and how it decouples your component ... [More] implementation from each others. Everybody knows that hardcoding is a bad practice... but whenever you place a new statement in your code, you are really taking a concrete class implementation in a hardcoded way! For example, supposing that you wants for a java.util.List implementation instance, and you choose a java.util.ArrayList: List list = (List) new ArrayList();Well, but if you want to choose another implementation for a List, you will have to change all your classes that news it. Lechuga solves this problem, since the concrete implementation class is uniquely declared in a context file as is: After declaring the class implementation, you can obtain an instance of this, calling the Gamba Container: GambaContext gc = GambaContainer.getContext("tips-context.xml"); List myList = (List) gc.getBean("myList"); Assert.assertTrue(myList instanceof List); Now, if you want to choose another implementation for a List (i.e. LinkedList), you only must have to change the class specified in a context file, and all your classes that instantiates it will obtain the new implementation: Dependency Injection Dependency Injection means to inject recursively into your requested bean instance his declared dependencies. This feature allows you to obtain a desired bean instance (obtained by a Factory, in fact), fully configured and ready to use, altought his object-dependencies are being injected. Setter Injection For example, suppose that you have in hands: In the above example, a "b" instance are being injected to an "a" instance using setter injection. When you asks the container for an "a" instance, the container works for you and performs reflect operations to do the same as the following piece of code: A a = new A(); B b = new B(); a.setB(b); return a; Constructor Injection A constructor injection is another kind of injection. For example the definition: will cause that when a "b" instance is requested, container performs: A a = new A(); B b = new B(a); return b;Gamba Container Don't Works Lazily, just Eagerly In order to prevent unexpected exception throwing at run-time, all bean definitions are parsed and loaded in context loading-time (that is, when you calls GambaContainer.getContext(...)), performing a check of all defined beans, thinking about her future life-cycle. --> [Less]
Created about 1 month ago.

0 Users

MicroContainerFramework is a dependency injection container for .NET Micro Framework
Created 10 months ago.

0 Users

A framework built around an AOP/dependency injection container
Created 4 months ago.

0 Users

This project provides a unified and real-world use case and set of classes that are used to showcase the various available Dependency Injection containers. The domain model is based on the DI overview ... [More] post at Dependency Injection in Ruby. The purpose of the project is to allow developers to easily compare the containers to make an informed decision when picking one. Performance comparisons may also be performed by using the same use case. [Less]
Created 12 months ago.