aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Injecting Simple properties ? Guice or Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Injecting Simple properties ? Guice or Spring" Watch "Injecting Simple properties ? Guice or Spring" New topic
Author

Injecting Simple properties ? Guice or Spring

Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Which of the two is best incase you are having very simple requirement of Injecting some properties in the beans.

Thanks,
Rahul


Rahul Juneja
ThoughtClicks - http://techlabs.thoughtclicks.com
Dhanji Prasanna
author
Ranch Hand

Joined: Aug 30, 2009
Posts: 38
They are both equally suitable to this task. They take different approaches but end up with the roughly the same result.

Dhanji.


Software Engineer at Google

http://twitter.com/dhanji
Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Dhanji,

Thanks, but what is the advantage of using one over another.

Thanks,
Rahul
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3829

Rahul Juneja wrote:.. but what is the advantage of using one over another.


I think Guice is focused directly (& only) on DI whereas Spring which is a complete solution for enterprise development so that may depend on your project requirement (whether you need other features provided by the spring or not).


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Injecting Simple properties ? Guice or Spring