You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Johannes Schneider <ma...@cedarsoft.com> on 2009/07/23 11:16:03 UTC

Use Guice....

It's the better Spring ;-)

Dane Laverty wrote:
> Due to the fact that nearly every substantial sample Wicket app is
> Spring-based, I imagine that there's something awesome about using Spring.
> In fact, Wicket is what has finally gotten me to start learning Spring.
> 
> I think I understand the basics of dependency injection -- configure your
> objects in xml files and then inject them into your classes -- but I'm still
> not clear on the advantage of it. I've read quite a ways into "Spring in
> Action", and the author seems to assume that the reader will automatically
> see why xml-based dependency injection is great thing. I must just be
> missing something here. What I love about Wicket is being free from xml
> files. Can anyone give me a concise explanation of how the advantages of
> Spring are worth introducing a new layer into my applications?
> 
> Dane
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Use Guice....

Posted by Peter Ertl <pe...@gmx.org>.
salve!


Am 24.07.2009 um 10:55 schrieb Jeroen Steenbeeke:

> If Dependency Injection is all you want to do then indeed Spring may  
> not be
> the best choice, but in my case at least I use it for more than  
> that, as I
> also use the Spring Transaction Manager and Spring Mailer.
> Also, Spring does seem to cater mainly to XML fetishists, but they  
> do offer
> alternatives:
> <?xml version="1.0" encoding="utf-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:context="http://www.springframework.org/schema/context"
>  xsi:schemaLocation="http://www.springframework.org/schema/beans
>    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>    http://www.springframework.org/schema/context
>    http://www.springframework.org/schema/context/spring- 
> context-2.5.xsd
> ">
> <context:annotation-config />
> <context:component-scan
>  base-package="path.to.your.beans" />
> </beans>
> After this, you just use @Component and @Autowired annotations for  
> your
> beans and dependencies, respectively. No need to muck around in XML  
> aside
> from some initial config.
> Spring does not need to be painful.
> Cheers, Jeroen
>
> DISCLAIMER: I have never used Guice
>
> 2009/7/23 francisco treacy <fr...@gmail.com>
>
>> http://fiber-space.de/wordpress/?p=1016
>>
>> 2009/7/23 Uwe Schäfer <sc...@thomas-daily.de>:
>>> Johannes Schneider schrieb:
>>>>
>>>> It's the better Spring ;-)
>>>
>>> agreed!
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Use Guice....

Posted by Jeroen Steenbeeke <j....@gmail.com>.
If Dependency Injection is all you want to do then indeed Spring may not be
the best choice, but in my case at least I use it for more than that, as I
also use the Spring Transaction Manager and Spring Mailer.
Also, Spring does seem to cater mainly to XML fetishists, but they do offer
alternatives:
 <?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:context="http://www.springframework.org/schema/context"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-2.5.xsd
">
<context:annotation-config />
<context:component-scan
  base-package="path.to.your.beans" />
</beans>
After this, you just use @Component and @Autowired annotations for your
beans and dependencies, respectively. No need to muck around in XML aside
from some initial config.
Spring does not need to be painful.
Cheers, Jeroen

DISCLAIMER: I have never used Guice

2009/7/23 francisco treacy <fr...@gmail.com>

> http://fiber-space.de/wordpress/?p=1016
>
> 2009/7/23 Uwe Schäfer <sc...@thomas-daily.de>:
> > Johannes Schneider schrieb:
> >>
> >> It's the better Spring ;-)
> >
> > agreed!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Use Guice....

Posted by francisco treacy <fr...@gmail.com>.
http://fiber-space.de/wordpress/?p=1016

2009/7/23 Uwe Schäfer <sc...@thomas-daily.de>:
> Johannes Schneider schrieb:
>>
>> It's the better Spring ;-)
>
> agreed!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Use Guice....

Posted by Uwe Schäfer <sc...@thomas-daily.de>.
Johannes Schneider schrieb:
> It's the better Spring ;-)

agreed!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org