Skip to content

WOInject is a framework to enable dependency injection into WebObjects applications.

License

Notifications You must be signed in to change notification settings

hprange/woinject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status License

WOInject

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

Requirements

Features

  • 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.

Installation

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:

  1. Download the woinject-1.4.1-bin.zip package.
  2. Add the woinject.jar and the other required libraries to the build path.

Usage

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() };
	}
}

About

About

WOInject is a framework to enable dependency injection into WebObjects applications.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages