Hacker News new | ask | show | jobs
by open-source-ux 1895 days ago
Developers underestimate how difficult it can be to deploy server-side code for web apps or dynamic websites, particularly for less-technically minded users.

As other posters have mentioned, PHP code can be as simple as uploading files to a folder on a server using a GUI FTP app. (And for some non-technical users, even that might be too complicated).

By the way, Jeff Attwood (co-founder of Stack Overflow and one of the founders of Discourse), had this to say about PHP:

"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." [1]

When did he say this? 2012.

It's now 2021 and has anything changed? Not really. Yes, we have Docker, Cloudtron, or Sandstorm etc but none of these are simple or easy to install or use. (A developer's definition of 'simple' and 'easy' bears no relation to the real definitions of these words).

Whatever you think of PHP, consider the following question: what language can match or beat PHP for ease of server-side deployment?

[1] https://blog.codinghorror.com/the-php-singularity/

1 comments

But almost no one writes php alone. Maybe hobbyists or Wordpress users. When we talk about actual applications that talk to a db - people use frameworks. Is deploying a Laravel app so much cheaper or different than a Rails app? Yes if all you need a wordpress website PHP is obviously the way to go. If you're an app developer PHP loses this edge quite quickly. Also I'm not sure an ftp setup is easier than Heroku.
You "CAN" upload laravel to bluehost or any shared host and it will work, you may need to cut a few bits, or use external services for redis/sqs/etc if you want to use those things, or you could just use file/database for sessions/caching/etc.

I mean I started laravel on shared hosting, why did I use laravel for most of my career? Because the job I was hired for was to build a custom CRM for a book business, I was learning Rails so I spent 2 weeks on a rails prototype...

Boss gave me access to their hostgator account - shared hosting and told me to install it there. I stared blankly at them, um... okay.

Rails version I built in didn't match and I couldn't figure out for the life of me how to make it work...

Laravel 4.2 was almost a complete 1:1 match (in terms of directory structure) to rails and the language was just a bit different so porting what I had to laravel was a cinch and I had it done in 3 days and up on hostgator. No problems.

Also if you're like me and you freelance/consult, there's a TON more business in existing software/legacy than there is in new builds. Wordpress, Shopify, Laravel, Drupal, Magento, Salesforce are probably the FAANG of freelance platforms to learn to earn income from.

PHP is also generally faster than Ruby, and with Swoole it's sooo much faster (even than elixir/phoenix), so really why not use laravel/php. There's also tons of great packages out there and tutorials. The community is freaking HUGE.

Rails you even have to roll your own auth system or use devise which is a PITA. Laravel it's more opinionated but it's built for you including 2fa, social/oauth, etc..

Which isn't to say I wouldn't use fancier langs, I'm jumping at the bit to build some backend apis in rust or go for the hell of it, but only when I'm the decision maker as CEO/CTO on a side-project. For bread and butter I'll stick w/ what I know I can get paid for which is PHP/Laravel/Wordpress/Vue/Livewire/etc.

Shopify is Ruby based btw... But I'm not taking anything from PHP, it's a sound career choice with lots of big platforms (Wordpress/Magento). Just not sure I understand the deployment story. Deploying Laravel should be as easy or hard as deploying Rails.
Shopify is hosted.
> But almost no one writes php alone. Maybe hobbyists or Wordpress users.

What about that one guy who made https://remoteok.io/ using a single PHP file with no frameworks or libraries?

According to this live chart https://remoteok.io/open he made $88,000 last month from it alone with a 90%+ profit margin.

But more importantly it's a site that technically functions well and looks appealing. End users really don't care about which tech stack you used to build your site, they just want it to be fast, look nice and be easy to use which is achievable with pretty much any language or framework nowadays.

I don't know what this proves. Most people who talk to a db and grow their app will go for a framework, are you disputing that fact?
It 'proves' that a lot of people, yours truly included, do not use frameworks