Hibernate 对 Android 应用程序来说是一种矫枉过正吗? [英] Is Hibernate an overkill for an Android application?

查看:18
本文介绍了Hibernate 对 Android 应用程序来说是一种矫枉过正吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的 android 应用程序寻找一个好的 ORM,乍一看似乎对于移动设备我更喜欢使用更简单的东西.问题是我只是在这里假设没有真正的证据,所以我想我会问社区的意见(也许有人经历过这种经历).这是一个相当大的(移动)应用程序,将在专用平板电脑上运行.

I'm looking for a good ORM for my android application and at first glance it seems like for a mobile device I would prefer to use something simpler maybe. The thing is I'm just assuming here with no real evidence, so I thought I would ask the community's opinion (maybe there's is someone that has been through the experience). It is a fairly large(for mobile) application and will be run on a dedicated tablet.

其他人怎么看?对于 android 应用程序来说,Hibernate 是否太多了?会不会有性能问题?

What does everyone else think ? Is Hibernate too much for an android application ? Will there be performance problems ?

如果你觉得太多了,你会用什么代替?

What would you use instead if you think it is too much ?

我知道还有其他问题要求替代方案,但我决定问,因为大多数问题只是假设这是一种矫枉过正并要求其他选项,我开始想知道这真的是矫枉过正吗?为什么?"由于我缺乏经验,我只是这么认为,但如果我被要求解释原因,我无法真正提供答案.是性能吗?是不是配置太多(我不介意)?

I am aware there are other questions asking for alternatives, but I decided to ask since most of those questions simply assumed it was an overkill and asked for other options and I started wondering "Is it really and overkill ? Why ?" Due to my lack of experience I simply think it it, but can't really provide an answer if I'm asked to explain why. Is it performance ? Is it too much configuration (Which I don't mind) ?

谢谢!

推荐答案

我想推荐我的 ORMLite包裹.与 Hibernate(和 iBatis)相比,它的设计要轻很多.我认为 Hibernate 对于 Android 应用程序来说太过分了——尤其是考虑到代码的大小和依赖项的数量.

I'd like to recommend my ORMLite package. It was designed to be much less heavy compared to Hibernate (and iBatis). I think that Hibernate is too much for Android applications -- especially considering the size of the code and the number of dependencies.

Android 移植 ORMLite 直接调用 Android 数据库 API.ORMLite已经成功交付了多个应用.

The Android port of ORMLite makes direct calls to the Android database API. A number of applications have been delivered using ORMLite successfully.

Hibernate 提供了许多 Android 数据库调用无法支持的功能,因此您将为甚至无法使用的复杂性付出代价.我也不确定它是否有原生的 Android 后端.Android 不正式支持通过 JDBC 使用 SQLite,我无法让它可靠地工作.

Hibernate provides a number of features that cannot be supported by the Android database calls so you will be paying for complexity that you cannot even use. I'm also not sure it has a native Android backend. Using SQLite over JDBC is not officially supported by Android and I was unable to get it to work reliably.

这篇关于Hibernate 对 Android 应用程序来说是一种矫枉过正吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆