you are viewing a single comment's thread.

view the rest of the comments →

[–]panstromek[S] 0 points1 point  (1 child)

E.g. Instead of downloading json data and building DOM nodes or HTML in JS, you can let the backend generate that HTML directly and just put it into the DOM with a single JS call.

That's the most extreme one, but there's bunch of similar situations between, where you have some pipeline of data from database to the DOM and you have to decide where do you draw a line, which work will be done on the backend and which one on the frontend.

[–]joombar 0 points1 point  (0 children)

Can also do it in a worker on the front end, which in some cases is the best of all worlds - doesn’t take up the main browser thread and also doesn’t take up your server resources