Luke SpringWalker
Luke SpringWalker

Reputation: 1592

Does every framework rely on IoC?

I've been asking myself for a while about the relation between frameworks and IoC.

Let's have a look to some definitions (taken from this forum):

IoC is a generic term meaning rather than having the application call the methods in a framework, the framework calls implementations provided by the application.

A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client.

A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points.

(we can say that "You call a Library, a Framework calls you").

So, the questions is: does having a framework implies that you have IoC involved? If not, any examples?

Many thanks.

Upvotes: 1

Views: 312

Answers (1)

Steven
Steven

Reputation: 172835

If you look at the definition for a framework in the Framework Design Guidelines, you see that the writers think there is a direct relationship between IoC and a framework, or more specifically: To be able to be called a framework, it needs to apply IoC.

So according to that definition every framework relies on IoC.

Upvotes: 1

Related Questions