List of resources for asynchronous programming in PHP
github.com/elazar/asynchronous-phpNot downloaded yet
In this archive from Jul 2014 to Apr 2021
I've just published a thing, which I think some of you might find interesting. From the TL;DR: Caleb Porzio demonstrated some work he’s been doing to replicate [Phoenix LiveView](https://dockyard.com/blog/2018/12/12/phoenix-liveview-interactive-real-time-apps-no-need-to-write-java
EDIT: since my comment has more Karma, I’m hijacking it to link to a response by Caleb (the creator of Livewire) below: https://www.reddit.com/r/PHP/comments/eu14s8/making_the_case_against_laravel_livewire/ffpcof4?utm_source=share&utm_medium=web2x
I'm probably a little too close to Livewire to respond in depth to this, but I'll point out a few factual inaccuracies, and make a couple suggestions:
You shouldn't be putting code you would usually see int he model inside your Livewire component, etc. I can understand the resistance to separating the view model layer between server and client, but that's not an SoC problem, and it's arguable whether it's a problem at all.
Livewire isn't a replacement for your rich front-end layer. It's PHP with some help to make the front-end more responsive. If your PHP server fails (in a JS-free app) then the app fails. Same constraint here.
For this same reason, I don't agree that Livewire forces you to violate SRP.
It can be inefficient, depending on how it is used. It also attempts to reduce that with built-in debounce and lazy binding etc. I'm sure egregious cases can be raised with Caleb...
Nested components can be reactive, by using keys. Caleb demonstrated this on Matt's recent stream, and I've been using keys to make nested components reactive in prod; for a while now.
Your Lack of Support seems more like Doesn't Have The Tools I Want, and probably never will. Caleb is 1 dude, not an entire team and Facebook. Help the guy out with some dev, or...like...understand the fundamental limitations.
Since version 0.6 (I think?) Livewire supports models and collections in public properties. It has supported casts longer than that, which actually solve the same problem in a way that you can pass additional custom types to the view layer. Perhaps this is a problem you encountered in an older version?
Here are the suggestions:
It feels like you could have sent this entire article to Caleb, and he would have told you all these things I've told you, first. The project is really young, and articles like this can do it real harm, by spreading misinformation. If you had his (and the project's best interests) at heart, that seems like something you might have wanted to do in the first place.
Watch Matt's last 2 streams about Livewire. They address some of what you've spoken about here.
Laravel 5.4 is 5 months old, Vue 2.0 is 9 months old. My 9-month-old can't even digest hard food properly...
Silence! This is a gift. Accept it with gratitude or indifference. It has no teeth or mouth.
When a model returns a
$this->belongsTo()relationship; and the ORM uses stack-trace reflection to figure out the name of the related type.Not that I mind...
You can pronounce it as see-a-mess.