Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The idea of the web-router "owning" the database fills me with a visceral sense of loathing.

Data is always the important part of any real program.

 help



The only place it make sense to me is the validation = at the route level you want to ensure that the given model exists / request attributes defining relationship (pivot), are there. This is how Laravel does this. Having said that this should be responsibity of domain rather than application

Yeah, this was the big red flag for me too. If you're going to try to decouple things, the last thing you should do is add more coupling.

Just a quick mention that there is next to no coupling. If you don't use `primate/store`, none of the ORM code gets pulled in. You could be using any other database client.

The same applies to sessions, i18n, or any frontend. They're all either path'd imports or distinct packages.


the connection, schema, and migrations are all separated so looks pretty easy to swap in your own ORM or have another service own data



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: