On Monday 27 October 2003 03:20, Leo Simons wrote:
1. I think KernelParameters should go into a seperate package that other packages (such as kernel) depend on. This will make it easier when creating the bootstrap process.
disagree! Recognize the tight coupling between config and component and reflect it :D
Hmmmm.... Now you got me thinking.
Perhaps this has been brought up before... Maybe it belong more on Pico/Nano mailing lists...
Since you're describing exactly what Pico does, maybe...but don't let that stop you!
Note that you're doing two things:
(1) using strong typing (2) removing most of the lifecycle
Only doing (1) but keeping the rest of the Avalon-Framework pattern:
class MyComponent implements MyService, Serviceable, Configurable
{
public void service( Component1 comp, Component2 comp )
{
/* ... */
}
public void configure( MyComponentConfig bean ) { /* ... */ }
}type-2 IoC:
class MyComponent implements MyService, Serviceable, Configurable
{
public void setComponent1( Component1 comp ) { /* ... */ } public void setComponent2( Component2 comp ) { /* ... */ }
public void setConfig( MyComponentConfig bean ) { /* ... */ }
}A long rationale about why (2) is good:
http://lists.codehaus.org/pipermail/picocontainer-dev/2003-October/001335.html and version 1: http://lists.codehaus.org/pipermail/picocontainer-dev/2003-October/001313.html
cheers!
- Leo
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
