73
you are viewing a single comment's thread
view the rest of the comments
[-] python@lemmy.world 2 points 14 hours ago

Huh, wouldn't just plain sql be perfectly fine for that use case? Make a get request with your filter/sort params, server-cache the result, return the data with a client-cache header. I've been serving up customized svg files like that in a personal project of mine and its been so much faster and cleaner than styling my svgs within the jsx.

[-] bleistift2@sopuli.xyz 1 points 14 hours ago

That would work, but it demands co-operation by the backend for the additional validation. It also means re-transmitting 8MB of customer data just so they can be arranged differently in the frontend. I don’t really want to move presentation logic that far to the back. If you want to display more data, you need to touch both the table-drawing logic and the sort-validation logic.

[-] python@lemmy.world 1 points 7 hours ago

..i mean, I get it, I've written some very scuffed JS in my time because using .filter() right before displaying my data felt easier than getting the right data to begin with. Especially if the backend is in a different git repo and uses some whacky ORM library I'm not familiar with, while the Product Owner n e e d s everything deployed today.

But you can't tell me that applying filter/sort to 8MB of data in the frontend is anything but mega scuffed. Imagine you need to debug that and don't even have an intermediate step to see whether the wrong data is arriving or whether filter/sort logic is wrong for a specific case, or whether its just the rendering. You'd always need a person understanding all three just to debug that one part.
Not to even mention how that would run on low-power devices with bad internet connection. Or what that does to your SEO.

this post was submitted on 26 Jul 2025
73 points (94.0% liked)

Web Development

4373 readers
58 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS