一、依赖注入DI
通过依赖注入减少View、服务、资源简化初始化,事件绑定等重复繁琐工作
AndroidAnnotations(Code Diet)android
快速开发框架
项目地址:https://github.com/excilys/androidannotations
文档介绍:https://github.com/excilys/androidannotations/wiki
官方网站:http://androidannotations.org/
特点:
(1)依赖注入:包括view,extras,系统服务,资源等等
(2)简单的线程模型,通过annotation表示方法运行在ui线程还是后台线程
(3)事件绑定:通过annotation表示view的响应事件,不用在写内部类
(4) REST客户端:定义客户端接口,自动生成REST请求的实现
(5)没有你想象的复杂:AndroidAnnotations只是在在编译时生成相应子类
(6)不影响应用性能:仅50kb,在编译时完成,不会对运行时有性能影响。
PS:与roboguice的比较:roboguice通过运行时读取annotations进行反射,所以可能影响应用性能,而AndroidAnnotations在编译时生成子类,所以对性能没有影响。
二、图片缓存
picasso square
开源的图片缓存
项目地址:https://github.com/square/picasso
文档介绍:http://square.github.io/picasso/
特点:
(1)可以自动检测adapter的重用并取消之前的下载
(2)图片变换
(3)可以加载本地资源
(4)可以设置占位资源
(5)支持debug模式
三、网络相关
android-query
异步加载,更少代码完成Android加载
项目地址:https://github.com/androidquery/androidquery或https://code.google.com/p/android-query/
文档介绍:https://code.google.com/p/android-query/#Why_AQuery?
Demo地址:https://play.google.com/store/apps/details?id=com.androidquery
特点:https://code.google.com/p/android-query/#Why_AQuery?