--- "Pilgrim, Peter" <[EMAIL PROTECTED]> wrote:
> > -----Original Message-----
> > From: Konstantin Priblouda
> [mailto:[EMAIL PROTECTED]
> > 
> > 
> > --- Joe Germuska <[EMAIL PROTECTED]> wrote:
> > 
> > > 
> > > What is your antecedent for "this"?  Having an
> > > ActionCommand 
> > > interface?  Using an IoC container as an
> > > ActionFactory?  Having a 
> > > ThreadLocal store the current ActionContext?
> > 
> > action factory going to IoC container for actions 
> > exists already. ( Pico/Nanocontainer ) 
> > 
> > I even looked at the possibility to obtain tuile
> > controllers from IoC, but it's  really
> difficult...
> > 
> > regards,
> > 
> 
> What is the use-case of obtaining TilesController
> from IoC container?
> 
> It does not make sense to me. If Struts or other MVC
> container
> keeps a record of the TilesController (or Actions,
> ActionForm etc)
> then the component can be retrieved from Struts
> through the API
> at the correct invocation time.


It is the same use case as obtaining action from IoC
container. Advantages are clear - action/controller
does not need to know:
 - what IoC we are using
 - how ( and where ) business logic objects are
obtained


A lot of things can be made really simple and easy to
test if they do not know about MVC framework. And they
can be reused.
( for example menu structures, access counters,
declarative security... )

> 
> Usually I think it is the other way around.
> 
> Inside your TilesController (or Action, ActionForm)
> you want
> to look up a service bean from a IoC assembler.

This is usually considered antipattern in IoC world. 


I put a smal demo to show to my pimps - compiled
deployable .war:
  http://www.pribluda.de/jobdemo.war

And sources are donated to picocontainer:
http://cvs.picocontainer.codehaus.org/viewrep/picocontainer/java/jobdemo

It's webwork, but the same technique works with struts
actions ( but not with tile controlers. yet :) ) 

regards,

----[ Konstantin Pribluda ( ko5tik ) ]----------------
Plugins for xdoclet-2 are released. check it out at:
http://www.sourceforge.net/projects/xdoclet-plugins/
----[ http://www.pribluda.de ]------------------------


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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

Reply via email to