Hacker News new | ask | show | jobs
by DangerousPie 4688 days ago
Exactly. I am still using PHP for pretty much all of my projects despite all of its shortcomings. The reason for this is just how easy it is to write simple scripts and deploy them. For most small hobby projects it is just not worth spending hours setting up the development environment required to create a Ruby/Flask/... project when you can achieve the same thing with a single PHP file. And when it comes to deploy it, virtually every single managed web hoster out there supports PHP, so you just upload the file and it works.

I did play around a bit with Flask a while ago and it does feel a lot cleaner and more efficient. But once you actually try to deploy your app you realize that hardly any web hoster actually supports the required Apache extensions and suddenly you end up having to set up your own server and fiddle with config files to get it to work.

2 comments

After you do it once you realize its not that hard to deploy. Nginx -> Gunicorn -> your app
What faint praise this is. "Not that hard". :)
It is even easier if you use Phusion Passenger, either in combination with Nginx or with Apache. It is almost as easy as PHP. Put your Ruby app somewhere, set your document root to it, done. Nowadays, Phusion Passenger even supports Django and Node.js.
I've deployed a number of small PHP-based websites in a similar way for similar reasons over the years. However, I think the next "simple" project like that that I need to do will be statically rendered from frozen-flask and hosted on S3, with any small interactivity provided on the client, with JavaScript.