loading...

re: ORM vs. SQL? VIEW POST

FULL DISCUSSION
 

The two are not mutually exclusive.
Most ORM frameworks also maintain their own query languages and allow you to write native queries when needed. You can also have both ways of working independently when it's suitable.
I am currently working as a Hybris developer. For those of you who are not familiar with Hybris, it's a Java E-commerce framework. It's build on the Spring Framework plus it's own ORM and CMS.
In Hybris you write queries for fetching objects while saving (creating and updating) is done through method calls alone.
Depending on the needs of a project, an ORM can be more trouble than it's worth in terms of performance and getting the exact behaviour you need.
However, when it's not an issue, an ORM can drastically cut down on writing boilerplate queries which, to me at least, can be boring. Once I'm bored, I tend to make mistakes.
In addition, most ORMs come with lazy loading which will, to a certain extent, alleviate performance issues.

code of conduct - report abuse