A software that runs on a computer and performs a task

vv important answer on what applications are.

https://www.reddit.com/r/reactjs/comments/a4x0m5/comment/ebif14c/?utm_source=share&utm_medium=web2x&context=3

frontend

the layer the user interacts with

responsive application design

rendering

on a 60fps display, the browser will ideally re-render the page 1s i.e 1000ms / 60 no of times. in those 16ms, it has to reflow, recalc styles, repaint and re-render everything. usually, this takes around a few ms to do 5-10ms. which means, all your JS code must run within 6-10ms. otherwise, it gets stuck. this is how any rendering mechanism works at the core, even a game engine.

the 2 fundamental ways of rendering a 2D GUI

immediate mode (games)

state maintained by the userland. they have to issue redraw calls everytime, essentially redrawing the entire canvas.

https://caseymuratori.com/blog_0001

retained mode (graphical UI, browsers, mobile apps)

state retained by the graphics engine. the consumer has to just update the state/dom/widget tree, and the graphics engine takes care of re-rendering

common optimizations or concerns

pagination / infinite scrolling

gotta have a way of knowing, when the user has scrolled to the bottom of the current viewport

virtualization

when long lists are rendered, you should ideally only render what’s visible on viewport and around, and not render others. and de-rendered what was alraedy rendered and is now not visible on viewport.

backend

the layer that is far away from the user and handles all business logic, data and storage etc

10x Frontend Dev questions

single threader runtime vs multi-threaded runtime

so a single thread runtime is better, when there’s more io bound tasks, because it’s non blocking, and the io task will be offloaded to the runtime/kernel, without creating a separate program thead, but it’s bad when each of it’s individual tasks are compute heavy, because it’s a single thread.

vs

multi threaded like java, which is great for compute heavy tasks, but bad for IO, because of the overhead of creating more threads.

https://stackoverflow.com/questions/34855352/how-in-general-does-node-js-handle-10-000-concurrent-requests