3 ms·
Why hand roll an ORM?
by edgyquant 5y ago
Why hand roll an ORM?
- progre 5y agoNot op, but this has happened in every major project I have seen: Typically, someone started out thinking "This is the simple, I don't need the overhead of [orm]". Then as time goes by, helper methods for data mapping between the DB and the domain objects crops up and one day you realize that you now have your own half decent ORM. You don't even need to start from scratch, in the project I'm currently working this happend on top of Dapper sometime on the past.
- coldacid 5y agoI'm now looking at replacing the half-baked ORM I built inside a Xamarin app with EFCore because it does a smarter job of handling SQLite than I do.
- TimTheTinker 5y agoI built my own ORM for a project once. I needed to implement a thin application service that would speak JSON and query/return entire relational subtrees in a single request (to render an iTunes-like interface for a manual testing web app).
- krab 5y agoFor one product I worked on, its core was a custom ORM. The product had to work with an unknown database schema - adapt to customer's database - and provide functionality similar to MS Access but specialized for pharma/chemical industry. There was no ORM flexible enough for this use case. Then, jOOQ came out and it could be usable with a lot of extending for the chemistry stuff. But at that point, we already had the custom ORM.
- brigandish 5y agoI'm currently using one in a personal app because I'm learning a lot about a new language for me (Crystal). It's why, like this author[1], I also like writing useless apps. [1] https://web.eecs.utk.edu/~azh/blog/makinguselessstuff.html https://web.eecs.utk.edu/~azh/blog/makinguselessstuff.html
- edgyquant 5y agoAh I did the same before I had to work with ORMs a couple of years ago, I actually started working on a distributed table orm but gave up once work picked up: https://github.com/DylanEHolland/datablox https://github.com/DylanEHolland/datablox I’m a fan of rebuilding things to understand, just didn’t know if there was a good reason for a production app to use its own.