36 points · by amaccuish · 1y ago · 75 comments
And the ops team has preconfigured systems for single page applications but not MPAs.
I just need to ship this tiny tool very quickly (initial server request to delivery is about 5 weeks, but I didn't know they were complicating things this much until about 3 weeks after the initial request), otherwise I wouldn't just give in here.
If the "industry" default has new JS/Node powered ecosystem, perhaps some people, including myself, would agree that PHP frameworks are still ahead of the overly modular JS frameworks, there isn't anything like Laravel or Django for the JS world.
But, for simple cases, templates are still very common, including static site generators, but even PHP.
It’s Laravel with Alpine (or Vue in some cases).
It retains all the simplicity of classic web development with a lot more sensible tooling and significantly improved language — PHP of today is worlds better than the old days.
There is a lot of gold in the vein of simple web technologies, even if they’re not being propped up by the PR department at billion dollar companies.
Jquery isn’t going to make anything easier today. It’s definitely contemporary with this age of web development, but the expected standard library in a browser implementation of JavaScript (+css animations triggered by JavaScript) includes all of jquery’s features automatically. What you will get is more complex stack traces and a rather large dependency (large in comparison to no-dependency) that just unlocks a bespoke syntax for other JavaScript features.
Places where you used jquery, can now be just JavaScript. It’s lovely to use like that actually!
Everything else, totally agree with though!
var _ = s => document.querySelectorAll(s)
_('.someclass').forEach(e => {e.classList.add('something', 'else')})https://developer.mozilla.org/en-US/docs/Web/API/Web_Animati...
I'm looking at my next project now and I think I'm going to build it like this again because if it has any hope of lasting a decade or more, it needs to be relatively easy to maintain.
We didn't lose PHP, it's just no longer in the spotlight.
In fact I applied to a Laravel role very recently but they didn't like that most of my recent experience were with Go and Rust and not PHP.
If you want a PHP comeback, hire that Rust engineer that wants to use Laravel!
The biggest thing I hear otherwise is "but salaries!". Okay, but you're just replacing your sysadmins with AWS devops people, who I can't imagine are cheaper.
Cloud isn't simple, it's very complex. You need just as many people and just as much knowledge to make it work.
Someone needs to study these claims tbh; your point is contrary to my experience.
You can subsidize the cost of self hosting by discounting your time/skill in DIY - and you don’t have to interview yourself.
People are starting to learn that cloud hosting isn't exactly cheap. It's great for quickly scaling, there's way better automation tools, e.g. Terraform, a lot of the complicated stuff is done for you, but it's not cheap.
37signals is running their own infrastructure, and it's cheaper than cloud.
EDIT: (I can't reply for a bit) Quick glance at https://www.hetzner.com/sb/ seems to suggest 64GB RAM and a full Intel i7.
That's where they get you.
In fact, I would be surprised if AI were to generate code as rube-goldbergery as React would have you write. Shrug.
Gemini might default to a framework and Tailwind CSS, but I can tell it to use vanilla Javascript.
also, maintainability of dependencies in web projects that do use build chains seems much better today than even 8 years ago, and it seems to be improving. esbuild, vite, and other projects have simplified the tool chain. improvements in CSS have reduced the need for pre-processors, etc.
No one who argues for this seems to remember the mess of jQuery dependencies in the form plugins people would include in projects, before HTTP/2, just to have some simple functionality like a carousel, transitions, submitting forms with AJAX (XHR), and so on. Many of those things are a few lines of code now, where they were sometimes hundreds of lines of code in the past when people developed this way.
The prototype pollution and general undefined behavior introduced by plugins was nearly impossible to track in projects where teams were plugin hungry.
Additionally, the spaghetti that existed where people would interweave on element event attributes (onclick, etc) with scripts lead to huge headaches debugging events before devtools in browsers was mature as it is today.
Honestly, I could go on forever.
Walk into a large project that is 15 years old and still using jQuery UI, and you might change your mind on the merit of its elegance.
jQuery was one of the nicest things around at a time when it was needed, but pining for this version of the past boggles my mind.
App = {
}
People are a lot more educated now. But you're right, we can't go backward, but there are many good things about Jquery that were mostly thrown out by Angular and React, and I think there's a middle-ground here somewhere. Anyways, not like it matters, AI has arrived.
You don’t understand the tools we have now, probably you are not the target and you can still use PHP + jQuery.
And is false that they weren’t package managers: the de-facto standard was Bower, used in combo with Grunt as task manager, with a Ruby toolchain that included LESS most of the type to preprocess styles.
Not crying any tears.
Vanilla javascript now is way better than the mystery methods in jQuery. Does this call return zero, one or many things? Also what does it return? Who knows! We'll find out at run time!
I've been struggling with how to write about and fix this paradox for a long time. We start with the heavy weight infrastructure because we don't know how large our application will end up. Small teams use microservices. Small teams build large continuous integration pipelines and strain under the complexity.
That's partially because the large teams have built open source ecosystems that make dealing with that complexity mostly invisible. That's partially because we all neglect YAGNI. And it's partially because we need better patterns on how to in-time scale our complexity.
EDIT: a typical CRUD app will be fine with just PHP, HTML and CSS.