Remix.run Logo
smarkov 3 days ago

People like to hate on PHP, but PHP provides you with all the tools you need to write a fully working backend, where as JS provides you with half-assed solutions for writing frontend, which is why we have 1000 frameworks and we still can't agree on how to write frontend code. Seriously, we don't even have a convention for writing a simple reusable component with vanilla JS, everyone makes up their own thing. Web components were supposed to be that, but they're a good example of what I meant by "half-assed", because they're ugly, verbose, clunky, don't really solve the right problems, and nobody likes writing them.

brulard 3 days ago | parent | next [-]

I don't think PHP is any better in solving the backend, than JS is in solving frontend. On the Frontend the situation is not ideal, but we made big leaps every let's say 5 years, going from jQuery to React and from React to later generation frameworks like svelte / solid etc. Yes, the landscape is fragmented and there are maybe too many options, but you make it sound like PHP is universally used as the backend solution, while I see it being used little these days except for legacy systems from 15-20 years ago.

hu3 3 days ago | parent | next [-]

> you make it sound like PHP is universally used as the backend solution, while I see it being used little these days except for legacy systems from 15-20 years ago.

Your eyes deceive you.

https://finance.yahoo.com/news/exclusive-laravel-raises-57-m...

smarkov 3 days ago | parent | prev [-]

I never said that PHP was universally used, just that it has answers to most problems.

jQuery has become obsolete these days because the problems it solves have largely been solved by additions to JS, but the interactivity of websites has continued to increase and browsers have yet to catch up to that. Frameworks like React actively fight against the browser rather than work with it by maintaining its own DOM state and constantly creating copies of state for every re-render of a component, along with a bunch of other magic. That's a lot of unnecessary loopholes just to make up for JS's lack of features when it comes to writing reactive UI.

pjmlp 3 days ago | parent | prev [-]

That is why I made my peace with Next.js.

It is the only framework that feels like I am using JSP, JSF, ASP.NET, Spring, Quarkus, PHP.

Don't plan to use anything else in JS space, unless by external decisions not under my control.

girvo 3 days ago | parent [-]

While I chafe at some of its decisions, you're still correct. It's the only thing really in that space that's fully featured enough.