| ▲ | jghn 2 hours ago |
| To make matters worse, most of the time I've successfully argued a project to just use SQL instead of an ORM, what has happened is that people over time built a home rolled ORM in the development language. It's like people can't just let go. |
|
| ▲ | hparadiz 2 hours ago | parent [-] |
| This is inevitably what happens every single time so just use an ORM and stop being stubborn. |
| |
| ▲ | jghn 2 hours ago | parent [-] | | The problem is that "ORM" does a lot of heavy lifting as a term and can mean different things to different people. Like yes, obviously, one needs some sort of SQL -> data structure transition on the boundary (using "object" overfits to OOP!). But that can be extremely light weight. Let people write SQL, have a thin layer to pull the results back out into the appropriate data structures, and move on. | | |
| ▲ | hparadiz 2 hours ago | parent [-] | | Every good ORM lets you write SQL. Mine for example has a getByQuery and getByWhere as standard methods. An ORM isn't just writing queries for you it's also handling type casting from lang primitives to SQL and back. In 99% of crud rest apis there should be no need to write your own SQL though. |
|
|