RE: [picocontainer-dev] The Visitor on Pico
Jörg Schaible <[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Paul,
________________________________
From: Paul Hammant
Sent: Sunday, May 20, 2007 10:08 PM
Subject: [picocontainer-dev] The Visitor on Pico
I've never liked this. I mean I like the visitor pattern for things like ASM, but it seemed gratuitous to shove it into Pico back in the day.
Originally Lifecycle's breadth first start() was tied to it. Then we put in a more conventional traversal.
Why don't I like it ?
Consider that child containers can choose different CAF, Lifecycle, Montor to parents. They can also not register themselves with parent, so even start/stop does not cascade.
The visitor concept seems to transcend these choices. Indeed, a container cannot block/veto visiting.
I know people use this - can they speak up and give real world examples? Pete ?
________________________________
The visitor is not used for the LC anymore, but it is used e.g. in remoting to collect the JMX enabled components. But I have to admit, that even there the process is not optimal (have a look at the efforts to avoid double registration).
The visitor is great for inspecting the Pico related structure though and might help to build a GUI.
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email