Versions Compared

Key

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

...

How do they compare? Several articles have been written comparing Spring and Guice, as well as all three. As many have pointed out, Spring and Guice are more than DI frameworks. For our purposes, we should consider the attributes of each that are most relevant to the problem at hand:

 

Spring

PicoContainer

Guice

Supports start/stop lifecycle hooks for components

Yes (interface or xml-configured)

Yes (interface or annotation)

?

Requires component coupling to framework

No

Yes

Yes

Supports external wiring (outside of code)

Yes (xml)

?

?

OSGi-Friendly

Yes (Spring-DM )

?

Yes (Guice-Peaberry)

JSR-330 Support

Yes, 3.0+

In Progress

In Progress