Link Details

Link 65114 thumbnail
User 111696 avatar

By bloid
via javablog.co.uk
Published: Feb 06 2008 / 17:28

Everyone’s familiar with using factories and singletons. Google’s Guice library offers an alternative approach based on dependency injection. Their pitch is (paraphrasing) “Do you use factories and singletons? We can offer you a better approach! All you have to do is rewrite your entire codebase with magic annotations.” That’s a heavy pitch. Like a stranger proposing marriage and moving to Denmark. You of course will say no, even if they do look hot and you’ve heard good things about Legoland. This post shows a very simple use of Guice. Think of it as a first date with no strings attached.
  • 10
  • 1
  • 1127
  • 385

Comments

Add your comment
User 236137 avatar

dzonelurker replied ago:

0 votes Vote down Vote up Reply

Looks better than Spring but the example lacks necessary explanations.

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.

Voters For This Link (10)



Voters Against This Link (1)