关闭

Data persistence: Hibernate vs JDBC queries vs MyBatis

676人阅读 评论(0) 收藏 举报
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
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:1014678次
    • 积分:8785
    • 等级:
    • 排名:第2303名
    • 原创:148篇
    • 转载:208篇
    • 译文:7篇
    • 评论:146条
    最新评论