Hollywood Principle – IoC (Inversion Of Control )

in a Commandline driven sequential program, where the user inputs data and program processes those inputs, I control when these methods are called. but in the window example I don’t. Instead I hand control over to the windowing system.

It then decides when to call my methods, based on the bindings I made when creating the form. The control is inverted – it calls me rather me calling the framework. This phenomenon is Inversion of Control (also known as the Hollywood Principle – “Don’t call us, we’ll call you”). – more here

Etymology :

  • the term Inversion of Control first came to light in Johnson and Foote’s paper Designing Reusable Classes
  • John Vlissides wrote a column for C++ report that provides a good explanation of the concept under the ‘Hollywood Principle’
Advertisements

Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s