I Really Miss Laravel
old.reddit.com
old.reddit.com
All have their different upsides and downsides. But the past 10 years as a software developer has taught me one thing above all; I'm sick and tired of every paradigm shift being sold as a silver bullet.
There. Are. NO. Silver. Bullets.
If you look up ideas or methodologies and they never present both upsides and downsides they tend to either posses limited knowledge on the subject matter or they're trying to sell you their idea.
I still remember a meeting with all senior devs at a large client about pitching microservices deployed on kubernetes. I was the only one to state that we'd be shifting complexity and not eliminating it. My remark was voted to be removed from the report, because it sounded too negative.
Years later, and hearing how terrible it turned out, I'm still shaking my head.
The best technical skill any senior can have, is to get a feeling when to ignore fashion, and when to actually pay attention to fashion that stays around.
Almost two decades later most is these are taken for granted in mature teams.
On the other hand, some tools and techniques are on a continuum: microservices/monoliths, thick/thin UI clients, schema/schemaless databases, SQL/ORMs, strong+static/weak+dynamic types. A team needs to carefully consider their project to determine what fits best (and it might change over time). None of these are "always the right choice." We have very little science about how to accurately determine the needs of a project, so we get a lot of hearsay and fashion.
> The Correct Way [(tm)]
To many people today believe that their way is the only way. But sometimes the boring technology is way better than the latest stuff. Bot to say that boring tech is always better, but asking the question "Wouldn't ... be enough?" is a valid question - and the answer "no" is also valid to it.
I love JS/TS, I really do. I love the syntax, I love almost everything about it. Packaging and commonJS vs ESM are the worst. It feels like black magic and problems take me a long time to fix. In the end I’m not always clear on why there was a problem in the first place.
I use raw PHP at my $dayJob (and have for almost a decade, well I used CakePHP and Laravel at other jobs) and I’ve got to say PHP can be pretty great. Most my annoyance with it comes from specific historical decisions the company (or I) made and not the language itself. Laravel provides a very nice layer on top of the crufty parts of PHP and while it sometimes over-complicates or over-abstracts things I do really like Laravel.
There just are less things in PHP that are “show stoppers”. I hope that things like Deno make wiring the language I love, TS, easier and less of a pain in the long run but today PHP is easier.
Sharing code with the front/backend is really nice in TS and only thinking in 1 language is great. Also serverless, for all it’a downsides, has one major upside: I don’t have to think about scaling almost at all. I know that’s not 100% correct but it gives me a massive peace of mind. My business is very spikey/bursty and so this matters a lot to me. Cold starts suck but once you get going it’s great. Also using Lambdas as “glue” for queue or just little self contained bits of logic does feel like magic. We use it at my $dayJob for things that we need to scale at a moments notice and it works like a charm.
I know you can run Laravel on Lambda but I do feel strongly that it’s not the right move to force a monolith into a Lambda (see also Express). I think serverless requires a custom/no framework because it’s just very different from normal deployments.
You can do the same with a dump server and a few scripts, and for cheaper. Im sure these people would be shocked to how aws or other cloud vendors implemented it
That said, even with SST it’s hard to beat PHP (or other languages) for DX.
- No access to native cron
- Remote database (latency)
- Cold starts
- Function timeouts
- Memory constraints
- Limited runtime
Using Laravel in a serverless environment would introduce the same restrictions.