Hacker News new | ask | show | jobs
by joelbluminator 1895 days ago
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.
2 comments

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