Hi Jean-Francois,

On Sat, 26 Feb 2005 00:25:49 +0700, Jean-Francois Poilpret
<[EMAIL PROTECTED]> wrote:
> 
> As I said earlier on this list, I already thought about this kind of stuff
> (and implemented some "ObjectBuilder" to fulfill my needs). For me the
> following points are important to keep in mind:
> 
> - possibility to create an object based on a configuration (or part of a
> configuration): all the DependencySpecification objects would thus directly
> created from the configuration (in this case, the dependency specifications
> could be determined according to a unique name in the config, that name
> would be passed to the create method).
> 

The set of classes I was describing would be at a lower layer than
your ObjectBuilder service. The idea would be that they should make it
easier to implement such services. In addition to this lowest layer I
think it would be useful with higher abstractions which could take
care of things like injecting HiveMind services and autowiring.

> - possibility to add additional arguments in addition to dependencies of
> services or configurations (I suppose the DependencyInjector service as you
> describe it would allow for that, but if we add methods that are based on
> some configuration, then it must be possible to pass additional -runtime-
> arguments to these methods (this is only necessary for ctor-arguments
> actually, since the caller of the DependencyInjector could directly call
> setters of the created objects for such additional args)
> 

Again, the classes I had in mind would only be used by code at runtime
and wouldn't be directly exposed as a service or a configuration
point. Thus I think it should be quite easy to implement a service on
top of it.

> - possibility to inject the event wiring as well (it is not clear to me if
> your current proposal allows for this)
> 

No, it doesn't account for that, but I think it's an excellent idea. I
guess I'd have to add some kind of ListenerSpecification:

  public ListenerSpecification(EventListener listener) {...}
  public ListenerSpecification(String event, EventListener listener) {...}

--knut

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to