Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
The Server Doesn't Render Anything (unplannedobsolescence.com)
11 points by recursivedoubts 6 months ago | hide | past | favorite | 2 comments


Something I've tried hard to explain to juniors getting used to web development is that the server is a program, that prepares another program and sends it to the browser to run.

Especially when adding JS to HTML pages, some juniors can be confused about what code is running where and what to expect is possible. Combine this with traditional server rendering approaches like PHP, where you could actually just stick a SQL statement inside some JS source text as it is being generated, and you get a recipe for confusion.

Emphasizing that HTML (including CSS and JS) is a piece of text that is shipped across to the browser and then run as a program is the way I worked out to try to explain what's happening.


Yes exactly! The backend server is kind of like a macro or codegen system, it uses some combination of static assets and dynamic (runtime) routines to generate the assets that get shipped to the frontend.

This has interesting implications in eg legal questions, like can the backend and frontend 'programs' have different licenses? If you look at them as separate programs that would seem to imply that yes they can!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: