InversionOfControl |
UserPreferences |
The PEAK Developers' Center | FrontPage | RecentChanges | TitleIndex | WordIndex | SiteNavigation | HelpContents |
Inversion of Control is a pattern for reducing coupling between classes/components and the components they use. Instead of a component directly instantiating its dependencies, it defines them declaratively, and relies on its clients or environment to provide them. This makes it easier to reuse the component with different collaborators.
For a simple example of using peak.binding to do this, see PeakDatabaseApplications. (ComposingHierarchies provides a more complex example.) For more info on the Inversion of Control pattern (also known as the Dependency Inversion Principle), see: