Re:SPAs Were a Mistake
by littlecranky67 on Thursday March 03, 2022 @06:25AM
(#30539622)
because a database should not hold your business logic. It should hold your data, and that it can do well. See also my other post on parent for more reasoning.
[ Parent
| on HN ]
Re:SPAs Were a Mistake
by funcDropShadow on Thursday March 03, 2022 @09:50AM
(#30541735)
I beg to differ in many interesting cases, we put at least some parts of the business logic into the database. The table design is a direct consequence of the business logic, the same is true for constraints and triggers.
Why shouldn't it? As noted above, database servers already have most of this (security) logic in them - likely tested much better than whatever you can write on top of the database yourself. And given how many apps are basically just CRUD, why reinvent the wheel every time?
Re:SPAs Were a Mistake
by yencabulator on Saturday March 05, 2022 @11:52AM
(#30569139)
Mostly because the tooling is so bad. Or do you have unit tests, lint, and easy version control for your stored procedures? Are they written in a way that matches at all what rest of your programming is? Can you import a randomly picked utility library?
The next obvious question is, why is tooling so bad then? And would it have been so bad if we invested as much into RDBMS as we did into Node.js web-frameworks-of-the-day.
Re:SPAs Were a Mistake
by yencabulator on Sunday March 06, 2022 @09:34PM
(#30583591)
Writing the next modern elegant artisanal javascript webshit is a lot easier than making a sandboxed programming environment that integrates tightly with a production quality database engine and has a good story for testing, deployment, debugging, etc.