Sunday, August 19, 2018
5:52:47 PM
Users online: 0   You are here >> Home > Programming

Forums | Programming Forums search
Forum FAQ
Spring, dependency injection and/or Guice
31/7/08 8:38:09 AM

A friend asked the following -

I’ve mostly ignored the rise of the Spring framework and dependency injection. I understand that it is important to understand a software system’s dependencies so that you can test at various levels. I recently read about a new dependency injection framework called Guice (used by Google in their AdWords application and now publicly available). It tends towards static type checking using annotations, which I like (as opposed to Spring’s “write it in XML and we’ll class load it for you”).

I have a new large project where I’ll be deciding the major libraries/frameworks being selected. I’m wary of following fads, especially ones involving XML and late-late-late binding. I’m considering selecting Guice into the set of libraries used, in order to facilitate decoupling of service implementation from “medium term promised” interfaces. The application will be a rich web client (probably using GWT generated JavaScript) accessing server side logic using RPC over HTTP (again GWT generated).

Has anybody had experience in this realm that can comment on Spring, dependency injection and/or Guice?

The unshaped toad frog princess currently has a mucus brain and will splutter you will lurgi if you come anywhere near.
(Looking for a cute Dracula cat av if anyone has the patience)

31/7/08 9:01:11 AM

Dependency injection is a must if you want to be able to correctly unit test your software. Most of my dependancy injecty and IOC has been hand coded (masochist I know :p). In fact, that's how I'm doing it this morning! I've had a little play with Spring.NET (for use with NJava :p). I like Spring.NET, don't really have a problem with it, I just prefer to know exactly what's going on, which is pretty stupid actually :( Can't really offer you much advice on frameworks available for Java though...

(You might want to mention the language you're going to develop in - if you've chosen that already)

Q6600 | 4Gb PC6400 | 2 x 500Gb RAID 0 + 2 x 320 Gb RAID 0 | 19" Benq FP591 + 24" Samsung 245B + 19" Dell | 8800GTS 640 Mb + 8400GS 256 Mb | Gigabyte GA-P35-DS3P | Antec P182 | Corsair HX-620 | Thermalright 120 Extreme | Vista x64

12/8/08 4:30:29 AM

Decent vid on it here ... you don't have to watch the whole lot, the first 20 mins or so will do.



Forums | Programming