←back to thread

260 points gherkinnn | 1 comments | | HN request time: 0.21s | source
Show context
pier25 ◴[] No.42164501[source]
> I like to argue that some of the most productive days of the web were the PHP and JQuery spaghetti days

I've wondered if going back to that paradigm would be more productive or not than using React et al.

Plenty of big sites like Amazon or Steam still are made this way. Not exactly PHP + jQuery but rendering HTML on the server and sprinkling some JS on top of it.

Has anyone gone back to working like that?

replies(13): >>42164565 #>>42164636 #>>42164646 #>>42164666 #>>42164714 #>>42164722 #>>42164754 #>>42164840 #>>42164957 #>>42165180 #>>42166069 #>>42169495 #>>42169508 #
WD-42 ◴[] No.42164636[source]
I just finished migrating a fairly large legacy vue2 app to server side rendering and HTMX. Its thousands of lines less code and also hundreds if not thousands less dependencies. Most importantly I’m not worried about the tech stack becoming abandoned and un updatable in 5 years like vue2 was.

There are some pages that require more local state. Alpine.js has been great. It’s like Vuejs that you can initialize on your page and doesn’t require a build step.

replies(1): >>42167634 #
Jaygles ◴[] No.42167634[source]
How much of that code and dependency reduction is due to having the entire app to use as a spec? How can you be so sure this new stack won't be "abandoned"? (Vue has received regular updates for 11 years)
replies(2): >>42168404 #>>42169567 #
1. ecshafer ◴[] No.42169567[source]
Not OP, and this was Hotwire Rails with Stimulus but I also saw a similar reduction in moving a page from React to Hotwire. It was actually a new page, with significant changes so couldn't be trumped up to just a rewrite. But this was easily 1/10th if not more of a reduction in LOC than the similar React app it was replacing, with the more features, and a like a 90% increase in performance.