←back to thread

260 points gherkinnn | 9 comments | | HN request time: 0.001s | source | bottom
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. WD-42 ◴[] No.42168404[source]
Vue 2.x is NOT receiving updates. Not even security updates. Its abandonware.

I had to ask myself if it was worth the hassle to update to 3.x and risk the same thing happening again. The answer was no.

The new stack is Django (which the backend was already written in). Will it stop receiving updates? Extremely unlikely, conserving they have been preserving upgrade paths for the last 20 years and has a solid foundation supporting it.

The supporting ui libraries like htmx and alpine could conceivably become abandoned. The big difference is that they can be vendored easily.

I checked the vue project and it has 1500 transitive dependencies. The new “stack” has a whopping total of 7.

On top of that there is no build step to maintain. Also it’s straight up way faster.

replies(2): >>42168897 #>>42168952 #
2. pier25 ◴[] No.42168897[source]
> Vue 2.x is NOT receiving updates. Not even security updates. Its abandonware.

I algo got burned with Vue 2 at one point. Pretty amazing considering Vue is quite popular. Recently went over 1M daily downloads.

https://npm-stat.com/charts.html?package=vue

I don't think even jQuery had so many downloads back in its heyday but it has maintained its API and methodology after all these years.

replies(1): >>42169492 #
3. recursivedoubts ◴[] No.42168952[source]
htmx will not be abandoned as long as I'm alive, and the API will not change significantly either

i am hoping my oldest son gets interested in computer programming and can take over as the lead eventually

replies(4): >>42169010 #>>42169316 #>>42169612 #>>42170163 #
4. kelnos ◴[] No.42169010[source]
I haven't done any real web development in over 20 years, but will soon have to build some sort of dynamic web site. I toyed with React 8 or 9 years ago (though never did anything with it, really), and found everything out there to be large and clunky and difficult to work with.

I came across htmx a while back and have kept it in the back of my mind as something to potentially use if I ever had to build something. I'm glad this article came up on HN, and your comment here... makes me really want to build something with htmx!

5. WD-42 ◴[] No.42169316[source]
Hey! Whether your son takes over or not, the larger point I was trying to make is that worst case I can vendor htmx.js with my app and keep it going for a long, long time.

Same can’t be said for the vue app and its 1500 dependencies + web pack build chain. At least not as easily.

6. WD-42 ◴[] No.42169492[source]
I think npm stats aren’t even the same thing as number of jquery downloads. I bet 99% of the downloads off npm are automated jobs like CI.
7. grugroyal ◴[] No.42169612[source]
Primogeniture is an underrated project leadership policy.

You will need a Latin motto on your coat of arms. Something like "Simplex sigillum veri".

replies(1): >>42186080 #
8. throwup238 ◴[] No.42170163[source]
> i am hoping my oldest son gets interested in computer programming and can take over as the lead eventually

Sacrificing the first born as god intended.

9. recursivedoubts ◴[] No.42186080{3}[source]
nemo codeo appendium lacessit