| Inversion of Control pattern or dependency injection |
|
|
| Saturday, 29 April 2006 12:36 | ||||||||
|
You do not create your objects but describe (using cofiguration file) how
they should be created and wired together in code. A container (for ex: in
case of Spring framework, the IOC container) is then responsible for
hooking it all up.
In a typical IOC scenario, the container creates all the objects, wires them together by setting the necessary properties, and determines when methods will be invoked. The three implementation pattern types for IOC are: Type 1 Services need to implement a dedicated interface through which they are provided with an object from which they can look up dependencies (for example, additional needed services). Type 2 Dependencies are assigned through JavaBeans properties (for example, setter methods). Type 3 Dependencies are provided as constructor parameters and are not exposed as JavaBeans properties.
Powered by !JoomlaComment 3.20
3.20 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."
|
| Another articles: |
|---|
|

























