Live data from Hacker News

PHP Popularity: Is it decreasing and what to do about it?

otsch.codes

31–40 of 166 posts

Re: PHP Popularity: Is it decreasing and what to do about it?

#31

Celebrate!

So, what’s your alternative? Python with its god-awful package management situation? Node with its „here’s a bazillion libraries for the same thing, good luck figuring out how to combine them“? Ruby with its 90ies-grade performance?

Re: PHP Popularity: Is it decreasing and what to do about it?

#32
post #5

Professionally I work with python and node a lot, but everytime I need a backend for my personal projects PHP is my go to language.

Would you like to elaborate your reasons?

I typically write ruby but I’ll grab PHP for simple web stuff because it’s really easy to throw nginx and php-fpm on a server and start coding.

There is no app server or MVC to worry about. Every page is a template.

Re: PHP Popularity: Is it decreasing and what to do about it?

#33

Earlier quoted context omitted.

Do you really think the inability to create anything but an index.php file is the bottleneck? Those people just use drop-in tools now which are better than custom applications for a large portion of standard use cases.

Bottleneck? Just asking what's the JS equivalent in convenience for deploying a simple project. It doesn't need to even look like index.php, just needs to be as convenient, ideally? Drop-in tools? Examples? I was using PHP drop-in tools back in 2004 but I'm not sure if that's what you mean.

Express and it's spiritual successors are the node "hello world" answers you're after, I think.

Re: PHP Popularity: Is it decreasing and what to do about it?

#34
post #10

Earlier quoted context omitted.

With any luck Java will go away as well.

Java is very much in ascendence.

Even if there weren't any technical reasons not to use Java or better alternatives, the elephant (or lawnmower) in the room is Oracle.

Re: PHP Popularity: Is it decreasing and what to do about it?

#35
I went from a WP/Laravel dev to .NET Framework and now .NET 5+. For me PHP has always suffered from two primary camps: ancient codebases that people don't dare touch, and poor tooling.

The former came mostly from the PHP camp. The lack of OOP where it was pretty desperately needed was unproductive at best, and at worst yielded a codebase that was so unmaintainable we had to double any time estimates for backend work.

For tooling Laravel, at least the last time I touched it, was pretty good with its scaffolding. Relying on Composer was also very welcome. Using IDEs like PhpStorm was pretty good, but took a lot of configuration.

The one thing that really burned me, however, was the amount of effort it took to get a debugger actually working. I am certain the climate is better now, but at the time almost no emphasis was put on actually using a debugger for development. You could get Xdebug running, but you have to know how to configure your local dev hosting environment properly. If you used a prebuilt package like your WAMPs or XAMPPs or whatever you, you got 90% there, but it's so bloated and didn't reflect your production environments. Vagrant was great... if you spent the time to configure your Vagrantfile with a lot of testing.

These days it takes about 30 minutes to reinstall Windows, install VS, clone my project, hit the run button and I'm off to the races. Is everything frictionless? No, of course not, but I can get to actually building my application without pulling my hair out.

Re: PHP Popularity: Is it decreasing and what to do about it?

#36
post #4

PHP popularity is decreasing because there are better tools for the same niche today. The same happened for Perl in 00s. The same is happening for every web backend language, as JavaScript is becoming ubique due to it being the de facto and only choice for the web frontend. Maybe PHP can be made better, but it would need some radical changes and then the question is that if it’s worth the effort and maybe to pick up…

What's the JS equivalent of "place an index.php file in a folder to deploy"? What's the JS FOSS equivalent of ProcessWire as a CMF + CMS? What's the JS equivalent to e.g. DreamHost and other drag + drop hosts? (Legitimately curious, and I'm mainly inquiring after equivalents-for...better-thans would definitely be interesting)

Oh that's easy - just install 10 insecure npm packages that each install another 10 npm packages (some of which are even maintained!) then make sure you remember to bundle it up in a nice, heavy electron wrapper. Then you're all ready to distribute it via some random App Store - just don't forget to charge a monthly subscription while you're at it. /s

Re: PHP Popularity: Is it decreasing and what to do about it?

#37
post #4

PHP popularity is decreasing because there are better tools for the same niche today. The same happened for Perl in 00s. The same is happening for every web backend language, as JavaScript is becoming ubique due to it being the de facto and only choice for the web frontend. Maybe PHP can be made better, but it would need some radical changes and then the question is that if it’s worth the effort and maybe to pick up…

What's the JS equivalent of "place an index.php file in a folder to deploy"? What's the JS FOSS equivalent of ProcessWire as a CMF + CMS? What's the JS equivalent to e.g. DreamHost and other drag + drop hosts? (Legitimately curious, and I'm mainly inquiring after equivalents-for...better-thans would definitely be interesting)

An html file with a tag

Re: PHP Popularity: Is it decreasing and what to do about it?

#38
post #28

Earlier quoted context omitted.

What's the JS equivalent of "place an index.php file in a folder to deploy"? What's the JS FOSS equivalent of ProcessWire as a CMF + CMS? What's the JS equivalent to e.g. DreamHost and other drag + drop hosts? (Legitimately curious, and I'm mainly inquiring after equivalents-for...better-thans would definitely be interesting)

People always seem to come up with the argument that you can drop an index.php in a folder and be done with it. Only nobody uses php that way since decades. Modern php code uses Frameworks, Package mangers, opcode caching, and application servers. It’s just that other languages don’t carry all the cruft php has in its heritage…

Exactly! Those languages are working on their own cruft!

Re: PHP Popularity: Is it decreasing and what to do about it?

#39

Earlier quoted context omitted.

Do you really think the inability to create anything but an index.php file is the bottleneck? Those people just use drop-in tools now which are better than custom applications for a large portion of standard use cases.

Bottleneck? Just asking what's the JS equivalent in convenience for deploying a simple project. It doesn't need to even look like index.php, just needs to be as convenient, ideally? Drop-in tools? Examples? I was using PHP drop-in tools back in 2004 but I'm not sure if that's what you mean.

With node, install express, and run `node index.js` and you have a full blown server.

Re: PHP Popularity: Is it decreasing and what to do about it?

#40
I like the php-fpm design of having a persistent server to run code rather than starting a process for every request.

I would like the convenience of replacing one file somewhere and have the file be picked up by the server, similar to PHP.

I would also like to separate release and deploy and do an atomic load of the server.

I think there are Clojure projects to preload the JVM.

Post reply on HN