News for hackers. Stuff that matters.
Re:Htmx – high power tools for HTML by vosper on Thursday May 28, 2020 @01:04AM (#23333567)
Because oftentimes you’re retrieving data that will be stored in one central store and displayed / used in different ways in various components. Eg I might fetch user data and sometimes display their name, maybe another time compute their age from their birthdate, etc...
Re:Htmx – high power tools for HTML by learc83 on Thursday May 28, 2020 @09:30AM (#23336984)
If you take a few minutes to build seperate endpoints, you'd get better performance. Both in latency/bandwidth and in system resources for your DB query.
Re:Htmx – high power tools for HTML by nogabebop23 on Thursday May 28, 2020 @09:39AM (#23337068)
What's the difference between building seperate code paths on the client vs. 2 server endpoints though? Very few scenarios can't afford the behind-the-scenes extra http round trip...
Re:Htmx – high power tools for HTML by vosper on Thursday May 28, 2020 @02:55PM (#23340977)
Because I don't want to build and maintain an API endpoint to give me an HTML blob for the users age, and another one for their full name, and another one just for their first name, and another one for figuring out what day of the year is their birthday. I want adding these features to my UI to be a client-side-only change.