inversion of control

A collection of 3 posts

A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Aug 26, 2018 dependency injection inversion of control

Back to basics: Dependency Injection

After years of near-ubiquitous usage of Dependency Injection, I see more and more posts and talks questioning its value. Some even go to the point where they argue against it. Most of it however is based on a whole lot of misconceptions, half-truths and blatant lies. In this post, I’d like to go back to the roots of DI, describe some related features and lists available frameworks.

Nicolas Fränkel
Apr 30, 2017 spring framework inversion of control service loader spring.factories

Java Service Loader vs Spring Factories Loader

Inversion of Control is not only possible at the class level, but at the module level. OSGi has been doing it for a long time. However, there are IoC approaches directly available in Java, as well as in Spring. Out-of-the-box, the Java API offers a specific form of Inversion of Control. It’s implemented by the Service Loader class.

Nicolas Fränkel
Jul 29, 2012 inversion of control method injection

Method injection with Spring

Spring core comes out-of-the-box with two scopes: singletons and prototypes. Singletons implement the Singleton pattern, meaning there’s only a single instance at runtime (in a JVM). Spring instantiate them during context creation, caches them in the context, and serves them from the cache when needed (or something like that). Prototypes are instantiated each time you access the context to get the bean.

Nicolas Fränkel
A Java geek © 2008-2026
v. bc04c88300c3ec997ce8470fbff5395dc9e518b1/13264050981
Latest Posts