The best mental model for the current trend of web development, is a spiral. We are not going in circles, we are moving upwards along a spiral staircase. Meaning that while we are going back to server side rendering, we are also a lot more clever about how we do it and its vastly different from what we had in the past.
@@dogoku Such a nice way of putting it! I can see why people can think of this as "hey we are making the same mistakes over and over", but it is clear that we went through various stages of evolution before ending up where we are. A lot of smart people think about this every single day to make incremental progress. On hindsight we can see how PHP from the 2000s got a lot of it right but imo the only piece that was missing was the interactivity and that is where jQuery came in. To me, we had to go through a lot of stages to get that fixed up, and it has not been simple, but we are clearly in a better place than where we were 15 years ago. My 2 cents...
12:00 If I am not mistaken, in .NET Blazor you can use simple logic (e.g if statement) to render a loading state and it will do a partial render and update via the websocket when ready @if (data == null) { Loading... } else { @data }
@@gcash49why? laravel is also community package, livewire is also community package, etc etc. go inertia is more than 10x faster than laravel inertia, less buggy, easy to create concurrent program, many libraries, easy syntax not like php bad syntax, etc
It's unfortunate that they are not officially supported. I use Django for ages and it's fine for what I'm doing, but the Django adapter lags behind and the adapter development is very slow. I wish I have more skills (or money) to fix this situation
Really dope to see where Laravel and Inertia is going throughout the years! It’s starting to look so much better than what I’ve had to experience using it during my collage journey. 🎉
Nice to see you talk about Inertia. I have plans to write an adapter for Django soon, because the existing one is a bit abandoned and not so good. I really beliave in Inertia.
wasn't the whole point of using JS in the server so you have your frontend and backend in the same language ... idk why would I ever do php or python; might as well use Java, C# or Go for better performance
Same as Apple devices, its about ecosystem. Like checkout Laravel Queues documentation it goes on and on with features and ease of use. And then there are other tools in the ecosystem like Pulse, Horizon, Socialite etc. all first party supported. Tired of that then there are spatie packages. Also PHP is not slow, in raw benchmarks if something takes 30ms in Go it would usually take 70-100ms in PHP vs 400+ ms in Python. In real backends the difference with Go vs PHP should be even lower due to I/O bottlenecks.
@@SiddharthPant But if it's about ecosystem, wouldn't you rather GET what's in phpland to JSland rather than go there yourself ... like I would prefer Next or Remix or React Router to implement those inertia innovations rather than use inertia itself
‘Our front ends need to know more about our back ends, and our back ends need to know more about our front ends’ - next thing you know, Theo will invent ‘MVC’. Let me introduce you to this cool new language, its name is “Smalltalk”.
3:22 Huh?? It's been a while since I developed with PHP (and Laravel) professionally, but I swear, passing data between the BE and FE worked exactly the same way 6 years ago.
You passed this to php server side layer. If you wanted to have the same data on client side JavaScript you needed to also create an API endpoint to hit it manually with a fetch request. Inertia streamlines boilerplate generation and makes passing data to JavaScript frameworks as effortless, as passing it to php blade templates
@@ar1i_k I get that, but again, I could have sworn that I watched a Laracasts episode about 6 or 7 years ago where Jeffrey did this exact thing, passing data between a Laravel BE and a Vue SPA FE. But maybe back then, it was some sort of "hack" and now it's a finished product? Or maybe I'm misremembering completely, that is also a possibility of course.
@@ChristophFloat ahhhh… No inertia existed even then, sorry for misunderstanding. It’s just wasn’t as versatile and feature-complete solution (like Theo mentioned - “good luck with polling or infinite scrolling”) so most people didn’t bother adding a layer of complexity “to avoid writing api endpoints” when we still would need to write them anyway. Now that Inertia 2.0 removed most of the old pain points, we may actually use it “to avoid writing api endpoints” and it finally looks like a good default option for Laravel devs (and absolute magic for outside observers like Theo)
When you say React plugins do you mean like the UI of a Wordpress plugin? I know you are able to use react for Gutenberg blocks but I wasn’t aware that you could use them for the plugins themselves.
@@MrJfergs I make a complete Wordpress plugin using ReactJS/TS/Tailwind + InetiaJS-2.0 with Tanstack State + Tanstack Query + Websocket I used some other packages but forgot exactly. But you run it with a special Wordpress build tool provided by Wordpress. But the end result is you can build using 99% ReactJS and InertiaJS allows you to not have to do a bunch of complex API coding.
@@MrJfergs As ChatGPT 4o how to do it. Ask a few different ways and then you can do things in Visual Studio Code. I use a Hyper-V VM with Fedora and NGINX, PHP, Node, etc. so I can have a very fun and fast coding experience.
Wondering how the API peeps feel about the responsibility bloat - There’s a decent chunk of client-side responsibility being allocated to the API - stuff that’s usually pretty UX driven. Getting that much closer to the end user means taking on UX concerns and a chunk of client side architecture - quite a different thought process especially given the traditional separation of concerns
Wrong way to look at it imho. If you are using Go as your webserver, it should be _because_ you want to use a mostly _buildless_ frontend like alpine-ajax or htmx (because you want to escape serverless hell and use your own VPS). If you want to use modern JS frameworks, they are unfortunately largely tied to having JS be the backend specifically for _rendering._ Alternatively, you can let NextJS do its rendering with JS regularly and then use Go ONLY for your REST API, thus a "hybrid" solution.
The benefits are enticing. But I've also heard arguments against Inertia. In the spirit of Proverbs 18:17, I'm curious if anyone with inertia experience has a rebuttal to these claims I've seen online: 1. Inertia doesn't work with large teams 2. Bigger teams benefit from split code bases 3. Inertia means all your devs have to be "Full Stack"
In python you have a thing called pydantic. You can model your application using it and from there generate typescript types you use on the frontend. It's surely not "the final solution" but worked pretty well for me. Probably other languages have similar libs
Screw Adonis. Adonis is a Laravel copy that has no chance of ever really being good, as they've barely have the experience and/or knowledge as to understand why Laravel does things the way they do, and instead they just copied it verbatim and went from there, and it makes sense why: They liked Laravel, but want it in JS. It's a great compliment to Laravel sure but it's terrible decision making. Just use Laravel and PHP, or use another actually-native JS framework and contribute any missing Laravel features to that.
@@heckintosh2994 Could you explain how it has shown "terrible decision making", objectively please? It is my understanding that it borrows from not only Laravel but also Rails and Django.
We are trying to move off Inertia because of how limiting it is at work. It's great for small/inflexible apps but it quickly becomes unwieldly as you scale.
APIs are versatile and most serious application can profit from them. Alternative, to write two or more backend applications doesn't sound like fun to me.
That's awesome🎉🎉🎉, using a js front end library should not force me to fetch my data only via the wire, it should not be opinionated about the data fetching mechanism
I'm just curious, why in 2025 you don't have type safety? They could add some types generation. That's why Next/Astro are good, all your server actions return type is defined
Worked at a company with 2 teams, Laravel and React. I once had to make some from end changes as the average react dev is better at front end than a laravel developer (In my experience). It was hell setting up my machine to run laravel. I see what you did with the terminal commands and all. Nice stuff really! And btw I still await folders on uploadthing. PLEASE WHEN FOLDERS???
Do you mean you could not install PHP and Composer?? Because Laravel does not require any runtime or special configuration. It was always a one liner to install and one command to serve. Installing PHP and composer can be done in docker, in local environment, with HomeBrew or even install Laravel Herd which is a manager for laravel apps and it installs/configures everything automatically.
@@nicolas_vl Wasn't so much the installation but the getting everything to work together part. Maybe easier to set up a project from scratch, but puling one wasn't the DX I was expecting. Got it to work, but it was a hassle
@@oddfeeling7956 I don't know? But after you set up your environment, you could have spent time setting it up for future developers. Be the change you want.
Hey, have you f'd around with AdinisJS? It has an inertia adater, so we can use actual js on both backend and frontend with all typesafety and goodies it brings to the table.
@@heckintosh2994 lmao have you been out of web dev for the last decade? Literally everyone and their mom uses js in the backend, even all the top 10 companies in the world that have millions to make their website shine use nodejs, there must be a reason dont you think?
It is difficult to justify migrating from one interpreted language(TS) to another(PHP) on the backend. Specially so if you consider that typescript's typing is more advanced than PHP's. I've used laravel before. It is an awesome framework and a lot of thought has gone into it. but it is held back by PHP. When you weight all the variables, there are just disadvantages of using Laravel over any node solution. If I'm moving away from the JS land, then I'd probably pick go, rust, C# or any other compiled language way before ever considering PHP as an option.
AdonisJS have their own official adaptor for it too (that apparently has Inertia 2.0 support). Of course that's a degree of separation from the OG Inertia implementation but might be worth a shot if you wanna stick with Node and you're happy with a typical 12-factor app deployment (vs e.g. serverless). From what I can see there's also a few outdated generic Node, Express and Hono adapters but they're all about 2+ years old, unfortunately.
Template parsing leads to script injection. SSR Vue, svelte or react (which Inertia supports) doesn't have that problem, since it's context aware. This is the #1 reason I stopped using php
I dont even like using LaRavel because it adds to much redundancy to my projects. I like using their templating and routing so I choose the parts I like via Composer. I will look into this in the future but again I follow the KISS principals. (Keep It Simple Stupid)
That’s why by default Laravel creates two layers protection on user model ‘’’php protected $hidden = [“password”]; protected $casts = [“password” => “encrypted”]; ‘’’ Where $hidden prevents password field from being serialised. And “encrypted” cast, encrypts password when you write it into object in memory (way before writing it into db) and decrypts only when accessing password manually. If hackers gets the memory dump of a process all they gonna see is encrypted version of passwords. The real problem with ::all() method is that it gets ALL rows in the table, even if there are millions of rows amounting to gigabytes of data. It is strongly advised to use ::paginate() method, and/or add proper “where“ filters to sql query builder. But all the additional code won’t make a simple tutorial example
Literally after the ::all() in the docs there is an explanation about exposing sensitive data and the solution that is already implemented for it. Laravel handle theses things better than you imagine if you dont know Laravel
lol my reply got auto removed but I still getting notifications about other replies (I hate chatGPT for making markdown notation for examples so synonymous with bots, that UA-cam auto-flags it as spam) As everyone else said it is hidden (=not serialised) by default. And also the password field is encrypted by default (with very powerful mutators/casts system), being decrypted only on manual access. So even if hacker gets memory dump, all they gonna see is encrypted hash.
@ar1i_k thanks, it's been a while since I used Laravel, but still my comment was more on the caution side that simply using "all" is rarely a good idea, and it's better to be explicit in selecting fields. There could be other sensitive fields, not just the password, fields that you could forget to mark as hidden.
I'm glad at least now Theo is trying things out before speaking. I dare you to find something more cool than Tailwind, Inertia, Livewire, Eloquent... etc all tools were born from PHP developers ... since PHP is a mature language with 30 years of experience, however it's not intended for frontend, but there are already solutions for most of the problems you might encounter on the web, building a backend with JS is just as annoying as with any other language if you don't know what are you doing o you're not using a framework, something that's not often mentioned is that most PHP developers also know how to work with JS very well. The era when a PHP dev didn’t know JS or frontend is a thing of the 2000s.
yeah i used inertia in 2 project and its very easy to use. if you want to learn react maybe skip this stack because everything is well prepared i think, auth,db,session etc. i love this but hate this at the same time because its php not golang 🤣
Love the review. But Laravel is NOT a react framework. It is part of the Symphony framework which is a php framework and laravel is just too good that it integrates other frontend frameworks like React and Vue, or Svelte as a front-end framework as an alternative to it's other main frontend frameworks like Livewire using Alpine js
can you elaborate? worked on a clients project a couple years ago and had a really good dx. Prob because the team was amazing but open to hear your take on this
Could've been a problem in the project but we tried to shove Vue into a laravel project on pages that needed a bit more interactivity. The amount of time I had to spend debugging Vue 3 Vs Vue 2, components not being cross-usable between the 2, laravel configs etc, was insane. It honestly felt like a hack on top of a hack. Using a tool that wasn't designed for the job, like a screwdriver to hammer a nail. Sure you can do it eventually, but would you want to? Having never done it before then, Laravel felt a very solid foundation, and inertia just tainted the otherwise clean solution.
Remix came a bit later and grew quicker, but it is different in many ways. Inertia gets out of your way for the most part, whereas Remix is a whole different approach.
I don't know dude the moment I saw that php code on 3:03 I just stop the video commented this comment and will live in a second sorry but I can't go back to that stupid $ sign and this -> crap no thanks
you can use inertia without php at all, the video isn't instantly clear about the fact that it's a meta-framework that works with many frontend and backend frameworks, not just laravel or php
It's still in development, and defer just looks like what React use() does. Many Key features are missing for this to be 'monolith framework'. More like monolith (if you reinvent enough stuff and use enough 3rd party tools)
There is still a valid reason to create an api instead. To send the same data to a React Native, native iOS, native Android or barf-Flutter-barf mobile apps. Not everything happens on the web. Not to mention desktop, Apple TV, Meta, Apple Watch or any other device that might use the same data. Great solution for a web only business but that really limits the future.
This is cool tech, but I struggle to see its value. I feel like there is nothing on an average website that should take long enough to warrant a streaming response or if there is it's the most important element and nothing makes sense without that thing being loaded. Wouldn't time be better spend making the backend fast?
I used to look up to you until I actually got into your industry and learned everything. Looking back, I realised all you do is repeat articles and pretend you know something about something. This is like watching your favourite video essayist and realising they're mostly talking out of their rump when they start talking about something you yourself know. Im sorry I ever looked at you as an expect.
So much effort put into avoiding using something like open api. Does using something like this really save as much time as just generating an open API doc and fetching data? JS devs are really optimizing the goofiest stuff
it's not just for php, it supports many frontend and backend frameworks, but sadly many commenters don't check out the stuff and choose to judge based on a single video.
@@oussama40612 nodejs is also slow. However we bundle react app with golang which make our frontend restart/start in just 1 second. Simple just upload the binary to the server and run it.
@oussama40612 nodejs, bunjs are also slow. However we found the best way to bundle the react app with golang. First we build backend API with golang, second we build reactjs ssr, third we build front-end app with golang to serve the react ssr. Finally just upload the two binary: backend api and front-end. Start or restart the backend or front-end app is just a second. With laravel, restart the api take 2 to 3 minutes. Bunjs or nodejs take around 2 or 3 minutes too.
Imo it's not about PHP specifically but about DX. Convenience always wins in the end even if it contributes to software becoming worse. We've seen it for at least past few years.
it's not just for php, it supports many frontend and backend frameworks, but sadly many commenters don't check out the stuff and choose to judge based on a single video.
Im sorry, but inertia is terrible. You don't need that. You just need laravel as backend and whatever frontend framework you want for your UI. Mixing the frontend inside the backend is bad idea.
it's not just for php, it supports many frontend and backend frameworks, but sadly many commenters don't check out the stuff and choose to judge based on a single video.
we are back to square one, php.
Now let's wait for someone to reinvent SPA
yes, but no.
Inertia.js is already SPA and SSR capable at the same time
The best mental model for the current trend of web development, is a spiral. We are not going in circles, we are moving upwards along a spiral staircase.
Meaning that while we are going back to server side rendering, we are also a lot more clever about how we do it and its vastly different from what we had in the past.
@@dogoku Such a nice way of putting it! I can see why people can think of this as "hey we are making the same mistakes over and over", but it is clear that we went through various stages of evolution before ending up where we are. A lot of smart people think about this every single day to make incremental progress. On hindsight we can see how PHP from the 2000s got a lot of it right but imo the only piece that was missing was the interactivity and that is where jQuery came in. To me, we had to go through a lot of stages to get that fixed up, and it has not been simple, but we are clearly in a better place than where we were 15 years ago. My 2 cents...
I blame the influencers 💰💰
12:00 If I am not mistaken, in .NET Blazor you can use simple logic (e.g if statement) to render a loading state and it will do a partial render and update via the websocket when ready
@if (data == null) {
Loading...
} else {
@data
}
You can but you need to enable streaming rendering. Otherwise the rendering will wait for async task to complete and then check the condition.
Effectively, this is what Inertia also does on the SSR side of things.
4:17 inertia is available on rails and some other frameworks via community package
It is still a community project, for now Laravel is the only official backend supported by Inertia.
aint no serious project gonna use that community package
AdonisJS maintains their own adapter which is pretty cool of them. Other Node/WinterCG server frameworks, not so much :(
@@gcash49why? laravel is also community package, livewire is also community package, etc etc. go inertia is more than 10x faster than laravel inertia, less buggy, easy to create concurrent program, many libraries, easy syntax not like php bad syntax, etc
It's unfortunate that they are not officially supported. I use Django for ages and it's fine for what I'm doing, but the Django adapter lags behind and the adapter development is very slow. I wish I have more skills (or money) to fix this situation
Really dope to see where Laravel and Inertia is going throughout the years! It’s starting to look so much better than what I’ve had to experience using it during my collage journey. 🎉
Nice to see you talk about Inertia. I have plans to write an adapter for Django soon, because the existing one is a bit abandoned and not so good. I really beliave in Inertia.
wasn't the whole point of using JS in the server so you have your frontend and backend in the same language ... idk why would I ever do php or python; might as well use Java, C# or Go for better performance
Same as Apple devices, its about ecosystem. Like checkout Laravel Queues documentation it goes on and on with features and ease of use. And then there are other tools in the ecosystem like Pulse, Horizon, Socialite etc. all first party supported. Tired of that then there are spatie packages. Also PHP is not slow, in raw benchmarks if something takes 30ms in Go it would usually take 70-100ms in PHP vs 400+ ms in Python. In real backends the difference with Go vs PHP should be even lower due to I/O bottlenecks.
Java for better performance? No pls
@@infiniteone783 I mean as much we all hate java it still performs better than interpreted languages
@@SiddharthPant But if it's about ecosystem, wouldn't you rather GET what's in phpland to JSland rather than go there yourself ... like I would prefer Next or Remix or React Router to implement those inertia innovations rather than use inertia itself
@@darkoplax7688 I can't tell if you're referring to Java or JavaScript. NodeJS is far superior in terms of speed than Java. Go would be even better.
Inertia is also really fun to use with Rails
9:18 he said the thing
No way bro... 😂
‘Our front ends need to know more about our back ends, and our back ends need to know more about our front ends’ - next thing you know, Theo will invent ‘MVC’. Let me introduce you to this cool new language, its name is “Smalltalk”.
Wait until you hear about Laravel Livewire...
12:10 Blazor (Stream rendering)
3:22 Huh?? It's been a while since I developed with PHP (and Laravel) professionally, but I swear, passing data between the BE and FE worked exactly the same way 6 years ago.
You passed this to php server side layer. If you wanted to have the same data on client side JavaScript you needed to also create an API endpoint to hit it manually with a fetch request.
Inertia streamlines boilerplate generation and makes passing data to JavaScript frameworks as effortless, as passing it to php blade templates
Key here is that we are passing all the php data not to .blade.php file but to .Vue / .tsx file which feels kinda magical!
@@ar1i_k I get that, but again, I could have sworn that I watched a Laracasts episode about 6 or 7 years ago where Jeffrey did this exact thing, passing data between a Laravel BE and a Vue SPA FE. But maybe back then, it was some sort of "hack" and now it's a finished product? Or maybe I'm misremembering completely, that is also a possibility of course.
@@ChristophFloat ahhhh…
No inertia existed even then, sorry for misunderstanding.
It’s just wasn’t as versatile and feature-complete solution (like Theo mentioned - “good luck with polling or infinite scrolling”) so most people didn’t bother adding a layer of complexity “to avoid writing api endpoints” when we still would need to write them anyway.
Now that Inertia 2.0 removed most of the old pain points, we may actually use it “to avoid writing api endpoints” and it finally looks like a good default option for Laravel devs (and absolute magic for outside observers like Theo)
back then Vue was used kinda like Alpine.js or HTMX is today, as a sparkle on top of server side generated HTML to handle client side interactions
I used it on a Wordpress project as well. It allows you to make ReactJS plugins with almost zero php, other than boilerplate php.
bro you used this "boxybird/inertia-wordpress" or there was another way around it ??
When you say React plugins do you mean like the UI of a Wordpress plugin? I know you are able to use react for Gutenberg blocks but I wasn’t aware that you could use them for the plugins themselves.
@@MrJfergs I make a complete Wordpress plugin using ReactJS/TS/Tailwind + InetiaJS-2.0 with Tanstack State + Tanstack Query + Websocket I used some other packages but forgot exactly. But you run it with a special Wordpress build tool provided by Wordpress. But the end result is you can build using 99% ReactJS and InertiaJS allows you to not have to do a bunch of complex API coding.
@@MrJfergs As ChatGPT 4o how to do it. Ask a few different ways and then you can do things in Visual Studio Code. I use a Hyper-V VM with Fedora and NGINX, PHP, Node, etc. so I can have a very fun and fast coding experience.
@@hamburger--fries Hi, Would you please share source code ? I want to see how to code with InertiaJS in WordPress ecosystem.
Inertia has typescript support, I built my entire project in inertia js + typescript+ react + laravel
Inertia is ridiculously good, I've used it in many projects now
Ive been using inertia v1 for a year now and i feel in love with laravel as a react dev
v2 is amazing wow
Congrats, You just discovered Sveltekit data loading pattern and form actions
Thx but I rather stick with Remix (React Router)
@@predaytor FR remix is so underrated
You have no clue, it looks the same but it isn't 😆
Inertia supports svelte, Vue and others too
I hesistated watching this video because youyr face made me think you were gonna bag on it taking a dig at NextJS. great video!
Theo you need to dig a bit more into Phoenix/Liveview 😄 but you can also use inertia with it so you have the best of both.
lol. Dissing Rails while I’ve been using Inertia in Rails for months
Wondering how the API peeps feel about the responsibility bloat - There’s a decent chunk of client-side responsibility being allocated to the API - stuff that’s usually pretty UX driven. Getting that much closer to the end user means taking on UX concerns and a chunk of client side architecture - quite a different thought process especially given the traditional separation of concerns
"traditional separation of concerns" is doing some heavy lifting here. Separation between backend and frontend is still a relatively new thing
@@yojou3695 10+ years at the pace tech moves - and you could argue thats conservative.
I wish Go community was more invested into Intertia instead of something like templ lmao
Inertia is 36k loc. It's too small to be framework. Which means you'll end up importing 3rd party tools a lot. It's another premature hype in JS world
Wrong way to look at it imho. If you are using Go as your webserver, it should be _because_ you want to use a mostly _buildless_ frontend like alpine-ajax or htmx (because you want to escape serverless hell and use your own VPS).
If you want to use modern JS frameworks, they are unfortunately largely tied to having JS be the backend specifically for _rendering._
Alternatively, you can let NextJS do its rendering with JS regularly and then use Go ONLY for your REST API, thus a "hybrid" solution.
@@benbowers3613 2nd approach is the way to go. 1st approach would work for websites with weak UI game
I just like that they let you pick so many backends and so many frontends. Svelte plus Django is awesome.
use php for api and server side programs and react for UI/UX
Isn't passing promises (instead of awaiting them) from RSC's and using the new use hook more or less the same as the defferred stuff? Still nice tho
In 20 years from now, it will be a bit different. The (js) client will tell the server what to create/generate
I mean, it's already like that, it all starts with a request from the client asking the server to provide something
The benefits are enticing. But I've also heard arguments against Inertia.
In the spirit of Proverbs 18:17, I'm curious if anyone with inertia experience has a rebuttal to these claims I've seen online:
1. Inertia doesn't work with large teams
2. Bigger teams benefit from split code bases
3. Inertia means all your devs have to be "Full Stack"
The only thing I'm curious about is the type safety story.
There's no story to tell 😂
But that is one thing AI does quite well which generate all the types and type checking code
In python you have a thing called pydantic. You can model your application using it and from there generate typescript types you use on the frontend. It's surely not "the final solution" but worked pretty well for me. Probably other languages have similar libs
Adonis js + Inertia is worth looking into
Screw Adonis.
Adonis is a Laravel copy that has no chance of ever really being good, as they've barely have the experience and/or knowledge as to understand why Laravel does things the way they do, and instead they just copied it verbatim and went from there, and it makes sense why: They liked Laravel, but want it in JS.
It's a great compliment to Laravel sure but it's terrible decision making. Just use Laravel and PHP, or use another actually-native JS framework and contribute any missing Laravel features to that.
@@heckintosh2994 Could you explain how it has shown "terrible decision making", objectively please? It is my understanding that it borrows from not only Laravel but also Rails and Django.
S7
We are trying to move off Inertia because of how limiting it is at work. It's great for small/inflexible apps but it quickly becomes unwieldly as you scale.
APIs are versatile and most serious application can profit from them. Alternative, to write two or more backend applications doesn't sound like fun to me.
Why biased with react native why so many things for react but not for react native 😅
React is his major
People that didn’t work through the exhaustion of the 2010-2020 front end framework churn be like, “let’s do more frameworks! I hate other devs!!”
Now I know what I'll be doing on the weekend!
I would really recommend trying sveltekit first, it does all the things stated in the video but without needing to have a hybrid php / js stack.
Late night theo post
That's awesome🎉🎉🎉, using a js front end library should not force me to fetch my data only via the wire, it should not be opinionated about the data fetching mechanism
I'm just curious, why in 2025 you don't have type safety? They could add some types generation. That's why Next/Astro are good, all your server actions return type is defined
Worked at a company with 2 teams, Laravel and React. I once had to make some from end changes as the average react dev is better at front end than a laravel developer (In my experience). It was hell setting up my machine to run laravel. I see what you did with the terminal commands and all. Nice stuff really!
And btw I still await folders on uploadthing. PLEASE WHEN FOLDERS???
Do you mean you could not install PHP and Composer?? Because Laravel does not require any runtime or special configuration.
It was always a one liner to install and one command to serve.
Installing PHP and composer can be done in docker, in local environment, with HomeBrew or even install Laravel Herd which is a manager for laravel apps and it installs/configures everything automatically.
@@nicolas_vl Wasn't so much the installation but the getting everything to work together part. Maybe easier to set up a project from scratch, but puling one wasn't the DX I was expecting. Got it to work, but it was a hassle
@@oddfeeling7956 Docker and documentation is your answer for reproducible dev environments.
@@dealloc 😂 Well not using docker wasn’t my fault now was it?
@@oddfeeling7956 I don't know? But after you set up your environment, you could have spent time setting it up for future developers.
Be the change you want.
Has been multi framework, even before 2.0.
Hey, have you f'd around with AdinisJS? It has an inertia adater, so we can use actual js on both backend and frontend with all typesafety and goodies it brings to the table.
Don't do JS on the back-end. It's terrible for that.
@ says who?
@@heckintosh2994 lmao have you been out of web dev for the last decade? Literally everyone and their mom uses js in the backend, even all the top 10 companies in the world that have millions to make their website shine use nodejs, there must be a reason dont you think?
Theo is doing great.
last time I was this early covid was still on
well, HMPV is the new trend these days. history repeats itself
With every new js framework we stray further from god
Both are imaginary, there is no framework here. Protocol you mean.
this is more a meta framework, it isn't a javascript framework
you should try inertia with adonisjs and react
It is difficult to justify migrating from one interpreted language(TS) to another(PHP) on the backend.
Specially so if you consider that typescript's typing is more advanced than PHP's.
I've used laravel before. It is an awesome framework and a lot of thought has gone into it. but it is held back by PHP.
When you weight all the variables, there are just disadvantages of using Laravel over any node solution. If I'm moving away from the JS land, then I'd probably pick go, rust, C# or any other compiled language way before ever considering PHP as an option.
AdonisJS have their own official adaptor for it too (that apparently has Inertia 2.0 support). Of course that's a degree of separation from the OG Inertia implementation but might be worth a shot if you wanna stick with Node and you're happy with a typical 12-factor app deployment (vs e.g. serverless).
From what I can see there's also a few outdated generic Node, Express and Hono adapters but they're all about 2+ years old, unfortunately.
How likely do you think it is that Static Typing will be integrated anytime soon? for example with PHPStan
It supports multiple backends, and supports Django.
Oh, they discovered MVC.
Full JS ecosystem is much simpler and faster. Even you can build binary with bun, and move it to docker with distroless image
Oh yeah, for a TODO app for sure.
This is either sarcasm or cluelessness.
Last time I was this early Theo still knew his stuff
And I don't say it because it's PHP, it's clear because you're complimenting things you'd usually hate
In my time (oh boy, I am getting old), that approach would be so much over-engineer 😂😅
adonis & inertia = perfect
when it comes to Backend PHP is still the best!
GenZs are discovering template parsing!
Template parsing leads to script injection. SSR Vue, svelte or react (which Inertia supports) doesn't have that problem, since it's context aware. This is the #1 reason I stopped using php
here we go again...... cmon now
This man will say whatever you want him to say as long as you give him money $$$
Think for once, stop parroting.
I dont even like using LaRavel because it adds to much redundancy to my projects. I like using their templating and routing so I choose the parts I like via Composer. I will look into this in the future but again I follow the KISS principals. (Keep It Simple Stupid)
I think Tanstack Start can handle lots of this stuff too
Strange, User::all() is dangerous if not careful, it can expose sensitive fields in json
That’s why by default Laravel creates two layers protection on user model
‘’’php
protected $hidden = [“password”];
protected $casts = [“password” => “encrypted”];
‘’’
Where $hidden prevents password field from being serialised.
And “encrypted” cast, encrypts password when you write it into object in memory (way before writing it into db) and decrypts only when accessing password manually. If hackers gets the memory dump of a process all they gonna see is encrypted version of passwords.
The real problem with ::all() method is that it gets ALL rows in the table, even if there are millions of rows amounting to gigabytes of data. It is strongly advised to use ::paginate() method, and/or add proper “where“ filters to sql query builder.
But all the additional code won’t make a simple tutorial example
Literally after the ::all() in the docs there is an explanation about exposing sensitive data and the solution that is already implemented for it.
Laravel handle theses things better than you imagine if you dont know Laravel
nope, there's hidden fields specified in the model class. by default password is always hidden for example.
lol my reply got auto removed but I still getting notifications about other replies (I hate chatGPT for making markdown notation for examples so synonymous with bots, that UA-cam auto-flags it as spam)
As everyone else said it is hidden (=not serialised) by default. And also the password field is encrypted by default (with very powerful mutators/casts system), being decrypted only on manual access. So even if hacker gets memory dump, all they gonna see is encrypted hash.
@ar1i_k thanks, it's been a while since I used Laravel, but still my comment was more on the caution side that simply using "all" is rarely a good idea, and it's better to be explicit in selecting fields. There could be other sensitive fields, not just the password, fields that you could forget to mark as hidden.
I'm glad at least now Theo is trying things out before speaking. I dare you to find something more cool than Tailwind, Inertia, Livewire, Eloquent... etc all tools were born from PHP developers ... since PHP is a mature language with 30 years of experience, however it's not intended for frontend, but there are already solutions for most of the problems you might encounter on the web, building a backend with JS is just as annoying as with any other language if you don't know what are you doing o you're not using a framework, something that's not often mentioned is that most PHP developers also know how to work with JS very well. The era when a PHP dev didn’t know JS or frontend is a thing of the 2000s.
yeah i used inertia in 2 project and its very easy to use. if you want to learn react maybe skip this stack because everything is well prepared i think, auth,db,session etc. i love this but hate this at the same time because its php not golang 🤣
Love the review. But Laravel is NOT a react framework. It is part of the Symphony framework which is a php framework and laravel is just too good that it integrates other frontend frameworks like React and Vue, or Svelte as a front-end framework as an alternative to it's other main frontend frameworks like Livewire using Alpine js
Amazing demo of Inertia 2.0
What's next bringing back WordPress?
Didn't have a lick of php when I used inertia with Django for a backend.
Intertia is great, but the React part is no plus.
It supports Vue and Svelte.
Laravel for Routing + SEO + Backend
Inertia + React for Frontend
Voila!
My Inertia dev ex has been so shit im not likely to ever consider it
can you elaborate? worked on a clients project a couple years ago and had a really good dx. Prob because the team was amazing but open to hear your take on this
Could've been a problem in the project but we tried to shove Vue into a laravel project on pages that needed a bit more interactivity. The amount of time I had to spend debugging Vue 3 Vs Vue 2, components not being cross-usable between the 2, laravel configs etc, was insane.
It honestly felt like a hack on top of a hack. Using a tool that wasn't designed for the job, like a screwdriver to hammer a nail. Sure you can do it eventually, but would you want to?
Having never done it before then, Laravel felt a very solid foundation, and inertia just tainted the otherwise clean solution.
@@Unc3so the problem is migrating vue 2 components to vue 3 rather than the problem with inertia's itself yea?
@@aydinpramasta8546 not migrating, but using both simultaneously. Something I never encountered when doing Vue standalone.
How is this an inertia issue?
Liorocks!
Inertia seems basically like it's just remix written in PHP
Remix came a bit later and grew quicker, but it is different in many ways. Inertia gets out of your way for the most part, whereas Remix is a whole different approach.
Inertia itself is written in JS, but…. They have server side adapters for multiple languages so can use with lots of backend tech
@@heckintosh2994 Thanks for the context here! I actually did not know that!
Did anyone else get 3 duplicate notifications for this?
using inertia on adonis
Theo, forget about inertia for this moment. Focus more on your hairstyle. Man, what have you done?
Nuxt is also a better Next.js
I don't know dude the moment I saw that php code on 3:03 I just stop the video commented this comment and will live in a second sorry but I can't go back to that stupid $ sign and this -> crap no thanks
you can use inertia without php at all, the video isn't instantly clear about the fact that it's a meta-framework that works with many frontend and backend frameworks, not just laravel or php
It's still in development, and defer just looks like what React use() does. Many Key features are missing for this to be 'monolith framework'. More like monolith (if you reinvent enough stuff and use enough 3rd party tools)
🧠 used 0
There is still a valid reason to create an api instead. To send the same data to a React Native, native iOS, native Android or barf-Flutter-barf mobile apps.
Not everything happens on the web.
Not to mention desktop, Apple TV, Meta, Apple Watch or any other device that might use the same data.
Great solution for a web only business but that really limits the future.
You can very easily reply with json instead of an inertia response based on that same exact json object. It's literally not a problem.
This is cool tech, but I struggle to see its value.
I feel like there is nothing on an average website that should take long enough to warrant a streaming response or if there is it's the most important element and nothing makes sense without that thing being loaded. Wouldn't time be better spend making the backend fast?
Wow
No
I used to look up to you until I actually got into your industry and learned everything. Looking back, I realised all you do is repeat articles and pretend you know something about something. This is like watching your favourite video essayist and realising they're mostly talking out of their rump when they start talking about something you yourself know. Im sorry I ever looked at you as an expect.
Oh yeah and you also harass people that disagree with you to an obsessive degree ig.
Pff, you can't even do PWAs on those things LOL, how is it better?
19 likes, fell off
fr
So much effort put into avoiding using something like open api. Does using something like this really save as much time as just generating an open API doc and fetching data?
JS devs are really optimizing the goofiest stuff
ua-cam.com/video/aqvFd-rwSyY/v-deo.html
Lol yea you're definitely getting paid for this
As a NextJS hater this looks really nice
I'm a nextJs hater too. And it's nice for sure.
2y working with NestJs (not Next) in the backend and I will never touch JS/TS for backend anymore
come on, don't make people go back to PHP, it's still a horrible language compared to Typescript (I still have PTSD from using PHP for many years)
It supports multiple JavaScript backends, apparently.
it's not just for php, it supports many frontend and backend frameworks, but sadly many commenters don't check out the stuff and choose to judge based on a single video.
@@luigicorciulo8190 it's unfortunate that Theo doesn't emphasize this and instead makes people think it's ok to choose PHP
@@denespapp1963 agreed, he could've made things more clear from the beginning
Pukes. Hard pass.
why lol genuinely curious
The main problem of laravel php, buggy, slow....
Isn't that the case with JavaScript as well?
@@oussama40612 nodejs is also slow. However we bundle react app with golang which make our frontend restart/start in just 1 second. Simple just upload the binary to the server and run it.
@oussama40612 nodejs, bunjs are also slow. However we found the best way to bundle the react app with golang. First we build backend API with golang, second we build reactjs ssr, third we build front-end app with golang to serve the react ssr.
Finally just upload the two binary: backend api and front-end. Start or restart the backend or front-end app is just a second.
With laravel, restart the api take 2 to 3 minutes. Bunjs or nodejs take around 2 or 3 minutes too.
It's wild NextJS users still think their devs.
It’s wild that Theo thinks he’s a dev.
So true 😂
What do you mean?
they are devs?
bro hasn't worked a day in his life and comes here to talk about being a dev
For the love of GOD, stop trying to bring back PHP people
Imo it's not about PHP specifically but about DX. Convenience always wins in the end even if it contributes to software becoming worse. We've seen it for at least past few years.
It supports Django instead of the backend if you'd like. I liked it.
it's not just for php, it supports many frontend and backend frameworks, but sadly many commenters don't check out the stuff and choose to judge based on a single video.
Im sorry, but inertia is terrible. You don't need that. You just need laravel as backend and whatever frontend framework you want for your UI. Mixing the frontend inside the backend is bad idea.
Its pretty ugly to me, but I think PHP guys take whatever they get, they are used to the mess code in php.
I used the Django backend and loved it.
it's not just for php, it supports many frontend and backend frameworks, but sadly many commenters don't check out the stuff and choose to judge based on a single video.