Link Details

Link 339433 thumbnail
User 1 avatar

By rick
via stereolambda.wordpress.com
Published: Jan 10 2010 / 10:08

I recently came across Guice, a framework that is widely considered an alternative / competing Dependancy Injection (DI) framework to Spring’s IoC container. After reading the documentation (which was very good), and playing around a little, I started to read the numerous articles blog posts comparing the two, as I was personally very surprised that there was even to be a comparison to be made.
  • 12
  • 3
  • 3993
  • 0

Comments

Add your comment
User 388907 avatar

MCII replied ago:

-2 votes Vote down Vote up Reply

Yet another Spring devotee.

User 306525 avatar

Dave Newton replied ago:

0 votes Vote down Vote up Reply

Oh noes!

The bottom line is that Spring serves a purpose for some classes of problems (customization being one of the most obvious--without it, or something similar, a lot of what I do would be *substantially* harder).

Don't you get bored ranting about DI and Spring?

User 696737 avatar

william.shulman replied ago:

0 votes Vote down Vote up Reply

newton_dave-

Did you read the blog post? It is not a rant against Spring at all. It is gloriously praising the power of the Spring IoC container, and what you can do with it.

User 464238 avatar

Kevin Lee replied ago:

0 votes Vote down Vote up Reply

william.shulman, newton_dave's comment is a reply to MCII's. It has nothing to do with the blog post.

User 696737 avatar

william.shulman replied ago:

0 votes Vote down Vote up Reply

Doh! Indeed. His comment makes much more sense now. Sorry newton_dave :)

User 261293 avatar

joecoder replied ago:

0 votes Vote down Vote up Reply

I don't believe the Spring IoC container is marketed only as a DI framework. The framework documentation and descriptions are very clear that it's also a bean (and bean graph) configuration framework, which is what the article praises so highly. Although the author prefers XML-based configuration, the trend in Spring has been to add more and more code-based and by-convention configuration and minimize the need for XML.

User 131196 avatar

Jakob Jenkov replied ago:

0 votes Vote down Vote up Reply

Yes, Spring is so much more than just DI.

Another option could have been Butterfly DI Container - comparing Butterfly Container Script with Spring's inferior XML configurations. Butterfly Container Script is designed to take bean configuration to the limit, allowing a seamless integration between ordinary application configuration and bean configuration. It supports internationalization too.

And no, I don't believe @Inject is the future of DI. Hopefully it's the past. :-)

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Java Performance Optimization
Written by: Pierre-Hugues Charbonneau
Featured Refcardz: Top Refcardz:
  1. Design Patterns
  2. OO JS
  3. Cont. Delivery
  4. Java EE7
  5. HTML5 Mobile
  1. Node.js
  2. Debugging JavaScript
  3. OO JS
  4. JSON
  5. Ajax