• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Spring in Action - Alternatives

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Google Guice and what else? Does the book mention about alternative IoC frameworks?
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Harry wrote:Google Guice and what else?


one more, http://www.picocontainer.org/
 
Greenhorn
Posts: 22
 
author
Posts: 422
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 136
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, in short, you mean Spring is one single framework with all the solutions.
 
Ranch Hand
Posts: 258
2
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 422
13
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 258
2
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 422
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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).
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Harry wrote:Google Guice and what else?


CDI, the new standard perhaps? That's talking DI.
 
reply
    Bookmark Topic Watch Topic
  • New Topic