Hacker News new | ask | show | jobs
by _xnmw 2313 days ago
If you're still suspicious of SPAs, you can be sure there's still an alternate universe outside of the Valley bubble that builds server-side web apps on modern frameworks, though now we use Vue.js instead of jQuery. PHP has continued to be a top language of choice for the working class dev, and Laravel is an example of one of the most beautifully crafted (and wildly popular) web frameworks ever made.

Examples of the kind of tooling built by the community that betrays the cultish appeal of Laravel (yep, people actually make a living off Laravel-specific tooling)

- https://tinkerwell.app/ - https://laravelshift.com/

3 comments

> language of choice for the working class dev

What an incredibly strange framing.

So are you implying that you're not filled with the spirit of the proletariat when you program in PHP?
I certainly feel like the bourgeoisie when I use Rust or Haskell.
> I certainly feel like the bourgeoisie when I use Rust or Haskell.

I feel like a peasant sharecropper when I use Java.

That was my initial reaction too, but then I found it hard to disagree with (in the general case of course) and instead thought maybe it's an astute and interesting observation.

The more familiar slight is that it's 'the language of choice for script kiddies', but I suppose they've grown up and gotten apprenticeships.

I just don't know what separates the working class developers from the "other" kinds of developers. I'm a 9-to-5 working developer, and I don't use PHP.
Well, in the most broad - but applicable 'enough' - sweeping generalisation I can think of: a degree.
I think the implication is that PHP is a language that has been accessible to those who didn't join the programming profession via the traditional academic route (CS, CE, EE, or Math degree from a University).

And that's pretty well borne out by its history, and is part of PHP's enduring appeal to many people who don't have formal educational backgrounds in the computing sciences.

I wonder what it is about PHP that has led to this and whether you could recreate it in a new language without the historical inconsistencies and traps.
Some combination of:

- fully interpreted

- very weakly typed

- highly applicable to a broadly desired use case, i.e Personal Home Pages (hence the name PHP)

It's not too different from what made Excel such a broadly accessible and impactful 'programming' tool.

> though now we use Vue.js instead of jQuery

You realize Vue.js is fundamentally an SPA framework, right? It's got built-in router, state management, etc. In frontend dev, those are all things that are only SPAs really need.

To people "suspicious" of SPAs: are you suspicious of Gmail? Slack? Those are typical use-cases of SPAs. What you're actually suspicious about are ill-informed devs building SPAs when they should be using simple static websites, or server-side includes, or simple progressive enhancement in vanilla JS. But none of those options are practical if you want to build something like Slack, GMail, or Google Docs, or any of the myriad other desktop app replacements we find now on the browser.

All the said, I agree that Laraval looks like an attractive framework. I haven't had the chance to work in it professionally, and probably never will, but it looks solid and with the improvements PHP is making as a language, probably would be totally tolerable and perhaps even enjoyable to work in.

EDIT: Ok, the router and state management are official, but not built-in. Fair enough. I've not used VueJS professionally before (only React, AngularJS, Backbone, and custom frameworks before them) but it's one of the appealing things about VueJS compared to React, which seems to be its major competitor presently.

Vue has an official router, but it's not built in and usually something like Vuex is used for state management. I'd certainly agree Vue is oriented towards SPAs, but that's not all it does.
Vue is much more 'batteries included' than React, while also being incrementally adoptable. IMO this is why it's popular with the jQuery crowd.
> IMO this is why it's popular with the jQuery crowd.

I had no idea. I've only used React, Angular, Backbone, and custom frameworks at work (mostly React in recent years), but I like what I've seen of VueJS because of its "batteries included approach" (which is React's weak point, although they seem in some ways to be moving toward being a full framework).

VueJS seems about as different from jQuery as you could get. I mean, it's even got a virtual DOM.

The closest thing you could get to jQuery? Modern, vanilla JS, whose recent APIs were often inspired by jQuery. But the jQuery crowd vehemently rejects that option because their idea of vanilla JS is stuck in the year 2010.

The reason why Vue works well for jQuery devs it’s because it allows you to continue doing what you’ve always done: server render then enhance on the client. Vue does this beautifully by accepting rendered HTML as its template. This means you can augment regular HTML and get the benefits of React without transpiration of JSX, nor the cumbersome nature of string templates in script tags. That’s where the jQuery comparison comes from, and it’s one of the major reasons for Vue’s success in that crowd. It’s a feature that doesn’t seem to get enough attention from/is often overlooked by those in the know because usually those people are writing SPAs.
Yup - Laravel is fantastic. After many years of disappointments with PHP frameworks (Symfony - too complex; CodeIgniter/Yii - not complex enough), I tried out Laravel recently and haven't looked back since.