"…mais ce serait peut-être l'une des plus grandes opportunités manquées de notre époque si le logiciel libre ne libérait rien d'autre que du code…"

Java5, annotations

Posted by patrick sur mars 17, 2007


-GUICE: http://google-code-updates.blogspot.com/2007/03/guice-googles-internal-java-dependency.html

Google has been using a blazingly fast, innovative, Java 5-based dependency injection framework in mission critical applications for quite some time.

The project is lead by Bob Lee, and we are pleased to say that we have released it to the community as open source software.

Guice wholly embraces annotations and generics, thereby enabling you to wire together and test objects with less effort than ever before. Annotations finally free you from error-prone, refactoring-adverse string identifiers.

Guice injects constructors, fields and methods (any methods with any number of arguments, not just setters). Guice includes advanced features such as custom scopes, circular dependencies, static member injection, Spring integration, and AOP Alliance method interception, most of which you can ignore until you need it.

Guice already has a community around it, and already powers Struts 2’s plugin architecture.

We asked Bob Lee a few questions about the project:

Why was Guice created?

We created Guice hoping to write less code and break up a multi-million line app. We looked at existing solutions, but we saw a lot of doors opened by the new Java 5 features. When I started from scratch I followed a use case driven approach and built a real application. As I wrote I was constantly asking myself « how do I really want to be writing this? ».

I value pragmatism and followed Josh Bloch’s API design advice, especially, « when in doubt, leave it out. »

Finally, we strove most of all for maintainability. Can a new programmer sit down at a million line code base and maintain it? We think type safety is a huge factor here.

Who should use Guice?

Anyone writing Java code. We see Guice as a lighter weight alternative to the factory pattern.

More information:

Labels: , ,


Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )


Connexion à %s

%d blogueurs aiment cette page :