avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hamilton Verissimo de Oliveira (Engenharia - SPO)" <hamilton.olive...@agenciaclick.com.br>
Subject Re: State of the Aspect
Date Mon, 08 Mar 2004 20:06:02 GMT
A more specific use case would be keep our foots on the ground :-)

So I think before discussing what LoggerAspect or SecurityAspect actually
do, we shold bring to table what we actually need - in the light of what
would make things easier.

* What Avalon provides *

A framework to write application using the well-know IoC design.

* Why this is good ? *

- The developer can focus on his application logic instead of building a
infrastructure to glue components together, provide logging, context,
parameters..
- SoC comes without pain as every piece of application will be defined by
interfaces.

* This drives us to what? *

We need component instantiation and lifecycle management. Thats it.

* Plugability is a plus! *

Ok, so each lifecycle phase/step could be plugged. If the user provides his
implementation, nice, if don't we need to use a default implementation.

* Thinking about the future *

If ones wants to use constructor to pass on parameters, context entries,
dependencies or whatever then a new lifecycle phase is required. I called
Activator phase in Castle.

* Ending with some code *

A simple usage could be:


public static void main(String[] args)
{
  Container lighweightContainer = new Container();

  // Overriding one of phases
  lighweightContainer.addPhase( Phases.Activator, new PicoActivator() );

  // without configuration is soooo goooood
  lighweightContainer.registerService( MyServiceInterface.class );

  // The class could be inspected to and a bind with MyServiceInterface
could be done...
  lighweightContainer.registerImplementation( ServiceInterfaceImpl.class,
"service" );


  MyServiceInterface voila = (MyServiceInterface) 
      lighweightContainer.getServiceManager().lookup( "service" );

}


WDYT?

--
hammett

-----Mensagem original-----
De: Jonathan Hawkes [mailto:jhawkes@adsnm.com]
Enviada em: segunda-feira, 8 de março de 2004 16:40
Para: Avalon Developers List
Assunto: Re: State of the Aspect


It might help if you can come up with a more specific use case.  What does
LoggerAspect actually do?  And what does SecurityAspect actually do?  And
how is it dependent on LoggerAspect?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message