百度空间 | 百度首页 
               
 
查看文章
 
google-guic: Java IOC 框架.
2007/03/19 09:40

Guice, 发音为'juice', 是Google内部使用的 Java依赖注入框架.

Guice新版本宣布已经完全支持annotations 以及 generics.

Guice无配置文件,实用JDK5.0的annotation描述组件依赖,相比Spring更加简单.

Guice 能够注入 constructors, fields 以及 methods (任何方法, 任意参数, 而不仅仅是setter方法), 同时Guice还支持自定义scopes, 循环依赖, 静态成员注入, 整合Spring, 以及AOP. 相比Spring拥有更加强大的功能.

xwork2.0已经集成了Google guice容器.

同时Google guice的速度比Spring快了10倍以上.

Google guice在Google的很多项目中已经开始使用了很多个月了.

现在你也可以开始使用Google guice:

http://code.google.com/p/google-guice/

Google guice是基于Apache License 2.0.

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.

In a nutshell:

  • Guice empowers dependency injection.
  • Guice cures tight coupling.
  • Guice enables simpler and faster testing at all levels.
  • Guice reduces boilerplate code.
  • Guice is type safe.
  • Guice externalizes configuration when appropriate.
  • Guice lets you compose your application of components which are truly independent.
  • Guice reports error messages as if they will be read by human beings.
  • Guice is the anti-static.
  • Guice is small and very fast.

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.

An earlier version of Guice already powers Struts 2's plugin architecture. We've been running Guice in mission critical applications for months, and now you can, too. We hope you enjoy Guice as much as we do.




类别:Java | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu