由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 谁给推荐一个简单的ORM吧
相关主题
现在 Java Web 开发过时了么?新手问题。
difficult things working with hibernate为什么call hibernate service 要比直接用store procedures慢啊?
hibernate和jdbc的比较。Hibernate的优势具体体现在哪里?
Java GC 为什么不能自动释放jdbc connection?那里能下载到ibatis 2.3.2或者以上版本?
hibernate和ejb3一大堆Java的 web app framework,学那个最有用啊
问问java认证java后端开发
JDBChibernate一个国际化保存unicode value的问题
spring到底有什么好处?hibernate能不能orm没有主键的表格
相关话题的讨论汇总
话题: jpa话题: hibernate话题: sql话题: orm话题: use
进入Java版参与讨论
1 (共1页)
k***r
发帖数: 4260
1
不想用Hibernate那么复杂的了,越简单越好,DB打算用
H2 database,也是lightweight的,query都很简单,
但是不想直接写SQL了
k***r
发帖数: 4260
2
这个还不错,实在很小
http://ammentos.org/
F****n
发帖数: 3271
3
JPA is the standard and it's simple. You can use Hibernate JPA without
learning the Hibernate details.

【在 k***r 的大作中提到】
: 不想用Hibernate那么复杂的了,越简单越好,DB打算用
: H2 database,也是lightweight的,query都很简单,
: 但是不想直接写SQL了

k***r
发帖数: 4260
4
En. Thanks. For my current project, it's a tiny little
one, somehow I feel that hibernate with jpa is a little
heavy. I'll definitely use it for a larger project.
But maybe using hibernate JPA may not be a such bad
idea either, for a small project

【在 F****n 的大作中提到】
: JPA is the standard and it's simple. You can use Hibernate JPA without
: learning the Hibernate details.

g*****g
发帖数: 34805
5
tiny little, you may consider object DB.

【在 k***r 的大作中提到】
: En. Thanks. For my current project, it's a tiny little
: one, somehow I feel that hibernate with jpa is a little
: heavy. I'll definitely use it for a larger project.
: But maybe using hibernate JPA may not be a such bad
: idea either, for a small project

F****n
发帖数: 3271
6
It depends on what do you mean by "tiny little". If you mean memory
footprint, then you probably should write the SQL. If you mean the amount of
code you have to write, then use JPA is a good choice because you will have
the luxury of switching implementations. Moreoever, there are probably
ready-to-use persistent List, Map, and etc in JPA that can save your efforts.

【在 k***r 的大作中提到】
: En. Thanks. For my current project, it's a tiny little
: one, somehow I feel that hibernate with jpa is a little
: heavy. I'll definitely use it for a larger project.
: But maybe using hibernate JPA may not be a such bad
: idea either, for a small project

k***r
发帖数: 4260
7
I mean a couple of tables and simple relationships.
I'm using an embedded DB (h2) as data source. Just a
simple blog sample type of application, simple CRUD.
Because it's simple, I'm trying to avoid any XMLs,
or other type of configurations, or a whole bunch of
jar files (although jar files is a smaller problem.)

amount of
have
efforts.

【在 F****n 的大作中提到】
: It depends on what do you mean by "tiny little". If you mean memory
: footprint, then you probably should write the SQL. If you mean the amount of
: code you have to write, then use JPA is a good choice because you will have
: the luxury of switching implementations. Moreoever, there are probably
: ready-to-use persistent List, Map, and etc in JPA that can save your efforts.

F****n
发帖数: 3271
8
Then you should write SQL. It is not complicated and will not increase your
dependency size.

【在 k***r 的大作中提到】
: I mean a couple of tables and simple relationships.
: I'm using an embedded DB (h2) as data source. Just a
: simple blog sample type of application, simple CRUD.
: Because it's simple, I'm trying to avoid any XMLs,
: or other type of configurations, or a whole bunch of
: jar files (although jar files is a smaller problem.)
:
: amount of
: have
: efforts.

o**1
发帖数: 6383
9
感觉 JPA/Hibernate 还是把问题搞的太复杂了。
很多应用直接用 jdbcTemplate 就足够了。
或者是 iBatis/myBatis 也很简单实用。

【在 F****n 的大作中提到】
: JPA is the standard and it's simple. You can use Hibernate JPA without
: learning the Hibernate details.

k***r
发帖数: 4260
10
我发那个只有一页文档,貌似比ibatis/mybatis还简单很多,
就是不知道稳定性如何,呵呵

【在 o**1 的大作中提到】
: 感觉 JPA/Hibernate 还是把问题搞的太复杂了。
: 很多应用直接用 jdbcTemplate 就足够了。
: 或者是 iBatis/myBatis 也很简单实用。

相关主题
问问java认证新手问题。
JDBC为什么call hibernate service 要比直接用store procedures慢啊?
spring到底有什么好处?Hibernate的优势具体体现在哪里?
进入Java版参与讨论
k***r
发帖数: 4260
11
因为还是要有model classes,sql回来的东西还要自己装到
model class/object里面,也挺麻烦的

your

【在 F****n 的大作中提到】
: Then you should write SQL. It is not complicated and will not increase your
: dependency size.

o**1
发帖数: 6383
12
jdbcTemplate.queryForObject(sql, new Object[]{args}, new
BeanPropertyRowMapper(ModelObject.class));
不用自己装,用spring的 bean row mapper, 一点不麻烦。

【在 k***r 的大作中提到】
: 因为还是要有model classes,sql回来的东西还要自己装到
: model class/object里面,也挺麻烦的
:
: your

k***r
发帖数: 4260
13
提到spring就觉得heavy啊,呵呵。用这个需要几个jar files?
I'm assuming it's relative independent,对spring的
其他东西有没有dependency?

【在 o**1 的大作中提到】
: jdbcTemplate.queryForObject(sql, new Object[]{args}, new
: BeanPropertyRowMapper(ModelObject.class));
: 不用自己装,用spring的 bean row mapper, 一点不麻烦。

s*******e
发帖数: 3042
14
没几个jar吧?简单的东西直接写SQL最简单了

【在 k***r 的大作中提到】
: 提到spring就觉得heavy啊,呵呵。用这个需要几个jar files?
: I'm assuming it's relative independent,对spring的
: 其他东西有没有dependency?

F****n
发帖数: 3271
15
It's a myth that JPA / Hibernate is complicated, hehe.
Actually JPA is the simplest ORM I have ever used.
Hibernate is more complex, but you can ignore it and only use the JPA part.
If you use Java Annotation, you don't even need XML.

【在 o**1 的大作中提到】
: 感觉 JPA/Hibernate 还是把问题搞的太复杂了。
: 很多应用直接用 jdbcTemplate 就足够了。
: 或者是 iBatis/myBatis 也很简单实用。

1 (共1页)
进入Java版参与讨论
相关主题
hibernate能不能orm没有主键的表格hibernate和ejb3
Java的DAO层哪个框架用的比较多?mybatis有人用吗?问问java认证
你们写个CRUD的web application会不会用些高级一点的东西?JDBC
Criticism of Java Persistence Frameworksspring到底有什么好处?
现在 Java Web 开发过时了么?新手问题。
difficult things working with hibernate为什么call hibernate service 要比直接用store procedures慢啊?
hibernate和jdbc的比较。Hibernate的优势具体体现在哪里?
Java GC 为什么不能自动释放jdbc connection?那里能下载到ibatis 2.3.2或者以上版本?
相关话题的讨论汇总
话题: jpa话题: hibernate话题: sql话题: orm话题: use