mybatis abatis OrmLite android

来源:互联网 发布:税收数据质量 编辑:程序博客网 时间:2024/06/13 11:57

1、在android 应用程序开发中使用mybatis的不利方面:

参考网址:http://stackoverflow.com/questions/4539426/android-application-and-mybatis

A、需要对mybatis针对Dalvik编译

B、对于手持设备来讲有点太“重量级”

C、存在其他可用与Android app 的ORM框架

The first thing to do in order to do that isto compile myBatis for Dalvik. But it's likely to be too heavy for adevice like a smartphone.
If you are looking for a lightweight persistence layer, you could look at Ammentos:
http://www.ammentos.org/
Same trouble: you will need to compile it for Dalvik.
Existing ORMs for Android:
http://ormlite.sourceforge.net/sqlite_java_android_orm.html
https://www.activeandroid.com/

2、两个可用的ORM框架

A、abatis

http://code.google.com/p/abatis/
B、OrmLite

http://ormlite.com/

推荐使用OrmLite,

原因:

A、资料比较多

B、是一种轻量级别的工具,相对于功能复杂的其他ORM工具,

C、OrmLite 仅仅提供访问数据库的一些基本方法、但是我们可以方便的扩张我们需要的功能。