@tom.developer: I mean, if it works, it’s okay right? 👀😂 This is for a net worth tracker tool which stores data on the value of your savings accounts, stocks, bonds, etc. All of the data was previously just stored in local storage on the browser, but after accidentally clearing my browser data, I realised that wasn’t such good idea. Instead of building a bunch of different API endpoints for the project, I just created 2, and let all of the data management continue to happen on the frontend. Is this bad practice? 👀😂

Tom Shaw
Tom Shaw
Open In TikTok:
Region: GB
Saturday 18 October 2025 21:39:11 GMT
53746
1257
72
10

Music

Download

Comments

johannan231
Johanna :
Js isn’t server language that’s the main sin 😂
2025-10-19 07:45:16
40
toreficient
toreficient :
If it works why fix it
2025-10-18 21:48:10
50
kabukimist
Hob Spillane :
not a sin. just not RESTful. This type of thing is very common. look at GraphQL or RPC style calls.
2025-10-20 01:10:37
20
iwdwebman
Stephen Weessies :
this is why I like PATCH. just update what you need or all of it.
2025-10-19 05:26:36
15
theoddtwoout
TheOddOneOut :
i thought you used white theme for a second
2025-11-23 15:42:48
1
fryguy18
fryguy18 :
I have been writing code for 25 years. All these "rules" come and go. You do whatever works for you.
2025-10-19 15:02:35
2
neurodivergentnonsense
neurodivergent nonsense :
No you’re being smart you have reduced latency, atomic consistency, lower overhead, better throughput, and a simpler client synchronization. Plus you have something you can break up IF you NEED to.
2025-10-19 09:26:55
16
lovingwind
Ivan :
It’s common to through a bunch of stuff in json blob.
2025-10-19 05:40:55
9
bradleykaiser6
bradleykaiser6 :
depends on scale
2025-10-19 14:30:17
2
forzerat
W Z :
this how it worked these days when browsers didn't support DELETE, PUT, etc, nothing wrong about this approach
2025-10-19 14:17:33
5
jerry_nietzschfield
jerry_nietzschfield :
Just use graphql if that's what you're doing.
2025-10-20 01:30:42
1
lordzardeck
Sean Templeton :
If you are writing a local first application where all logic lives in the client, absolutely this is great. We are building a large complex application (hundreds of thousands of lines of code for the client alone) and our backend is almost exclusively just the 2 endpoints for syncing data changes to the server and pulling changes down. Doesn’t matter the collection we are storing. I think I comes down to keeping endpoints scoped to a single purpose. If the purpose is to simply retrieve data unmodified from the database, even from separate collections, and doesn’t do different things based on what collection it is, that’s one small purpose.
2025-10-19 03:14:01
2
andrewjamescook
Andrew 🇪🇺🕊️❤️‍🩹 :
I think it depends on the use case. I’m usually at the other end, but on the data side. I typically prefer to have one endpoint per table, especially if I only need to refresh certain tables weekly and other tables might require daily or even hourly refreshes.
2025-10-19 10:26:33
1
martinkearn
Martin Kearn :
Depends who it’s for. If it is just you then all good, if you want other developers to use it, not so much
2025-11-24 20:31:30
0
kingphillips1
phillips :
Just say you are using gRPC and you are good
2025-10-21 15:14:32
1
fabianostarman
Gino :
Yes it's called SOLID design.
2025-11-09 01:04:36
0
aryacyjz8au
joleriti :
Either build a full REST API or look into trpc, that might be a good fit for you
2025-10-19 09:26:37
1
asintech
Asin :
personally if am to do such am going to be passing an 'action' value then in the server function write bunch of if statement to perform the needed operation based on the action type, although this isn't ideal tho but sometimes you have the power to make and break the rules lol 😅
2025-10-18 21:48:43
0
spaghettiottos
… :
If you are the only one using it then you can send it byte by byte
2025-11-05 04:24:01
0
mattwood815
Matt Wood :
it works it's just not stable for scaling
2025-11-04 23:11:56
0
sophistiqqq
ior :
didn't GraphQL do that exact thing?
2026-01-15 23:33:03
0
kadaster
Kadaster :
i thought it was a push to prod on Friday evening
2025-11-09 02:39:46
0
cinemaboxcollector
Kevin Deery450 :
your exposing too much data. That's a security risk. You should only have a payload relevant to what your doing
2025-11-25 20:42:32
0
super__supers
SuperSuper :
if it fits, it's fine. KISS
2025-11-08 14:03:11
0
mattandcode
Matteo :
I’ve seen some pretty big redux stores do this
2025-10-19 00:00:13
0
To see more videos from user @tom.developer, please go to the Tikwm homepage.

Other Videos


About