User Documentation

One minute description
Two minute tutorial
Five minute introduction
Advanced Topics
FAQ
Container
Components
Terminology
Mock Objects
Inversion of Control Types

Patterns

Inversion of Control 
Dependency Injection 
Constructor Injection 
Setter Injection 
Interface Implementation Separation 
Lifecycle 
Antipatterns

Developer Documentation

 Current build status
How To Contribute
Relative Volunteering
Release Process

Project Information

Slogan
Mailing lists
Source Repositories
Open Issues
Blog entries 
Statistics
Team
Sister Projects
TShirts

Miscellaneous

Differentiators
Nirvana

Full Sitemap

Feeds


Site
News
Propaganda

Overview

Various declarations on PicoContainer.

Mike Hogan on nanocontainer-dev (17th June 2003)

Fellas, congrats on the best IoC container I've seen. I've played with Avalon, XWork and Pico/Nano and the latter is the best I have used. (link).

Mathias Bogaert (25th June 2003)

paul_hammant: While it is fresh. Could you write a couple of paragraphs on you intial reaction and why you warmed to Pico ?


m_bogaert: sure


m_bogaert: I'll put it on email


paul_hammant: I'll put on the propaganda page


paul_hammant: please also don't hold back on how much of a hard time you gave Aslak


m_bogaert: I do realize that I can moan about stupid naming stuff


m_bogaert: but that's me, the perfectionist


paul_hammant: no dude, from a couple of days ago…


paul_hammant: not the rename stuff


paul_hammant: when you were fonder of type2 Setter Injector


paul_hammant: the intial YIM chat story you had with aslak


m_bogaert: ah ok


m_bogaert: yep I still have it...rereading to see how I evolved


paul_hammant: we can direct "instant objecters" to it in future to save time


m_bogaert: so aslak stated that I was bitching? hehe


m_bogaert: or giving a hard time?


paul_hammant: I was sitting next to him dude


paul_hammant: he did not say you were bitching


paul_hammant: it was clear though that he had an uphill struggle convincing you


paul_hammant: if it was some one he did not like, he might have given up and we would have made an enemy


paul_hammant: best to get the "user story" now to save time in future


m_bogaert: hehe


m_bogaert: ok sent

Here is what you asked for, my initial reaction on Type 3 Constructor Injector IOC:

When I started out with XWork IOC (type 2 Setter Injector ), I really liked the clean enabler interfaces, and the fact that you could switch implementations and scopes by defining it in an XML file. Also the integration with XWork, the fact that I had my own little Actions implement eg. ConfigurationManager was so neat and clean. I was in love.

Then came along

Type 3 Constructor Injector IOC. My initial reaction was 'aaarg where would my nice enabler interfaces fit?', because ForgotPasswordAction implements UserManagerAware looked so sexy. So I ignored it for a while and kept on converting my components into type 2 Setter Injector IOC. Converting. Converting. Damn, soooo many blahAware interfaces. Then I started thinking again. A component should manage itself. A component should enforce their dependencies. A component should not live without context (other components set on it). Type 2 Setter Injector IOC doesn't support this all, AND makes me write 2 classes for each component (the component and the enabler).After a chat with Aslak, I saw the light, and the next day it struck me… type 3 Constructor Injector was a better solution then type 2 setter Injector.