Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Injecting Simple properties ? Guice or Spring

 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the two is best incase you are having very simple requirement of Injecting some properties in the beans.

Thanks,
Rahul
 
Dhanji Prasanna
author
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are both equally suitable to this task. They take different approaches but end up with the roughly the same result.

Dhanji.
 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dhanji,

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

Thanks,
Rahul
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic