326 points · by ZacnyLos · 4y ago · 100 comments
Kudos to the folks who built Castopod.
Now that file-based routing is making a comeback (https://enhance.dev), it would be interesting (and hilarious) to see it come full circle and we all go back to writing SSR with PHP.
Hello. I'm someone that never stopped.
Been paying my bills with PHP for fifteen years, and as PHP has gotten better and better I haven't regretted a minute of it.
For Node/JS folks, we've had "PSX" for decades in PHP:
<?php
function render($html) {
return <<< PSXRULEZ
Look ma, it's pure $html!
PSXRULEZ;I'd say the issue isn't PHP (8.1 is actually packing a ton of awesome features), but more so old PHP programming practices that are still very prevalent.
[1] https://martinfowler.com/eaaCatalog/transactionScript.html
As to how we're sorting that; pretty much the only major project I can think of that I'd describe as "actively legacy" in its codebase/style is WordPress, and that's a hairy discussion around moving forward vs. backwards compatibility of their plugin/theme ecosystem which is their primary USP.
Practically every other serious project has moved to the composer/PSR-4 autoloading model, and a lot of them also make use of static analysis/linting tools to squash potential bugs and enforce standards.
If you're a web dev company that values maintainable code you can weed out these legacy slapdashers in recruiting.
And those legacy projects out in the wild? Not my concern until someone brings one to us saying they want x feature added, we point out the Y,Z and Q faults / security issues with their slapdash code, and negotiate a price on a sane rebuild that'll be maintainable going forward.
It may be a bit of mess, but it's being made better little by little each day, and the naysayers can complain about PHP all they want, I'm still getting paid to write PHP.
You can probably in general estimate the expected lifetime of a language to be at twice as long as it has currently existed.
https://code.castopod.org/adaures/castopod/-/blob/develop/co...
Now seeing Laravel rebuilding the entire PHP ecosystem with a highly collaborative community, standard practices and tools is amazing!
Too bad I'm not investing in web dev anymore.
Also likewise to the team, kudos to the people who built Castopod
On Linux, production multi-PHP deployment is dead-simple thanks to the excellent DEB.SURY.ORG (for DEB based distros) and REMI (for RPM based distros) repos. It's also more common to deploy PHP via PHP-FPM and Nginx nowadays. Homebrew does a decent job on macOS too, multi-PHP deployment is also easy when coupled with Nginx/PHP-FPM. For Windows I have no idea but as long as you got XAMPP and MAMP, well :) Lots of Docker based solutions too like LocalWP (not just for WP), Lando, Laragon, DDEV to name a few.
There's also excellent support in editors/IDEs, either by default (in JetBrain's PHPStorm, Nova, KDevelop or Kate Editor) or via plugins for VSCode, Sublime Text, Atom and others.
Not specific to 7, but 2 things I think have helped a lot are:
* PSR standards * composer packaging
Initial PSR work helped define some package interop standards. I'm not sure how useful ongoing PSR work today is (no doubt there's some incremental benefits?).
Composer is a great package manager, and helped usher in a lot more sharing/reusability of common components.
Laravel bundles a number of Symfony components, for example (many frameworks do).
The speed alone in 7 was big, and we've seen some more incremental improvments in 8 and 8.1 and 8.2. It's hard to find current benchmarking tools that compare the 5 series with 7 and 8. I found one showing 5->7 on a mandelbrot run.
* PHP 5.0 was 251s
* PHP 5.1 was 87s
* PHP 5.6 was 29s
* PHP 7.0 was 15s
* PHP 7.1 was 9s
The 'experimental JIT' work (at that time) yielded 4s.
That benchmark was from 2016, so... way out of date now, but other numbers I've seen were 7.1->7.4 was another ... 10% improvement on average, and depending on workload, you might see another 10-20% improvement from 7.4->8.0.
Kinsta has some interesting useful benchmarks on 'real world' apps
https://kinsta.com/blog/php-benchmarks
Been using PHP since 1996, and ecosystem, community, performance all continuously improve year over year.
That’s not to say you can’t build great things on Laravel, and it’s undeniably sparking lots of creativity - I just wish the better competitor had won. Betamax all over again.
Lately though, I am beginning to get annoyed with Laravel due to way too many breaking changes with major releases literally within months and definitely a bit exhausted trying to keep up. I understand they are going full scale modernized approach but after Laravel 6, it has been too many major releases.
It's been a great experience. The developers and community is active on Discord (before that, I had only used irc and webchat) and they are always willing to help. The software is always getting new podcasting 2.0 features and actually feels exiting again, similar to podcasting circa 2004.
Awesome to see Podcasting 2.0 gain this traction. Hats off to Adam.
Great work though, don’t mean to detract from any of the hard work on the platform, and naming things is hard.
Started using it when other tools didn't have all the features that I need. I settled down and never compared tools any more.
My only problem with it is that some podcasts take a little to appear in its platform and nobody makes links for it. I'd like a single source of all podcasts.
I've considered trying others now and then, but since they usually came down to paying a fee to find and resubscribe to all of the podcasts I'm already subscribed to, I could never get over the hump and switch to one full time.
eww no thanks. less dynamic ad insertion the better.
The first half of this would imply that the second half is a lie...
the likes of amazon and amd and even adobe is funding blender so does that mean those projects are ruined by corporate money? https://fund.blender.org/
Being open source isn't everything, it's also about predicting the future development trajectory.
The product here is under a Copyleft license. Any derivative is at the service of humanity at large, today and tomorrow. It is much harder to exploit people this way.
Open Source has never served the users, it has always been about the editors. A Copyleft license is a good way just like a public institution at the helm is.
Corporations contributing to FOSS have agenda, but so have individuals. Being open source isn’t everything, but it is a damn good start.
Main thing about self hosted podcasts is the ongoing costs, not the RSS, stats or the like.
https://github.com/ad-aures/castopod/blob/develop/app/Views/...
Tight coupling of the HTML/PHP and JS.
If they were going to use PHP, at least they could have used Laravel or Symfony and had standardized libraries for authentication, views etc.
I just checked their Composer.json, looks like it uses CodeIgniter ... so maybe there is a framework in there but still the code quality is atrocious: https://github.com/ad-aures/castopod/blob/develop/composer.j...
Returning HTML code in a render function is even pretty standard, I've seen this in Python / Flask too.
Judging code quality is hard, it seems to me the best clue is how it is easy to add new features / do refactors without breaking things, not how you feel about PHP and HTML being mixed.