4 ms·
PHP pages absolutely have to be built/rendered.
by robertoandred 3y ago
PHP pages absolutely have to be built/rendered.
- paulryanrogers 3y agoI think the distinction is that PHP is interpreted in real time most often. So there is rarely a separate build step.
- robertoandred 3y agoIt’s a build step that happens every time the page is loaded instead of once when it’s deployed.
- paulryanrogers 3y agoThen arguably JS is worse, since any 'build' steps preceding it don't bypass the (client side) interpreter either. Except perhaps if WASM is involved.
- eropple 3y agoThat's not true, though; JSX can be entirely prerendered server-side. If you don't write client-side JavaScript, you're not going to get client-side JavaScript (modulo maybe a thin hydration layer if you're using particularly old tools, but nothing running pervasively). Your code becomes HTML files. It's more Hugo/Jekyll than it is "a SPA". I am unaware of a major PHP framework that is designed around similar, though it may exist.
- paulryanrogers 3y agoJSX SSR would be in real time again, correct? If you mean rendered once for all, i.e. statically, there are some PHP wikis, frameworks, and caching plugins that can/do work that way.