4 ms·
Although I don't use PHP, I'm impressed by its staying power and the improvements in speed (which are substantial compared to other dynamic languages). It has a
by open-source-ux 7y ago
Although I don't use PHP, I'm impressed by its staying power and the improvements in speed (which are substantial compared to other dynamic languages). It has almost universal support amongst web hosts. It can be deployed by simply uploading your code to a directory on your web host. It's a widely criticised language, but still accounts for the vast majority of server side code (80% according to some sources).
And in 2020, it's still the only language that gives your users a relatively easy method to self-install web apps or products. (Sorry, but Cloudron, Sandstrom, Docker etc will never match your customers definition of 'easy'.)
Having a ridiculously easy web app installation process for servers would unlock countless opportunities for developers to reach more users or customers. PHP is closer than most. No other language has tackled it (or cares).
This is an excerpt from a blog post by programmer Jeff Attwood:
"If you want to produce free-as-in-whatever code that runs on virtually every server in the world with zero friction or configuration hassles, PHP is damn near your only option. If that doesn't scare you, then check your pulse, because you might be dead."
To broaden choice, Attwood argues we should:
"build compelling alternatives and make sure these alternatives are equally pervasive, as easy to set up and use as possible."
That was written in 2012 (https://blog.codinghorror.com/the-php-singularity/ https://blog.codinghorror.com/the-php-singularity/).
It's 2020 and none of the alternatives are 'as easy to set up and use as possible' for server-side installs as PHP. Why?
- mywittyname 7y ago> Why? PHP was designed from the start to be a web-first language that solved the issues people had using Perl as a server-side scripting language. I think experiencing the pain points people were having trying to repurposed other languages for the web lead to a lot of good* design decisions. * Good, in the sense of ease of use. It also didn't really give you many options in the beginning: everyone just used the LAMP stack and made it work. You could use Windows or Postgres, but you just didn't without a compelling reason. Nobody today wants to design a single-purpose language that locks users into a platform. Users don't want to learn a single-purpose language and be locked into a platform.
- freehunter 7y agoWe love forgetting lessons we learned the hard way. With Rails we forgot that dev environments and deployments should be easy like they were with PHP. With Node.js we forgot that programmer time is important and boilerplate can be automated like it was with Rails. We’ll see what the next popular language holds for us, and what we forget along the way.
- cutler 7y agoThat's strange because I hear of lot of "best practices" for PHP, particularly Symfony and Laravel, involve jumping on the Docker/Kubernetes bandwagon. AWS RAM prices are a joke compared with, say, Hetzner.com yet PHP authorities are to be heard recommending leaving behind that which made PHP famous - FTP-ing PHP files to a cheap web host or VPS.
- systematical 7y agoAPI Platform, a Symfony bundle (thats a library, but I guess they thought bundle sounded better), gives you a pretty verbose docker-compose.yaml to get started. I looked at it, shook my head and downloaded it. https://github.com/api-platform/api-platform https://github.com/api-platform/api-platform I'm sure they had good reasons...or they just wanted to say hey, we're modern.
- GrumpyNl 7y agoIt can be easier, just install xampp and you are up and running within a minute.
- jjeaff 7y agoI always see hetzner come up as a cheaper alternative to cloud. But why is everyone using them as a baseline for regular hosting? They don't even have a data center in the US that I can tell. Are US companies really hosting their apps in Europe? Seems like a lot of latency.
- freehunter 7y agoFTP to production is probably a bad idea, sure, but you have to be careful following best practices from people whose business depends on constantly selling you more. Whether they’re bloggers who need you to click the new article or Udemy teachers who need to sell new videos or cloud providers who need you to buy more or bigger hosting options.
- cutler 7y agoBecause the industry is obsessed with over-engineering. React and Angular were originally developed to power the likes of GMail and Facebook. Now the simplest of sites have to be redone as SPAs simply to support the React/Angular/Vue industry. With deployment it's even worse. Now we have to wrap our simple PHP/Ruby/Python apps in a goddamn virtual OS. Kubernetes and Docker were originally designed for managing massive fleets of servers but now every startup with a 2-bit website seems to think they're missing out if they don't wrap their code in all this infrastructure. Chef and Puppet were good enough for most jobs a few years back so why the obsession with Docker and Kube* ?
- systematical 7y agoI agree, though for local development environments docker is pretty handy for getting the full stack up. Especially if you just came aboard. But this is the name of the game. More and more complexity. I am not sure how green engineers manage to learn everything. Woof