IoC Utils aims to provide an abstraction to a chosen IoC framework. Using IoC Utils it is possible to integrate an IoC framework within a project without the worrying with the impact of code evolution of IoC technology change.
Keep in mind that there's no standard specification for IoC so this integration might not be totally seamless. Some key features might be lost on the integration process as the chosen underlying IoC framework might not support all the operations. Read more on this subject in the FAQ. |
Explaining the concept behind IoC frameworks is beyond the scope of this guide. There are several good explanations available on the web. The one on Wikipedia is a pretty good one.
Another key concept behind IoC Utils and IoC frameworks is dependency injection
It follows a list of some common Java IoC frameworks:
There are other IoC frameworks and this list should not be seen as a classification. It merely contains frameworks analyzed by the IoC Utils team when designing the toolbox.
An IoC utility like IoC Utils should have the following key features:
The first two can be static or dynamic features. Interfaces and implementations can be bound at coding time, during the service registry creations, or a "service finder" can be employed to search for service implementation inside JARs. This is a very handy feature commonly named "drop-in JARs". There's more information on this topic below but it is important to stress that IoC Utils features an automation to support drop-in JARs. Even if the underlying framework doesn't support this behavior (as is the case of the default IoC implementation provided, the Google Guice), IoC Utils provides means for it.
Some IoC frameworks offer many more features, but for IoC Utils the list above suffices. It's possible, though, to extend IoC Utils so it can provide more features. See the new implementations page for more on this topic.
For a more in-depth coverage on the provided IoC Utils API and it's features, please refer to the javadocs.
For a detailed user guide on the Google Guice API check the Google Guice 1.0 User's Guide.
The user guide will cover the following topics: