Remember not one tool is right for all the problems, for instance if you are building something simple as Twitter which has couple of tables, and you have never used ORM, then its waste of time to learn ORM and do things, on the other hand if you are building something complex, evolving application and need more time to spend on solving business problems and UX then you can't effort to spend extra time on just figuring out how to store and retrieve data into a DB.
And here are the few things I like about ORM
And here are some ORM tools you want to consider for your next project, though they have some learning curve earlier.
Avexus - Aerospace maintenance Application with over 1300 tables.
McKesson - Pharmaceutical Application with over 500 Tables
Deployed Portal's with over 10 million active users in a clustered environment with JPA Hibernate, Solr, Distributed EhCache, Sticky Session
Part of my Job is to evaluate technologies and to pick the most suitable one depending on team skills, project scope and other factor's.
Though I personally prefer JPA 2 Hibernate Stack, and I also tested and used other frameworks and found Hibernate to be more stable then others. also another reason to stick with Hibernate is to use Hibernate Search, Hibernate Validator, EhCache support and Spring modules
I might also upload a sample project with all these technologies to github.
And here are the few things I like about ORM
- Domain Model - Think data as Domain Object not as Tables and Relationships
- Standard Query Language - with JDBC we still get locked-in with proprietary SQL, whereas ORM provides great Query Language which is performance tuned for all supported DB's
- Less Code - less testing, less complexity, and less time
- Concurrency and Locking - easily version data and protect data integrity in a concurrent environment
- Caching - Great support for standalone and distributed caching
- Re-Use - consider ORM as our old DAO layer, well written and fully tested so we can reuse for all future projects.
- Evolving - ORM's are still evolving and creating greater opportunities and innovations for Scalable, Distributed, Performance tuned applications, whereas JDBC was almost stagnate for quit some time.
And here are some ORM tools you want to consider for your next project, though they have some learning curve earlier.
- JPA 2 HIbernate 4.x (ORM)
- EhCache 2.5 Beta - Simple but great caching solution.
- Spring Data - You need to checkout what improvements it offer's.
- Spring - Transaction Support & Testing (must)
- Hibernate Search - Simple Data indexing solution much faster then DB indexing and retrieval.
- Hibernate Envers - Audit capability
Avexus - Aerospace maintenance Application with over 1300 tables.
McKesson - Pharmaceutical Application with over 500 Tables
Deployed Portal's with over 10 million active users in a clustered environment with JPA Hibernate, Solr, Distributed EhCache, Sticky Session
Part of my Job is to evaluate technologies and to pick the most suitable one depending on team skills, project scope and other factor's.
Though I personally prefer JPA 2 Hibernate Stack, and I also tested and used other frameworks and found Hibernate to be more stable then others. also another reason to stick with Hibernate is to use Hibernate Search, Hibernate Validator, EhCache support and Spring modules
I might also upload a sample project with all these technologies to github.
Comments
How to you envision to develop and maintain an application that has over 3000 tables in the database using ORM? We have an application (ERP) that has that many tables in a database and we only employ three programmers for that.
From experience, I can tell that developers write much more SQL crap than ORMs. Besides that, they don't really know how to cache, optimize the fetching with code and SQL
I've written application with hundreds of tables. Having 200, 1000 or 3000 (or only 10 ?) it's the same. Just get a good developer that knows things like : caching, lazy-loading, n+1 issue, ORM session, second level cache and you'll get a better performance than with custom SQL
Avexus - Aerospace maintenance Application with over 1300 tables.
McKesson - Pharmaceutical Application with over 500 Tables
I Deployed Portal's with over 10 million active users in a clustered environment with
JPA Hibernate, Solr, Distributed EhCache, Sticky Session
Though I personally prefer JPA 2 Hibernate Stack, though I also tested and used other frameworks and found few issues scaling and pushing them to the limit.
Another reason to stick with Hibernate is to use Hibernate Search, Hibernate Validator, EhCache support and Spring
As in when things go wrong you can be in a whole world of pain.
The industry is moving in that direction too as FOSS companies are now switching from ORMS like Hibernate to MyBatis. Example: Alfresco
Could you provide links to those portals?