Hacker News new | ask | show | jobs
by Philip-J-Fry 27 days ago
I've went on a similar journey and did just end up going to back SQL.

Mapping database rows to domain objects really isn't that painful and you only do it once. So not a big deal. LLMs actually make this a non-issue now.

I actually realised I like the separation of domain objects and the data layer. It just makes things easier to think about for me. And it means my data layer is completely abstracted from the domain. Makes it easier to implement different storage/caching strategies.

And I also realised, if your hot path is needing to get related/child objects then you should probably just write an optimised query as a prepared statement or a stored procedure. It's rare that you actually have that many different ways you want to access the data.

They are really useful for speed of development though if something is completely greenfield and you don't know the full picture of how data is going to be accessed.