Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Ask HN: How much logic should I keep at the database vs. app layer?.
Simple validation, like describing that a price cannot be below 0, I keep in the database. Email validation I keep on the app level.
It allows for easier deployments, easier debugging and it is easier to migrate to a different database should the need arise.
However both works.
There are no comments on this comment yet.
Simple validation, like describing that a price cannot be below 0, I keep in the database. Email validation I keep on the app level.
It allows for easier deployments, easier debugging and it is easier to migrate to a different database should the need arise.
However both works.