This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Spring and the fly likes Spring in Action - Alternatives Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring in Action - Alternatives" Watch "Spring in Action - Alternatives" New topic
Author

Spring in Action - Alternatives

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Google Guice and what else? Does the book mention about alternative IoC frameworks?


SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Joe Harry wrote:Google Guice and what else?

one more, http://www.picocontainer.org/


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
megan smith
Greenhorn

Joined: Nov 30, 2009
Posts: 22
http://www.theserverside.com/news/thread.tss?track=NL-461&ad=842284&thread_id=62686&asrc=EM_NLN_14522954&uid=3139747
Craig Walls
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 301
The book doesn't really go into comparisons with other frameworks. For one thing, Spring does more than just one thing and so depending on the perspective taken, there are *several* frameworks that compare with it. From the perspective of dependency injection, there's Guice and PicoContainer (and my friend Howard Ship might want me to mention Tapestry's DI). From a web framework perspective, there's Struts and umpteen other web frameworks. From a REST standpoint, there's Restlet, Jersey and various other JAX-RS implementations.

In other words, I could probably write a whole book on nothing but the comparisons.

Spring in Action - Unleash POJO power in your applications!
Modular Java - Discover the secret weapon to modularity on the Java platform!
XDoclet in Action - Your complete guide to code generation with XDoclet.
Sujoy Choudhury
Ranch Hand

Joined: Sep 17, 2008
Posts: 136

So, in short, you mean Spring is one single framework with all the solutions.

Thanks and Regards,
~Sujoy
Raymond Tong
Ranch Hand

Joined: Aug 15, 2010
Posts: 230
    
    2

Depends on what you are looking for.
Spring is more than Dependency Injection.
If DI is the only feature you want, you could compare it against Google Guice, PicoContainer, etc.

I have used Spring and PicoContainer.
PicoContainer wire the class for you, i.e. unlike spring, you need to specify the dependency yourself in xml files
It has a small footprint as well.

Google Guice wire the dependency through annotation.

As mentioned earlier, Spring gives you Dependency injection but also AOP, MVC, ORM, etc.
Craig Walls
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 301
Raymond Tong wrote:PicoContainer wire the class for you, i.e. unlike spring, you need to specify the dependency yourself in xml files


Hold on...just to avoid spreading misinformation, XML files are only one way to wire up objects in Spring. Spring also has Java configuration which is similar to the XML configuration, except that it's expressed in Java (with the power of Java available) instead of XML. Also component scanning and auto wiring offers annotated DI with minimal XML. And Spring also supports JSR-330 and the @Inject annotation.

To be abundantly clear: There are many ways to do DI in Spring.
Raymond Tong
Ranch Hand

Joined: Aug 15, 2010
Posts: 230
    
    2

Craig Walls wrote:
Raymond Tong wrote:PicoContainer wire the class for you, i.e. unlike spring, you need to specify the dependency yourself in xml files


Hold on...just to avoid spreading misinformation, XML files are only one way to wire up objects in Spring. Spring also has Java configuration which is similar to the XML configuration, except that it's expressed in Java (with the power of Java available) instead of XML. Also component scanning and auto wiring offers annotated DI with minimal XML. And Spring also supports JSR-330 and the @Inject annotation.

To be abundantly clear: There are many ways to do DI in Spring.

Sorry. Almost forgot spring has the annotation, because myself seen most project using XML.
Actually I just checked the spring web site and it stated that the java configuration project considered as "decommissioned".
What would be the reason behind?
Craig Walls
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 301
Raymond Tong wrote:Actually I just checked the spring web site and it stated that the java configuration project considered as "decommissioned".
What would be the reason behind?


Because now (as of Spring 3.0) it's formally part of the Spring Framework itself (not a separate project).
Bojan Tomic
Greenhorn

Joined: Apr 08, 2008
Posts: 25
Joe Harry wrote:Google Guice and what else?

CDI, the new standard perhaps? That's talking DI.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring in Action - Alternatives
 
Similar Threads
PriorityQueue
Invoke a method in EL?
input file element
Servicing *all* requests
Printing a PDF on client side