0
Nmeri17
2y

#Suphle Rant 2: Michael's obduration

For the uninitiated, Suphle is a PHP framework I built. This is the 2nd installment in my rants on here about it.

Some backstory: A friend and I go back ~5 years. Let's call him Michael. He was CTO of the company we worked at. After his emigration, they seem to have taught him some new stack and he needed somewhere to practise it on. That stack was Spring Boot and Angular. He and his pals convinced product owner at our workplace to rebuild the project (after 2+ years of active development) from scratch using these new techs. One thing led to the other, and I left the place after some months.

Fast forward a year later, dude hits me up to broach an incoming gig he wants us to collab on. Asks where I'm at now, and I reply I took the time off to build Suphle. Told him it's done already and it contains features from Spring, Rust, Nest and Rails; basically, I fixed everything they claimed makes PHP nonviable for enterprise software, added features from those frameworks that would attract a neutral party. Dude didn't even give me audience. I only asked him to look at the repo's readme to see what it does. That's faster than reading the tests (since the docs are still in progress). He stopped responding.

He's only the second person who has contacted me for a gig since I left. Both former colleagues. Both think lowly of PHP, ended up losing my best shot at earning a nickel while away from employed labour. It definitely feels like shooting myself in the foot.

I should take up his offer, get some extra money to stay afloat until Suphle's release. But he's adamant I use Spring. Even though Laravel is the ghetto, I would grudgingly return to it than spend another part of my life fighting to get the most basic functionality up and running without a migraine in Spring. This is a framework without an official documentation. You either have to rely on baeldung or mushroom blogs. Then I have to put up with mongodb (or nosql, in short).

I want to build a project I'm confident and proud about delivering, one certified by automated tests for it, something with an architecture I've studied extensively before arriving at. Somewhere to apply all the research that was brainstormed before this iteration of Suphle was built.
I want autonomy, not to argue over things I'm sure about. He denied me this when we worked together. I may not mind swallowing them for the money, but a return to amateur mode in Spring is something I hope I never get to experience soon

So, I'm wondering: if his reaction reflects the general impression PHP has among developers globally, it means I've built a castle on a sinking ship. If someone who can vouch for me as a professional would prefer not to have anything to do with PHP despite my reassurance it'll be difficult to convince others within and beyond that there could be a more equipped alternative to their staple tool. Reminds me of the time the orchestra played to their deaths while the titanic sank

Comments
  • 0
    @horus thank you for the goodwill. Do you think nothing new is still built in PHP because it already has everything it needs, or because nobody uses the language? It still has quite a bit of action going on at the language level. Guys try to push it in the forward direction by proposing RFCs that Internals members vote on. I'm in the minority of those who think these language level/syntactic updates are not real progress. We can already do those things, just not with the elegance of syntactic sugar

    But yes, you are correct about nobody building PHP frameworks in 2022. I've seen 1or 2, but usually toy projects ie nothing worth advertising. I could say the same for the plethora of Node frameworks but at least, they've got the performance bar charts to gloat with

    Yes, I'm an advocate of Hotwire, although I wish I've had hands on experience with it to judge how well it integrates with Suphle's recommended template engine.

    Discriminating against PHP devs (before evaluation) is unfair
  • 0
    @horus it's disheartening to hear your pals regurgitating the same vibe as mine. I attributed mine to the fact that most of them aren't developers and merely rely on the false information bloggers/YouTubers spew. It's astonishing how, by repeating the same narrative, the damage has been done. It'll probably take another generation of bloggers to sensitize that psyche. Otherwise, the language will die

    Actually, it's only the community that I hear of scarcity of PHP devs. I'm on a laravel group and an ardent follower of the PHP subreddit. The only thing I can say is that there are fewer new recruits than before. Which shouldn't come as a surprise since teachers will recommend trendier stuff like JS

    A PHP Foundation was setup in 21/22 but I doubt this sort of awareness is even part of their agenda. Even though it's urgent, it'll be hard to convince them without the backing of concrete data proving a drastic decline in popularity and impending demise
  • 0
    @horus you'll hear rhetorics like "PHP has been dying for the last 20 years", "PHP powers 80% of the Internet", "there are only 2 languages: the ones people complain about and the ones nobody uses".

    > so no websockets

    Now, that's in the past. There's a number of projects right now that enable such functionality, most notably: amphp, reactphp, swoole, spiral (powered by a golang executable called roadrunner, which suphle equally uses)

    Who knows, maybe the features you're missing have been implemented already. Are they OOP or functional? The language is heading farther in the OOP direction and I'm grateful for that.

    Here's a link on how to vote on RFCs https://wiki.php.net/rfc/voting/...
  • 0
    @horus I'm not a voter yet. I posted a link on how to become one in the immediate next answer after that

    On a second thought, an audacious effort such as a runtime proxying calls to native APIs (eg Flutter, NativeBase) could revive strong interest in the language again.

    > Is this feasible

    I didn't think it'll be feasible for dart and kotlin to run on the server, yet look, they've got serverpod and ktor respectively. It remains to be seen whether anyone will consider this task worth undertaking and devote required years to pull it off
  • 0
    @horus exactly! Roadrunner is a server and loadbalancer written in golang. It bridges calls to the server to PHP workers. The fact that swoole is bundled as a PHP extension means the server lives eternally and isn't a PHP event loop. You should take a cursory look at them

    There are tools that make static type checking, code style enforcement for multi contributed projects, parallel testing, concurrent database access, etc. All Possible right now in PHP. Typed properties, enums, constructor promotion, native attributes etc

    The generics/typed arrays RFC has been talked about so much. I think there has been 2/3 official RFCs proposing it but it never mustered enough votes to balance out the percentage vetoing it. I don't get what the rave about it is. The objects you work with/data sources will pretty much return a predictable collection

    About joining the voting process, you can either contribute to source or speak to notable contributors/voters regarding an inclusion
  • 0
    @horus so much for a language in decline. What do you make of this

    https://twitter.com/mwop/status/...
  • 0
    @horus sad. Fooled me into thinking you're open minded or receptive to the language's good fortune. We spoke about this extensively on this thread. Did I, at any point, give the impression of one alien to stackoverflow surveys??

    Anyways, you made mention of surprise at ongoing activity within the language, following the RFC, etc. This newsletter https://blog.jetbrains.com/phpstorm... is loaded with monthly events taking place. Might want to subscribe. That's actually where I saw the tweet I sent earlier. There is usually so much to catch up on, it can be overwhelming
  • 0
    @horus alright, then. Thanks for the heads up. If generics matter that much to you, you may find this project interesting https://github.com/mrsuh/....
Add Comment