Data persistence: Hibernate vs JDBC queries vs MyBatis

转载 2012年03月30日 11:41:25
I'm newbie with GWT/GXT and I'm looking for best persistence way for my future apps. I was considering many variants of doing that so I decided to draw a graph (see attachment).

So my conclusions are:
1) Hibernate is the best persistence framework but it hates cooperation with GWT and a specially with GXT
2) JDBC it was just a joke
3) MyBatis is really great tool for gaining data from db, but writing mappers is the worst thing ever, but its fast, efficient and has great possibilities not seen in Hibernate.
4) Dozzer is server and user resourcess killer. You must write a lot of boiler plate code and it just copy data (sometimes a lot). Don't use it at any cost!!! Imagine server that runs 100 sessions and each bean request must use Dozzer.
5) DTO - similar situation. It's boilerplate, and it's just transforming one data type into other. There is no serious data processing. Use server resourcess wisely.
6) Gilead is copying hibernate beans states. It could be dangerous (just heard from few comments), hard to configure and integrate with other IoC frameworks (Guice in my case).
6) Don't transform POJO int BeanModel on the client side. JavaScript is really slow and it slows down the whole client.
7) Best practise for me and maybe for you: find the shortest path on the graph from DB to the BaseModel bean on the client side.
8) MyBatis allows to map query results to the BaseModel beans (tested) so they don't need to be transformed many times and you don't have to care about it at all. The only thing is writing proper mappings.

This is my personal opinion and remember that I'm newbie. Please explain me if I'm wrong and give cons arguments. Maybe you know another ORM or similar to MyBatis framework that could give me as short path.
Attached Images

JPA JDBC hibernate mybatis对比

Performance Performance and scalability are like the good life. Everyone wants a lot of it, but wha...
  • pkuyjxu
  • pkuyjxu
  • 2012年03月30日 13:40
  • 11778

Connection is read-only问题的产生原因与解决方法

WARN [org.hibernate.util.JDBCExceptionReporter] - ERROR [org.hibernate.util.JDBCExceptionReporter] -...
  • jinwufeiyang
  • jinwufeiyang
  • 2016年08月15日 18:07
  • 15800

JDBC / Spring / MyBatis 性能比较

测试目的: 比较JDBC,SpringJdbc和MyBatis的性能。   测试用例: 1. 查询:查询一张10000条数据的表,只取前1000条 2. 更新:对该表分别进行:     a...
  • baidu_18607183
  • baidu_18607183
  • 2016年05月10日 19:37
  • 1866

从JDBC到hibernate再到mybatis之路

一、传统的JDBC编程   在java开发中,以前都是通过JDBC(Java Data Base Connectivity)与数据库打交道的,至少在ORM(Object Relational M...
  • nc_lhw
  • nc_lhw
  • 2017年04月27日 12:37
  • 983

MyBatis、JDBC、Hibernate区别

从层次上看,JDBC是较底层的持久层操作方式,而Hibernate和MyBatis都是在JDBC的基础上进行了封装使其更加方便程序员对持久层的操作。从功能上看,JDBC就是简单的建立数据库连接,然后创...
  • lingongheng
  • lingongheng
  • 2016年09月26日 20:37
  • 4106

总结传统JDBC以及MyBatis和Hibernate的对比

首先,让我们回顾一下。在上一个博客中写道“使用传统的JDBC编程来操作数据”,详见http://blog.csdn.net/zwg_html/article/details/55668894让我们来总...
  • zwg_html
  • zwg_html
  • 2017年02月20日 21:17
  • 1891

Spring Data与Hibernate、Mybatis的区别

本文为转载文章,目的是给自己整理思路使用。 转载自:http://blog.csdn.net/u011659172/article/details/50800237 1.概念:...
  • linux__xu
  • linux__xu
  • 2017年07月20日 18:49
  • 235

mybatis VS hibernate

hibernate简介:Hibernate是一款工作在持久化层的大型、开源、免费的ORM(Object Relationship Mapping 对象关系映射)框架 特点:1)将对数据库的操作转换为...
  • ywbbo
  • ywbbo
  • 2017年09月02日 14:38
  • 110

jdbc、jdbcTemplate、hibernate、jpa、spring之间的关系

JPA 的底层实现是一些流行的开源 ORM 框架,因此JPA其实也就是java实体对象和关系型数据库建立起映射关系,通过面向对象编程的思想操作关系型数据库的规范 Getting started wi...
  • wybqq
  • wybqq
  • 2017年05月12日 23:28
  • 774

Mybatis与传统jdbc和Hibernate的比较

原生态的jdbc的存在的问题: 1、数据库连接,使用时就创建,不使用立即释放,对数据库进行频繁连接开启和关闭,造成数据库资源浪费,影响数据库性能。 设想:使用数据库连接池管理数据库连接。 ...
  • qq_25673113
  • qq_25673113
  • 2016年12月08日 22:36
  • 752
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Data persistence: Hibernate vs JDBC queries vs MyBatis
举报原因:
原因补充:

(最多只允许输入30个字)