Live data from Hacker News

“Hello, (real) world” in PHP in 2017

kukuruku.co

81–90 of 144 posts

Re: “Hello, (real) world” in PHP in 2017

#82
post #64

Everyone's trying to take this literally as the "right way to display plaintext" in modern PHP. In that sense, it is absolutely absurd. But if the idea of a "hello world" is to learn the basic boilerplate that you'll need before you start implementing real features, unfortunately for us web developers, this quite accurately represents the minimum before we can even start implementing business logic. With the baseline…

Then again take a step back and look at what's being achieved. You are delivering, nearly instantly, a sophisticated and responsive fat client application to the user without any installation process. This fat client is running in a nearly universal and quite safe sandbox that is provided by several vendors across different os's, form factors, and architectures. With a good amount of backwards compatibility. Backed b…

And to just pile on with this comment, "run everywhere" means much more than it ever did.

This isn't just the big 3 desktop OS's, but laptops, tablets, phones, TV's, game consoles, car navigation units, hell my goddamn watch can run websites now! X86, ARM, SPARC, PPC, it doesn't matter.

And on most of those platforms, you have more than one choice of browser.

It's a level of cross-platform that really only simple C programs can even begin to reach. And it's not exactly simple to setup that environment from scratch either.

Re: “Hello, (real) world” in PHP in 2017

#83
While reading i was thinking "..but that all makes sense for any project that's larger than a few hundred lines.." and thought the author was just ignorant and needlessly cynical.

But at the end of the article, he makes a good point:

Disputes like “Why do I need PHP if there’s Java?” have become more frequent nowadays. I don’t know who’s in the right, Holly Wars are tricky. But each dispute has an argument in favor of PHP — it’s easy for beginners. To my mind, this argument isn’t valid anymore, which is exactly what I was trying to say in this article.

The notion of PHP as a beginner-friendly language has in my opinion been a harmful one for a while now. There are still people writing old school PHP apps, and there is the (mildly displeasing) wordpress ecosystem. But for anything serious, Symfony is invaluable. And the gap between old school PHP to modern PHP is almost the same as the one between old school PHP and Java/Spring/Hibernate, which is kind of what Symfony/Doctrine is cloning anyway. Plus if you do Java, you don't get the stigma of being in the same category as a professional wordpress template tweaker.

Re: “Hello, (real) world” in PHP in 2017

#84
post #4
post #2

This seems like a decent primer for someone who already has their heads wrapped around application development, but absolutely horrid for someone who wants to pick up a web language for the first time and create that first simple output. That first simple output IMO is critical for retention and engaging the language knowing exactly what you're going to get by looking at dirt simple code like echo hello world; at lea…

You do realise this article wasn't written as a beginner's tutorial but as a sarcastic view of modern web dev?

Admittedly, no I didn't.

What's the tell? I obviously missed it :(

Re: “Hello, (real) world” in PHP in 2017

#87

Everyone's trying to take this literally as the "right way to display plaintext" in modern PHP. In that sense, it is absolutely absurd. But if the idea of a "hello world" is to learn the basic boilerplate that you'll need before you start implementing real features, unfortunately for us web developers, this quite accurately represents the minimum before we can even start implementing business logic. With the baseline…

The irony is that if it was a real world baseline, we'd have a discussion about not all browsers supporting the fetch() api, and yet another boilerplate step being needed to polyfill it.

Re: “Hello, (real) world” in PHP in 2017

#89
99% of real-world apps out there could be implemented with a BAAS and some simple JS MVC framework (good ol' BackboneJS in my flavor, if not jQuery fancy). I am not talking about building million-user-base facebooks and twitters, I am taking about a fuckzillion apps with a dozen at best concurrent users that will thrive in Firebase's free tier, a damnzillion worpress sites that never-fucking-ever get updated and would do just fine with good ol' static html, forever spared from bitcoin ramsomware.

Simply put: we forgot how to be engineers (the right solution for the problem). We are all Zuckergified into the fucking hype. Aren't we? We forgot that it is WE the experts that should tell clients how to solve their damn problems not just echo some buzz words so we get the damn contracts.

This post is NOT satire. It is the very state of current affairs.

Re: “Hello, (real) world” in PHP in 2017

#90
post #78

Earlier quoted context omitted.

What is good for developers is bad for the industry. How else would they justify creating frameworks in different languages if all people are doing anyway is writing text to (F)CGI stdout? It is much better for the companies/groups involved to make people believe that there is something wrong with this and that they should really be using a "proper" framework.

Who do you think is making money off open source frameworks?

The whole cottage industry of software engineers, authors, and consultants who implement these solutions.
Post reply on HN