4 ms·
I run a small SaaS app that also has volume-based features. Instead of using queries to check the count, we compute the total count of resources via database tr
by conroy 8y ago
I run a small SaaS app that also has volume-based features. Instead of using queries to check the count, we compute the total count of resources via database triggers. I’m not saying this is a better approach, just that there are multiple ways of doing these calculations.
- tnolet 8y agoWe actually do this on the frontend with Vue.js computed properties. Triggers will certainly do that in the backend, but they are bit more initial work than just a simple query.
- vbsteven 8y agoPlease tell me you are not basing any plan/usage decision on computed properties in the frontend without verifying them on the backend
- tnolet 8y agoNo, they are just helpers to show nicer messages to users. The post goes into exactly the topic of validating this stuff on the backend.
- a13n 8y agoHonestly, at an early stage startup, especially if your target audience isn't developers, it's pretty safe to only do checks on the front end. Just add them later, once you have enough volume that it's a problem.