Funny how "server side rendering" became a hot new thing too.
I was so confused when I heard that, "like... a HTML file?".
Keep going at this rate and we'll be using frames again.
Re:An Internet of PHP
by jiggawatts on Saturday September 09, 2023 @04:44AM
(#37443399)
> using frames again.
That’s pretty much what htmx is…
> "like... a HTML file?"
Serving a static HTML file is not server-side rendering.
It's much dumber than that. The people advocating for SSR want the server to respond with HTML generated based on whatever is in the request.
Re:An Internet of PHP
by fjfuvucucuc on Saturday September 09, 2023 @07:30AM
(#37444176)
So like PHP?
This thread is so cope.
Re:An Internet of PHP
by trilbyglens on Saturday September 09, 2023 @04:17AM
(#37443282)
I too find this hilarious. Not because I want to defend PHP, but moreso that I personally sort of despise react and it's whole ecosystem. I've never liked writing code less than when dealing with a spaghetti monster react app.
Well React was born in Facebook which was famously PHP codebase. It makes sense.
JSX and PHP are actually seriously different. When you break out of PHP, you're just outputting text to standard output. When you're using JSX syntax, you're constructing Javascript objects that can be manipulated using standard javascript techniques. Anyone who believes they're comparable seriously doesn't understand the task that is before them.
Re:An Internet of PHP
by fjfuvucucuc on Saturday September 09, 2023 @07:28AM
(#37444163)
Oh please, I professionally use both daily, JSX is just PHP with more steps.
Though not JSX, with TSX you get type checking with your markup.
Re:An Internet of PHP
by wildrhythms on Saturday September 09, 2023 @09:46AM
(#37445343)
My reading of this thread is that people are comparing JSX as a templating language to PHP as a templating language, splicing PHP <? ... ?> into HTML like how we have { ... } in JSX. At the end of the day React lets you write a function that returns HTML just like a PHP file.
And yet people would take a bullet for React and the JSX templates.