Earlier quoted context omitted.
While you may pick, most developers do not. You are not the most developers, as you are special and probably much more talented. They pick JS because they know the language best and are more productive in it than in Laravel. There is nothing Laravel can do about it - being best is not going to change the direction, because the limiting factor is the knowledge of programming languages of most of developers.
"From my perspective, the point of all these "PHP is broken" rants is not just to complain, but to help educate and potentially warn off new coders starting new codebases. Some fine, even historic work has been done in PHP despite the madness, unquestionably. But now we need to work together to fix what is broken. The best way to fix the PHP problem at this point is to make the alternatives so outstanding that the ch…
PHP Popularity: Is it decreasing and what to do about it?
151–160 of 166 posts
Re: PHP Popularity: Is it decreasing and what to do about it?
#152PHP 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)
My favorite way to do this is to add a custom script to package.json like:
"start": "pm2 start index.js --name myapp --watch"
Any file change will reload the application and if it crashes it will be restarted. So just scp/rsync files if that's your desired workflow.
In my experience, it's far easier and faster than setting up nginx, apache, fpm, etc, etc.
Re: PHP Popularity: Is it decreasing and what to do about it?
#153Earlier quoted context omitted.
There is no Visual Studio dependency. The VS Code / editor experience is on par with most other languages and Rider is surely more than capable JetBrains based alternative
I meant developer dependence, not language dependence. I recognize visual studio isn't required, but in the wild, the vast majority of C# devs I work with never leave VS.
Re: PHP Popularity: Is it decreasing and what to do about it?
#154Earlier quoted context omitted.
There is no structure, OO was an after thought, meta-programming an after thought., unit testing, testing utilities and frameworks an afterthought, their best Web-framework Laravel is a clone of Rails, No original good ideas in the PHP Community and thats the problem. The reason is PHP is a poor clone of Perl.
I was with you until the end. Originally doesn’t mean shit. Who cares if Laravel is a Rails clone? For the record, I have no idea if it is, let alone if it is beyond the degree that plenty of other things are “Rails clones”. And this is ignoring the fact that Rails had been inspired plenty by other projects throughout its lifetime, as it should. I’m interested in using the right tool for the job, not getting caught u…
Re: PHP Popularity: Is it decreasing and what to do about it?
#155I 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.…
I've been working with PHP for years, and to this day, I struggle to make xdebug work. I don't think it's a genuinely good debugger, which is something that PHP sorely lacks and is a negative aspect of the language.
Re: PHP Popularity: Is it decreasing and what to do about it?
#156Re: PHP Popularity: Is it decreasing and what to do about it?
#157The world that PHP grew up in has changed. The language and community have matured, and in the process PHP has lost most of its competitive advantage: low barrier to entry. It used to be: * Moving from static HTML to dynamic server code was a matter of changing file extension and adding PHP tags. * Many shared hosting services supported PHP. * Deploying was a matter of copying files to the server. Projects that start…
Example on improvements
1) auto-escape output - one of the biggest reason not to use PHP for templating is that you need to manually escape your strings to avoid XSS, whereas a dedicated templating library can do this for you. This could be done with a either a special opening and closing tag or let you register a tag hook.
2) today you can use the alternative syntax for if, while, for, foreach, and switch
https://www.php.net/manual/en/control-structures.alternative...
This could be expanded for match expression, closures, and other block expressions.
3) custom HTML tag support, register a HTML tag like and implement it thru an API, perhaps a class that implements an interface. And now you can do much better reusable components that can automatically close them selves instead of multiple calls.
e.g instead of
Buy
you can do
Buy
In the first example you need to always match one function call with another function call ( manual work), in the latter example you HTML just needs to be valid, which many editors can detect for you.And it would be easy to share these custom components on github with composer.
Re: PHP Popularity: Is it decreasing and what to do about it?
#158Re: PHP Popularity: Is it decreasing and what to do about it?
#159The world that PHP grew up in has changed. The language and community have matured, and in the process PHP has lost most of its competitive advantage: low barrier to entry. It used to be: * Moving from static HTML to dynamic server code was a matter of changing file extension and adding PHP tags. * Many shared hosting services supported PHP. * Deploying was a matter of copying files to the server. Projects that start…
First of all, php is faster than python, and ruby and probably most dynamic languages except JavaScript.
So in terms of performance, modern php is ahead of the other languages and it scales well.
Regarding features, php has the best support for classes and types out of the three languages. So if you want to design a classic oo system, php has the best features language-wise.
Php also has a great community (good ides, good package manager, good open source libraries and frameworks).
What do other languages offer that php doesn’t have?
Re: PHP Popularity: Is it decreasing and what to do about it?
#160PHP 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…