Earlier quoted context omitted.
Why do you presume this is "hearsay PHP hatred"? I (not parent) have PHP hatred. It is fuelled by decades of PHP development and -exposure. My hatred is based on failing projects, missed deadlines, burnouts, money stolen, severe downtime, and companies going bankrupt. PHP had a role (not the primary, mind you!) in all of them.
It had a role because PHP is the most used web technology in the world.
PHP – The Right Way
101–110 of 349 posts
Re: PHP – The Right Way
#102Earlier quoted context omitted.
What tools? What server language today except PHP (and its forks) is actually designed for the web and works as the web was intended?
What server language today except PHP (and its forks) is actually designed for the web and works as the web was intended? The implication of the question is that there's something designed into PHP that makes it better for working with web things. Why does the language need to be designed to work with the web? That part of any language can be filled out with a framework quite easily, and arguably that means it's much…
IMHO this is still too much HTTP, as I'd prefer to keep the entire HTTP out of my app, but after your routers, there's nothing "Web": it could all be "domain specific".
Ruby, the language, is, indeed, hardly "Web" at all. Ruby stdlib has some HTTP stuff but that is both lacking and optional.
Re: PHP – The Right Way
#103There are tons of tools to get things done, PHP is one of the worst ones.
Re: PHP – The Right Way
#104I totally expected it to be a troll site. It's actually sensible advice. But, really, I suggest using other tools. We have nicer tools now.
Re: PHP – The Right Way
#105Earlier quoted context omitted.
Java solved this by using domain names as unique identifiers. I can use com.banffy and be sure only a complete a*hole would make a package in this space.
This is roughly PHP’s approach. In this case, Illuminate is the vendor prefix and Mail is the package name. This often but not always corresponds to the rules around the composer package name, which would be illuminate/mail in this case. This is similar to NPM’s organisation prefix (@foo/bar). But yeah, I’m not defending the hacky way namespaces are resolved through autoloading. I do prefer actual language support fo…
With Rails 7 and Zeitwerk, the Ruby community has landed on a very similar auto-loading system as PHP now[2] with constants translating to paths by convention.
[0]: https://github.com/php-fig/fig-standards/blob/master/accepte...
[1]: https://www.php-fig.org/psr/psr-4/
[2]: https://github.com/fxn/zeitwerk#the-idea-file-paths-match-co...
Re: PHP – The Right Way
#106Actually, that make me remember statements of Linus Torvalds on Git at Google Tech Talk Conference: But I did end up using CVS for seven years at a commercial company and I hated it with a passion. When I say I hate CVS with a passion, I have to also say that if there are any SVN users in Subversion, users in the audience, you might want to leave because my hatred of CVS has meant that I see Subversion as being the m…
I feel like you are stretching a quote to fit a premise that doesn't match the context of this thread or article.
Re: PHP – The Right Way
#107Earlier quoted context omitted.
What server language today except PHP (and its forks) is actually designed for the web and works as the web was intended? The implication of the question is that there's something designed into PHP that makes it better for working with web things. Why does the language need to be designed to work with the web? That part of any language can be filled out with a framework quite easily, and arguably that means it's much…
> I don't think there's a good reason to design a language specifically for web projects. If that's how PHP works these days (I haven't used PHP in a decade or so), I'd suggest that might be a bad thing. It's very rigid, and if the language gets anything wrong that compromises the design of every project that uses it. Languages should provide simple primitives that frameworks and libraries build on. That has always b…
This is untrue. PHP was a templating language and form-handler first and foremost[1]. It took a long time for it to move out of that (I'd argue up to 5.6) and become an actual programming language rather than a template language on steroids. Edit: we still have to move out of template mode in every file by adding a So, essentially, we now have web-frameworks built in a templating language. With, ironically, template languages written in that templating language. Nice, if you like recursion though.
[1] Early PHP was not intended to be a new programming language, and grew organically, with Lerdorf noting in retrospect: "I don't know how to stop it, there was never any intent to write a programming language - https://en.wikipedia.org/wiki/PHP#Early_history
Re: PHP – The Right Way
#108Earlier quoted context omitted.
The fact that composer comes with an autoloader doesn't means that you have to autoload everything. You can manual include, define your own extra auto loader and use interfaces to quick swap for custom implementations. Like I said, +15 years. Composer is 9 years old. How do you think we handle this in our own Jurassic times?
You can manual include I don't think that will work with any code that came out in recent years. Because it all expects that its dependencies are automagically included via composer. In practice, every PHP based web application starts with Laravel or Symfony these days. So you are thrown into the composer workflow right away. And it would be a nightmare to fight it.
Re: PHP – The Right Way
#109I totally expected it to be a troll site. It's actually sensible advice. But, really, I suggest using other tools. We have nicer tools now.
> But, really, I suggest using other tools. We have nicer tools now. Debatable really. Within the web development space the options are rather limited in my opinion. Options: * Spring based apps - Downside JVM is a Resource hog * Python, Ruby, etc - The web frameworks are in my opinion not as full featured. Same with CMS systems. Also requires more resources. Also have limited OO features. * Go, Rust, etc - Really go…
Re: PHP – The Right Way
#110Earlier quoted context omitted.
It had a role because PHP is the most used web technology in the world.
Not only that, I can almost guarantee that computers were involved in all of those failing projects as well, yet are not receiving any blame for it. Neither does the chairs. Damn chairs always avoiding blame.