WOInject is an extension of the Google Guice framework created to enable the use of dependency injection with WebObjects applications and frameworks. Dependency injection (DI) is a useful technique for program modularization leading to more testable code. WOInject allows to write better APIs and decoupled code reducing the hurdle of wiring things together.
Version: 1.4.1
- Guice 5.0.1
- ByteBuddy 1.10.20
- Project Wonder 5
- WebObjects 5
- Minimal configuration: no configuration of VM agents, XML or properties is required. Initialize your application using the WOInject classes and the application is ready for dependency injection.
- Deep integration: take advantage of dependency injection and Guice's AOP support without inheriting any special classes.
- Special scopes: provide scopes to inject objects per session or request.
- Type safe: make use of Java 5 features and Guice approach to provide type safe binding configuration.
Maven users have to add the dependency declaration:
<dependency>
<groupId>com.woinject</groupId>
<artifactId>woinject</artifactId>
<version>1.4.1</version>
</dependency>
Non Maven users have to:
- Download the woinject-1.4.1-bin.zip package.
- Add the woinject.jar and the other required libraries to the build path.
ApplicationRunner.java
package my.app;
import com.woinject.WOInject;
public class ApplicationRunner {
public static void main(String[] args) {
WOInject.init("my.app.Application", args);
}
}
Application.java
package my.app;
import com.google.inject.Module;
import com.woinject.InjectableApplication;
public class Application extends InjectableApplication {
@Override
protected Module[] modules() {
return new Module[] { new MyModule() };
}
}
- Site: http://hprange.github.com/woinject
- E-mail: hprange at gmail.com
- Twitter: @hprange