在JAVA project用ORM 成為趨勢嗎?

本帖最後由 student_abc 於 2015-12-10 11:17 編輯


So many people seems to use java project, java web program use ORM such as Hibernate.

Do you agree the ORM becomes major in java project?
Why?

噤似功課嘅?

TOP

So many people seems to use java project, java web program use ORM such as Hibernate.

Do y ...
student_abc 發表於 2015-12-10 11:09



    When you need extreme performance => Answer = NO

When you need faster development => Answer = YES

No absolute answer.  In real world,  you can always use ORM AND  Stored Procedure TOGETHER.

TOP

https://en.wikipedia.org/wiki/Object-relational_mapping

自己 google 下啦

Compared to traditional techniques of exchange between an object-oriented language and a relational database, ORM often reduces the amount of code that needs to be written.[2]

Disadvantages of ORM tools generally stem from the high level of abstraction obscuring what is actually happening in the implementation code. Also, heavy reliance on ORM software has been cited as a major factor in producing poorly designed databases.

TOP

提示: 作者被禁止或刪除 內容自動屏蔽

TOP

we use mixture of stored proc and ORM,
taking advantage of performance and flexibility of sql.
and efficient developing using ORM data binding

TOP


When you need faster development => Answer = YES
  

Your comment is so nice.
Why the ORM can rise the development's speed?  

TOP

回覆 7# student_abc

no need to do

1. auto create tables with all relational entities once you deploy

2. no need to do data binding (compared with getting result from native SQL)


ie. i have a User Object in Java.

When I get user data from the Database, it will convert to User object automatically..

It is super easy to setup one-to-many relationship, many-to-one, one-to-one , many-to-many relationship WITHOUT doing ANY data binding

TOP

回覆  student_abc

no need to do

1. auto create tables with all relational entities once you depl ...
hihihi123hk 發表於 2015-12-11 22:36



Do you like to develop by ORM?

TOP

ORM既好處係做簡單野就快同方便,壞處係做複雜野就慢同麻煩,所以岩用既地方就用,唔岩用就唔好夾硬用

TOP