8 ms·
I don't know which surprises me more: that they continued to use PHP in their move to serverless/microservices or that nobody else on HN has questioned this poi
by mikece 3y ago
I don't know which surprises me more: that they continued to use PHP in their move to serverless/microservices or that nobody else on HN has questioned this point yet. I totally get why they would keep PHP: they have the language/platform experience already and AWS supports it (which is really more than enough to silence the "You should have switched to {other_language}!" partisans). Plus, I imaging non-trivial amounts of copy & paste of proven functions was key to moving from monolith to Lambdas... why change the code if it works?
- yaseer 3y agoI'm wondering if PHP's reputation has been rehabilitated somewhat in recent years. At least amongst those who understand the significant changes in modern PHP, and the difference a stable framework like Laravel makes. I've found PHP with Laravel a stable and solid workhorse. Good for getting things done quickly, and then a stable system over time. In contrast, I've gradually become disillusioned with the node.js and JavaScript/TypeScript ecosystem over the years. You can build quickly, but the systems turns into a pain to maintain and update.
- kypro 3y agoIt genuinely amazes me that Node is as popular as it is, especially within large mission critical businesses. If this bank was using TypeScript no one would have questioned it, but you're right, TypeScript is a nightmare to maintain. I probably only use about half of packages I used 5 years ago because either those packages are no longer maintained or the community has switched to some other package that basically does the same thing just in a slightly different way. There's also no real industry standard ways to do anything in Node. You find 10 different Node CRUD projects and they'll all do things completely differently. The PHP ecosystem on the other hand tends to be less fragmented and these days with frameworks like Laravel the code is generally also pretty good. I think it gets a bad reputation because in the 00s there were some truly horrific PHP projects out there and the language itself was quite immature and poorly designed. That's not the case anymore though. These days I struggle to understand the hate it gets. It's certainly no worse than than Node.
- justinsaccount 3y agoIt also makes sense if you look at things in the context of Choose Boring Technology [1]. If you have a working PHP app and want to scale into the cloud, you can use a single innovation token to move the app into lambda. This is the key sentence: > To do a controlled migration, the team deployed the application both to the servers and to AWS Lambda. Only 10 lines of code needed to be changed to run the monolith on AWS Lambda. [1] https://mcfunley.com/choose-boring-technology https://mcfunley.com/choose-boring-technology
- mikece 3y agoInteresting to re-read that article again and see that technologies he cites as so cutting edge you're spending innovation tokens on them are now mainstream and very well understood. What would the new "you can use those but you're spending innovation tokens!" technologies would be. Rust? AI? CGP?
- djbusby 3y agoAI for sure. Rust maybe less. The big thing about these tokens is, folk spend them too early and try to use them for everything. Part of choose boring is more about choose the right tool. Would you build a PoC webapp by having AI generate Rust? Or, just bang out a few lines of PHP or JS? If the objective is to build a working business tool it's choice B; if the objective is to test AI making Rust then A
- bogota 3y agohur dur php bad because they told me
- romanhn 3y agoI mean, it's not like that sentiment is totally baseless. I've used PHP years ago and both language and core libraries were not well-designed and came with many footguns. I've heard that modern PHP with frameworks like Laravel fixed a bunch of this, so presumably it's quite capable these days. But PHP certainly wouldn't be anywhere near the top of my go-to list at this point.
- munk-a 3y agoEh, at this point can we just stop with the echoing of old memes? I used PHP4 and have used it continuously up to the modern day. If it's not your choice of language that's fine - language choice is pretty unimportant in the grant scheme of things... that said, it can do everything you need it to do (outside of low level memory control). If you need bit-efficient data structures it isn't going to be a good fit... but compared with most other system programming languages it's fine. I'd even go so far as to say it's one of the leading language in terms of meta-programming at this point with an excellent Reflection suite and great built-in magic methods.
- rob 3y agoIt's alright. I'll be busy getting some easy WordPress work that's fun to do (especially if you use Laravel with it with the roots.io ecosystem) while people are trying to get their obscure Rust blog with leptos/X to compile to WASM so they can deploy it to fly.io and use their remote hosted database for 5 users/month.
- Muromec 3y agoI think the point of making the blog on whatever cool tech of the day, instead of wordpress is later getting a job involving said cool tech, not the blog itself.
- stronglikedan 3y agoPerhaps we're finally at a point on HN where people realize there's no need to question the use of PHP. it's a robust, capable language that's just as, or more, suitable for the majority of use cases as any other language.
- zelon88 3y agoI think most of that was coming from the (then) next generation JS crowd who was trying to fit everything into one neat little box. They've since burnt themselves out and found the limitations in their approach during the process.
- Muromec 3y agoI’m the usual suspect for shi^W questioning php and I think you are wrong about demographics.
- solardev 3y agoJust a perspective: PHP 7+ (the language) was wonderful, especially compared to Javascript's woefully inadequate standard library. It had so many helper functions that made even working with JSON and big data objects much easier. But having to manage its buildchain wasn't fun (meaning needing to containerize a web server, PHP-FPM, etc. for every trivial deployment). Then needing to support an OS behind it with updates and such, even Dockerized. For serverless in particular, the availability of V8 isolates (like in CF Workers) or other "just run this snippet of code and don't bother me about the infra" services (like Lambda) or "I can host my serverless in a file alongside my other frontend stuff" (like on Vercel/Netlify) means that JS functions are pretty much zero-config 1-click deploys. Is there anything like that in the PHP world? For Bref, for example, you have to set up a lot of stuff before the serverless will run: https://bref.sh/docs/setup https://bref.sh/docs/setup For Google Cloud Run (which supports auto-scaling containerized PHP, not true serverless but closer to it than a full VM), you have to manage docker: https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-php-service https://cloud.google.com/run/docs/quickstarts/build-and-depl... Maybe the closest one I know of is a Google Cloud Function (https://cloud.google.com/functions/docs/create-deploy-http-php https://cloud.google.com/functions/docs/create-deploy-http-p...) which comes close to the "function as a service" of JS serverless, but you still at a minimum have to deal with a tiny folder structure (index.php + composer.json). Is there anything similar on AWS or elsewhere?
- mikece 3y agoDid I get voted down because I actually agreed with keeping PHP rather than changing languages? I don't care about the karma points, just curious if someone thought I was attacking PHP because they didn't read the whole comment.
- mjburgess 3y agoit would be nice if HN had a random "explain your vote" mode where voters had to choose from, eg., agree, helpful, insightful, etc. vs. disagree, unhelpful, provocative
- mikece 3y agoI will admit that I've made trolling comments from time to time which get well-deserved vote-downs, but there are certainly times where I would like to know what the point of disagreement is because if I'm missing a point of view from which I could learn I would like to know!
- solardev 3y agoIf only there was some other famous tech forum with a descriptive voting system that we could learn from... (https://slashdot.org/faq/mod-metamod.shtml https://slashdot.org/faq/mod-metamod.shtml)