Friday, March 12, 2010

Why ORM? ’cause:

Tagged with: ,
Wednesday, October 22, 2008, 3:18
This news item was posted in Notes category and has 3 Comments so far.

Hi again, a few hours ago I have read a question about ORM mapping for java . He wonders why  and when this technology is chosen.

Disclaimer: I am omitting the case, when your database is just a storage for a CRUD apps. I am talking about complex applications, when stored procedures are used very extensively, like Oracle’s PL/SQL.


Here comes the arguments :

I have some questions, like:
- What is your point to use ORM instead of plain SQL?
- What value ORM brings to you and how easy is to maintain the code, continue project?
- How easy new comers are getting along with your project?
- How quick and easy you update your system?
- What the performance is speed and resource usage wise?
- How generated SQL is efficient for your database and what is DB load does it provide?
- What is your way to cope with the situation, when you have a custom stored procedures package in your DB?

And the most important:
- If you ask yourself really honestly, so are you REALLY REALLY happy with ORM, rather than go with plain JDBC/SQL? I am talking in general principle, not just from some particular product perspective, that requires ORM to be used.

Here I see an out of date perspective:  “We have everything in database and database is faster and easier to develop then java”

  • ALL of the ORM tools  have code generation utility  both binary and source code that saves lots of time and effort.
  • They force you to put some abstraction layer between your Database and business layer. Abstraction is always GOOD unless it is extreme
  • Interoperability: you can change your database vendor more easily even you can use different for your development and production enviroment!
  • Enable more methodology: yes you can use interceptor soft-caches, clusters, aspects, listeners,notifiers and so on …
  • Maintainable: which one is more maintainable code: your database, plsql, resultset or your domain objects and business layer !!!!
  • Industry standards and trends: you can find more innovative tools and support when you are  following trends :) {jsf,seam}
  • Learning curve: new graduates know more about POJOs objects then SQL/PLSQL and vendors
  • Enables SQL if it is needed
  • for more features:hibernate features and  toplink features

of course do not forget:

  • ORM is efficient  only when dealing object one by one not fits for bulk operation and summary reports
  • first learn: you should learn your tool to avoid pitfall
  • you can always chose a framework like IBatis for such implementation

you can find discussion:

linkedin discussion

have a nice day :)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • Wists
  • LinkedIn
  • Slashdot
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • email
  • Twitter

Related posts:

  1. Object Model vs Database Schema Design
  2. Clean database schema with inheritance
  3. hibernate native Id generator tip
  4. No Implementation DAO Layer Project: Polyforms

You can leave a response, or trackback from your own site.

3 Responses to “Why ORM? ’cause:”

  1.  Wonderer said on Wednesday, October 22, 2008, 11:35

  2. tiw said on Monday, February 2, 2009, 21:40

    In which LinkedIn Group is this discussion going on?
    As I tried the link it said, you are not a member of this group, but it didn’t say which group.. Not your bug, I know :)

  3. altuure said on Tuesday, February 3, 2009, 9:36

Leave a Reply