Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • It's homegrown. Better, more widely-understood frameworks have come along.
  • Unit testing is unnecessarily complicated. The base Module class depends on a Server instance being available in order to function, and the Server base class is not easily mocked.

Requirements

Use standard, well-known frameworks/libraries to:

  • Resolve inter-module dependencies via dependency injection
  • Provide hooks to initialize/de-initialize modules when the webapp container starts and stops
  • Allow re-configuration and plugging in of alternative modules without re-compiling

Non-requirements

This work will NOT attempt to:

...

 

Spring

PicoContainer

Guice

Supports start/stop lifecycle hooks for components

Yes (interface or xml-configured)

Yes (interface or annotation)

No

Supports autowiring

Yes

Yes

Yes

Supports in-code wiring and configuration

Yes (JavaConfig)

Yes

Yes

Supports external wiring (outside of code)

Yes (xml)

No

Not directly (but it's possible)

Supports external config (outside of code)

Yes (xml and/or properties)

No

Yes (Names.bindProperties)

OSGi-Friendly

Yes (Spring-DM)

Unknown

Yes (Guice-Peaberry)

JSR-330 Support

Yes, 3.0+

In Progress

In Progress

Jar Footprint (non-OSGi)

750kb

300kb

650kb

Implementation Principles

  1. Prefer constructor injection to setter injection
  2. Minimize coupling of code with DI framework
  3. Avoid refactoring

Implementation Steps

  1. Pick a framework.
  2. Xyz

Current Inter-Module Dependencies

...