Is ORM still the “Vietnam of Computer Science”?

前端 未结 10 834
孤街浪徒
孤街浪徒 2020-12-23 18:05

I read this post last night, and I noticed it was from 2006. I could go either way on the ORM, database thing, but I was just wondering if everything bad Jeff said about OR

10条回答
  •  失恋的感觉
    2020-12-23 18:40

    I think starting from the assumption that Jeff's conclusions are correct is not necessarily good; having maintained stored procedure code as well as JDBC-based data layers, I can say that these caused maintenance problems galore, mostly related to the inability to understand what was going on at a higher level.

    A database is necessarily low-level; it stores numbers and strings essentially. Business logic is high-level. This is why we have abstraction.

    Personally, I think the Rails/ActiveRecord way is the best solution to having an object/domain model but also being able to take advantage of a relational database.

    So: don't throw out ORM, but don't default to it either. It's a tool that solves certain problems. To ignore it would be ignorant and to always use it would be arrogant.

提交回复
热议问题