DEV Community

Discussion on: Modern Full-Stack Developer Tech Stack 2021

ozzythegiant profile image
Oziel Perez

Actually, were getting there with WebAssembly. Pretty soon you can run any language on the front end. And, isn't SSR just traditional way of rendering websites? As in, Multi Page Applications? That's basically what PHP is all about, of course, without running as an SPA after initial page load. Anyways, how's it harder to do closures on PHP? It too has functions and a way to pass in variables from a higher scope, which, depending on your view point, is better because it prevents variable name conflicts from multiple scopes and explicitly states where you are getting such data. I mean, it's not that different. Makes it easier to reason about your code.

Thread Thread
efpage profile image

Maybe JS is not perfect at all. And maybe it does not make it too easy. But you can write well designed OO style code in Javascript.

It's like drinking: alkohol does not solve your problems, but neither does milk!

ritin profile image

Comparing Javascript with PhP is like comparing Oranges and Apples.
With Typescript Javascript gets the powers of Traditional Languages.
So now, Javascript can do everything a Traditional Language can do. But the reverse is not true.
Also, Real-Time Data-Driven Apps can only be written in Javascript.
Nice Topic for Discussion though.

Thread Thread
lukeshiru profile image

SSR is traditional, yes. The tricky part is "hydration" and shared logic. I can reuse the same components and utils in the backend and the frontend with JS, but PHP is another story. Why would you choose to do PHP in the back and load WASM just to have it run in the front as well, instead of just using JS in both? The user will be highly impacted with the worst load times Dx

Thread Thread
ozzythegiant profile image
Oziel Perez

Compared to PHP, yeah, although there are some work around but PHP sucks at real time data. However, I would say Go and Java are fairly decent for that too. I've heard they use those languages for some game servers