Laravel Livewire vs Vue.js
Technology is taking the world, at a very high refresh rate ... What about Livewire and Vue.js
Laravel decided to optionally include Vue.js in its Framework installation. So it was a logical decision to choose Vue.js as frontend framework, and so did I. Since 2016 I’m using Vue.js for all the new applications I build.
One day I wanted to build a documentation platform for our company. When building stuff like that, from scratch, I love to try the new things that come along. I noticed Laravel Jetstream, a new tool, being a hobby project of Taylor Otwell. I could choose between a Vue.js + inertia implementation or the Livewire implementation. The what, Livewire … I never heard about it, and it caught my attention. I wanted to discover this new piece of software.
I discovered the playground of Caleb Porzio, a former Laravel / Vue.js developer at Tighten. I read all his stories, and I was an instant fan of that guy, and his tool(s) … That man describes the same feeling as I feel in this video – you really MUST see this video – somewhat te same as my chapter about Vue.js. Damn, why haven’t I used Livewire before … oh yeah … the 1.0 release was in February 2020, it’s brand new !!
What is Livewire ? Livewire is a full-stack framework for Laravel. You can only use it with Laravel because it is tightly linked to the backend. So it is impossible to use it for applications that live totally separate from the backend – it is connected to the backend. So that is the negative part … For those applications where separation of backend and frontend is a must, via an API approach, you’ll have to stick to Vue.js.
I’m using Livewire for a while now, testing its boundaries before using it in client projects. I’m testing it out with a friend of mine ( mister V. ), in a skeptic way. A skeptic way because we want to be sure that everything we do with Vue.js can be done with Livewire. Yesterday we ( he in fact ) tackled the last big challenge … Infinite scroll seemed a conceptual problem, but it is solvable in a neat and reusable way. Mister V. is even more skeptic than I am, but his enthusiasm is growing and the skeptic is disappearing !!
There is no build process. I think the development process can be speed up with 50%, while keeping interactivity in place for the end user.
You can still use all the Laravel superpowers like routing, validation, error bags and so on. And because of the interactivity added via Livewire your error messages will automatically become visible without refreshing your screen.
this article has been read 37 times