# Incidental Inversion of Control

DevFeed: [Incidental Inversion of Control](<https://devfeed.tech/articles/incidental-inversion-of-control-33348.md>)

Original publisher: [Read original article](<https://timkellogg.me/blog/2010/05/28/incidental-inversion-of-control>)

Published: 2010-05-28T00:00:00Z

Content type: opinion

Language: en

Sources: [Tim Kellogg](<https://devfeed.tech/sources/tim-kellogg.md>)

Topics: [IoC (Disambiguation)](<https://devfeed.tech/topics/ioc.md>), [Spring Framework](<https://devfeed.tech/topics/spring-framework.md>), [ASP.NET](<https://devfeed.tech/topics/aspnet.md>), [Java](<https://devfeed.tech/topics/java.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [XML](<https://devfeed.tech/topics/xml.md>)

Tags: [asp-net](<https://devfeed.tech/tags/asp-net.md>), [java](<https://devfeed.tech/tags/java.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [programming](<https://devfeed.tech/tags/programming.md>), [spring-framework](<https://devfeed.tech/tags/spring-framework.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>), [xml](<https://devfeed.tech/tags/xml.md>)

## AI overview

The article explains Inversion of Control (IoC) as a framework design approach in which frameworks handle common work and invoke application code when appropriate. It discusses examples in Java web applications and ASP.NET, then describes an eQube scheduler that uses XML configuration, event hooks, and JavaScript to automate reports with different filter configurations.

## Source excerpt

This morning I started reading about the Spring Framework and, as usual, I followed a rabbit hole to learn what the phrase Inversion of Control (IoC) means. IoC is also known as the Hollywood Effect ("don't call us, we'll call you"). A lot of programming frameworks use an inversion of control to take care of the bulk of the work and leave your code to perform its task (and only its task).Most web frameworks are a good example of IoC. In Java web applications, the framework takes care of all HTTP complexities and turns control over to your servlet or JSP when the time is right. This leaves your JSP to process the request and return a response - easy! The ASP.NET framework has an excellent inversion of control with its postback model. The framework allows for applications to be built very similar to Windows applications - the underlying framework takes care of display issues and calls parts of the applications code when the time is right. A lot of these calls to code are handlers for events like Click, Load, and others.As I read about this "new" concept I began to realize that it wasn't new at all. ASP.NET and J2EE use it extensively. In fact, I have created such a framework without realizing what I created. In the middle of last year I created a pluggable scheduler interface for our eQube environment that allows the programmer to simply specify report names and filter values via XML, and when it comes time to do something special, the programmer can hook into events and have the framework execute some JavaScript code to do something special.I stumbled into creating this framework after doing several short projects that required some boilerplate code to interface with the eQube APIs. It all happened quite innocently, but having taken the incidental route to IoC framework I have gotten much more value than I thought I would. For instance, it is suddenly very easy to run a report with 400 different filter configurations. I just put together some XML to spec the report a