News for hackers. Stuff that matters.

Ask HN: Which stack is as boring (good boring) and cheap in 2023 as PHP?

It is 2023 and I want to develop a web app (backend) as a part of an MVP. Here's the twist: I want to:

- use boring technology - iterate fast - deploy with minimal cost for now

The web frameworks I have used recently (Spring, Rails, Express, Django, Flask, Elixir) coupled with Heroku, or Fly.io, or Kubernetes - they just don't cut it for me. Don't get me wrong: I have used most of the above in production and they fit and perform well, not for an MVP though. The closest I had it to my taste was with serverless (Zappa on AWS Lambda), but it felt like the framework was quite immature by the time.

Some long time ago I have been using PHP. I only have vague memories of copying files over FTP, having my site deployed instantly, and at practically no cost (hey, even with a "shared" DB). Development was fun, but I don't know if I am romanticizing it now, or if the ecosystem was actually making it simple and fast.

So, to your taste, what compares in 2023 to the romanticized experience of PHP in 2000s? Or should I just "undust" my PHP and learn Laravel?

( 46 comments | on HN )
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by kognate on Saturday March 11, 2023 @03:49PM (#35112544)
I'm going to give an unpopular (in the sense of raw user numbers) suggestion: Swift deployed to AWS Lambda.

You can use a shared database, deployment is easy, the language is pleasant and fast. https://www.swift.org/server/guides/deploying/aws-sam-lambda...

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by alentred on Saturday March 11, 2023 @04:48PM (#35113127)
I new that Swift isn't exclusively used for the app development exclusively, but I would not have thought you can deploy Lambdas with it. I was looking for an excuse to try Swift, and now I have one, thanks!
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by scastiel on Saturday March 11, 2023 @03:54PM (#35112609)
Maybe it isn’t boring enough for you, but now I start all my projects with Next.js using its serverless features. It’s probably because I’m proficient with JavaScript and TypeScript.

If you don’t like/need React for frontend, you can just use the serverless part (I do it for some API-only projects). The deployment is very easy with Vercel (also possible at other places but I’ve never tried).

But, if you need some advanced backend features (similar to ActiveRecord for instance), maybe you should stick with Rails or Laravel.

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by alentred on Saturday March 11, 2023 @04:45PM (#35113096)
Oh, I didn't look into Next.js indeed, and I didn't know about Vercel. Thanks for these! I actually happen to like JavsScript a lot after ES6, so I'll give these a try.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by h4ch1 on Saturday March 11, 2023 @09:48PM (#35115919)
Instead of Next and it's bloat, you should try Svelte, a barebones Svelte (not SvelteKit) app feels like a breeze to scaffold and deploy through Netlify or Vercel with nearly 0 configuration. The same can be said about SvelteKit, though you can just get away by using a minimal router like Itty (https://github.com/kwhitley/itty-router) with barebones Svelte (just run npx create-vite, and follow the interactive scaffold process).
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by schwartzworld on Monday March 13, 2023 @09:13AM (#35135237)
How is barebones svelte an alternative to Next, when the latter is a full stack framework?
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by mcapodici on Sunday March 12, 2023 @12:16AM (#35116923)
Yeah I have settled on NextJS and Firebase as a nice place for rapid app development. I have based a free open source starter kit on this: https://github.com/mcapodici/firestarter
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by jstx1 on Saturday March 11, 2023 @04:06PM (#35112705)
What does cheap mean when you're picking between different free languages and frameworks?
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by alentred on Saturday March 11, 2023 @04:39PM (#35113031)
Well, cost is my secondary factor, but I am mostly impressed by DB pricing with PHP Hosting providers, which is usually included into the "hosting" offer.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by nextos on Saturday March 11, 2023 @04:34PM (#35112962)
Why doesn't Rails qualify as boring?
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by qup on Sunday March 12, 2023 @10:57AM (#35120761)
I think he means minimal when he says boring.

Rails is so boring I left it for five years, came back, and almost nothing changed.

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by satvikpendem on Saturday March 11, 2023 @05:06PM (#35113279)
I don't understand why Rails, Django, Elixir (Phoenix presumably) etc don't cut it for an MVP, what's your rationale for this statement? They're often lauded as pretty good batteries-included frameworks.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by satya71 on Saturday March 11, 2023 @07:56PM (#35114973)
Absolutely, sounds like OP is looking for serverless? That’s the opposite of boring technology.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by chrismeller on Saturday March 11, 2023 @05:11PM (#35113310)
I feel like I look for different things when I’m thinking “boring”. I would rather use .Net or Java for one simple reason - I know I won’t be rewriting the whole thing in a year when the ecosystem has suddenly shifted to the Next Big Thing, which seems particularly prevalent in the JS/TS/Node arena.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by tonyarkles on Saturday March 11, 2023 @10:38PM (#35116323)
I've never used .Net for webapps, but on the desktop UI side... they're not innocent on the Next Big Thing side of things. Silverlight, WPF, that XML-based one, Avalonia... I'm sure there were others. I do a Windows app about once every 3-4 years for a client and it feels like C# stays just the same but the tools for building the UI are completely different every time.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by nathants on Saturday March 11, 2023 @05:21PM (#35113389)
aws, go, and clojurescript.

go is notoriously boring.

the reagent api for clojurescript hasn’t changed in a decade, though recent things like shadow-cljs do improve qol.

aws releases services with 2 in their name instead of changing existing ones. the old boring service will plod along forever.

aws apigateway v2 is much better, but i have many deployed projects i will never migrate because they are fine on v1.

i do it like this: https://github.com/nathants/aws-gocljs

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by mousetree on Saturday March 11, 2023 @05:43PM (#35113566)
- Whatever you know best - Whatever has the most amount of batteries included
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by superasn on Saturday March 11, 2023 @05:49PM (#35113609)
> should I just "undust" my PHP and learn Laravel?

Definitely not a bad idea. Php has come a long way while composer and laravel has made dev a breeze.

You're absolutely right in picking up a good old boring stack and LAMP still rocks.

Also do explore laravel jetstream / interiajs if you get a chance.

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by mlhpdx on Saturday March 11, 2023 @05:58PM (#35113661)
For projects with no income and need time to iterate, particularly if not a full-time thing, I’ll sleep comfortably (i.e. enjoy the boredom) of using AWS CloudFront, S3 static hosting and API Gateway with direct integrations (to SQS, DynamoDB, and Step Functions). Literally zero maintenance, essentially zero cost while developing and at low volumes, and will scale-up automatically if/when getting traction.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by nullfield on Saturday March 11, 2023 @06:11PM (#35113766)
Except these are all proprietary AWS things, with perhaps the aside of “S3 is well supported elsewhere”. Why would someone want to do that to themselves, especially with how tightly coupled that makes things?

I don’t view AWS as a replacement for PHP-like stacks at all.

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by muzani on Saturday March 11, 2023 @06:16PM (#35113804)
What's the alternative to proprietary AWS? 000webhost? Buy your own server and own it all? Web3?
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by phiy on Saturday March 11, 2023 @06:56PM (#35114156)
Cloudflare has both static hosting + CDN. There are dozens of CDNs and hundreds of static hosts that you could combine.

GCP, Azure also exist with similar solutions

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by muzani on Saturday March 11, 2023 @07:08PM (#35114382)
I mean, whatever the problem with proprietary AWS, it seems like it would be the case with GCP, Azure, Cloudflare.

I don't really see the benefits of putting eggs in multiple baskets. If one basket is down (e.g. images) the site is practically down in many cases. Plus you have to deal with fragmented billing, etc.

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by satvikpendem on Saturday March 11, 2023 @08:00PM (#35115012)
How are Cloudflare, GCP and Azure any less proprietary than AWS?
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by ilrwbwrkhv on Saturday March 11, 2023 @07:09PM (#35114407)
Pocketbase and go is a nice compromise. You just rsync the compiled binary.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by muzani on Saturday March 11, 2023 @07:24PM (#35114643)
Boring stacks are nice for low features. I find the advanced tools works for things with a lot of edge cases.

To use an analogy, you can use PHP to build the Empire State Building, just not some of the other sexy glass skyscrapers. React is great for things like Twitter and FB which want to feel lively. PHP works perfect for things that are well, "semi-duplex".

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by phendrenad2 on Saturday March 11, 2023 @07:36PM (#35114788)
* * *
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by hoofhearted on Saturday March 11, 2023 @07:38PM (#35114815)
Yes Laravel! Its whole purpose is to easily setup quick prototypes that are highly scalable.

Also, Taylor Otwell is incredibly brilliant, and his code reflects it.

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by joshmn on Saturday March 11, 2023 @09:17PM (#35115674)
What problem are you trying to solve that Rails/Django, Flask, Elixir, or Spring couldn't solve?
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by revskill on Saturday March 11, 2023 @11:54PM (#35116813)
Deployment, scalability
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by kypro on Saturday March 11, 2023 @09:55PM (#35115958)
Learn Laravel. I use it on all my personal projects.

I have a boring webhost which is sat behind Cloudflare. I push my code up to Gitlab and have a simple deployment script set up which automatically SSH's into my webhost and pulls down my latest changes.

Laravel allows to me dev locally with ease and makes common tasks like form validation, db migrations and various other things a breeze. When I'm done I merge to main, `git push` and my changes are live. It's great.

If you have some experience with PHP and have been a web developer for some time you'll have no problem picking up Laravel. I've always found the docs to be great and it's very intuitive to work with.

Some years ago I was a PHP dev, but professionally I tend to work with Node, Java and Kotlin these days. I wouldn't use any of them for personal projects though. I find I'm far more productive in Laravel and the ecosystem is mature enough that I know anything I write will be good for years. Plus, deployment is cheap and simple. I pay a fix price (around $100 a year) for my webhost and for that I get "unlimited" domains, storage and DBs. It's a bit slow on it's own, but behind Cloudflare it works great.

PHP is super underrated imo. It's perfect for small - medium sized projects on a budget!

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by thomaslord on Sunday March 12, 2023 @10:32AM (#35120473)
I'll second the advice to learn Laravel!

PHP has gotten a lot better over time. For someone who hasn't used it since version 5 or earlier, writing modern PHP with a modern framework like Laravel will probably feel like whole new language. Speed has improved substantially, especially throughout the 7.x releases, and the type system has improved a lot as well.

Laravel itself is a great framework with amazing documentation, and it should be very easy to get started. The one thing I'd warn anyone who's written "old PHP" about is falling into old habits. It's easy to write the same old spaghetti code and jam everything into the controller, but your code will be much more readable if you do some practice projects and intentionally expose yourself to the modern way of doing things. If you've been using other languages in the meantime, this may be an easier transition for you.

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by spacesarebetter on Sunday March 12, 2023 @11:57PM (#35130829)
Which webhost do you use? And is it easy to run queues and schedulers on these webhosts?
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by ElCapitanMarkla on Monday March 13, 2023 @06:20PM (#35143854)
And if you have any rails exp, picking up Laravel is simple.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by Beaver117 on Sunday March 12, 2023 @12:09AM (#35116888)
The answer is PHP or Rails, just like its been the last 10+ years.

Anyone who suggests Go is severely out of touch. It's a great language sure but for a webapp MVP it'll just be a waste of time. I would even doubt any flavor of JS or Python could match what PHP and Rails have done for rapid web development.

I'm not familiar with Laravel but that seems like the natural next thing if you want to use PHP

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by dieselgate on Sunday March 12, 2023 @05:38AM (#35118292)
rails is my bias but django still has its place
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by t312227 on Sunday March 12, 2023 @03:31AM (#35117708)
2nd this:

if you already know PHP:

* PHP with a mature and well documented framework like laravel

if you already know python

* python with django :)

but imho. the deployment of python webapps in general - regardless if you use django/flask/... - is sadly a bit of a pain compared to the ease of PHP...

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by gnz11 on Sunday March 12, 2023 @07:27AM (#35118881)
Deploying PHP is only simple if you already have a web server up and running that someone else is maintaining. Otherwise deploying a PHP web app involves the same complexities as deploying a Python web app. I would even be inclined to say that deploying with gunicorn is even simpler than any PHP setup.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by thomaslord on Sunday March 12, 2023 @11:11AM (#35120940)
I just took a look at Gunicorn and, while I'm probably a bit biased as a PHP developer who also maintains the infrastructure, I think setting up PHP is almost exactly the same as setting up Gunicorn.

The Nginx config will look a little different, but it requires roughly the same number of lines in the config file. In both cases a first-time user will probably be doing a Google search for a tutorial and following that tutorial, and in both cases it's pretty much as simple as copy/pasting in the installation commands and then copy/pasting the Nginx config and modifying it to suit your use case.

PHP has the advantage of allowing you to use shared hosting if you really want to, which is great if you're just getting started. Definitely not what I'd want to use for anything resource-intensive, but at least there's a way to build a basic site without setting up the server yourself.

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by xupybd on Sunday March 12, 2023 @03:46AM (#35117787)
There is the feeling that tools have gotten worse over time that complexity has snuck in and older ways were better. That's true but it's because you have to deliver more complex solutions now. Expectations have increased.

The simplest experience for me would be ASP on .net. It's boring, mature and quick.

But if you know PHP just go with PHP. Laravel is great.

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by Felminor on Sunday March 12, 2023 @05:08AM (#35118169)
Puh PHP is still super shitty.

Alone debug support on any Jim based language is so much better.

I would still recommend spring boot with normal pages (templated) so no frontend ja stuff. That should be the easiest and best supported stack.

I would also still do cloud native.

Configuring, upgrading, monitoring etc is so much easier with some cheap k8s behind it (managed by argocd).

Database: managed postgres.

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by Felminor on Sunday March 12, 2023 @05:12AM (#35118191)
Totally forgot about what I really like:

Quarkus with kotlin.

Kotlin makes so much more fun than java, runs on JVM too. Unfortunately it adds a kotlin complexity layer over quarkus which can add issues

Re:Ask HN: Which stack is as boring (good boring) and cheap ... by snowe2010 on Tuesday March 14, 2023 @01:37AM (#35147797)
We use Kotlin with quarkus with no issues. I love it. We also compile with graalvm and deploy on AWS lambda. It's amazing honestly. But it's complicated. I wouldn't really suggest it unless it fits your use case.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by gardenhedge on Sunday March 12, 2023 @06:02AM (#35118383)
Remix Run
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by aww_dang on Sunday March 12, 2023 @06:26AM (#35118500)
Servlets without Spring, just add Apache commons dbcp. Jetty + Postgres + HAProxy.
Re:Ask HN: Which stack is as boring (good boring) and cheap ... by jray on Sunday March 12, 2023 @09:32AM (#35119852)
Laravel (php) or Rails (ruby).