در حال بارگذاری ...

Choosing Inertia vs Others0:00

Joe, the clock starts now. So this Blade, there's Livewire. What's Inertia doing differently that makes it worth picking for the project? I think what makes Inertia worth picking is that if you like writing JavaScript, if you like writing React or Vue, Inertia's perfect for you. If you like writing PHP, you know you want to go with Blade, you want to go with Livewire. So if what you want to do is write client-side code Inertia

Explaining Inertia Simply0:29

you want to go with Livewire. So if what you want to do is write client side code Inertia makes it very, very simple to do that. Beautiful. Yeah. How do you explain Inertia to non-technical clients and stakeholders? Yeah, so I, I generally describe it as a thin layer of glue between your Laravel backend and your client side code. So it just as little invisible negotiations

and your client side code. So it just as little invisible negotiations that you don't really have to worry about, you can kind of plug it in and the two will talk to each other very seamlessly and you'll kind of magically have this single page application. Cool. Uh, is there a specific type of app where Inertia really shines? There's not a specific app,

where Inertia really shines? There's not a specific app, but if the end game is a single page application and you want all the power that Laravel has to offer behind the scenes, that's where it really feels magical because you really have like this super full featured backend and then you still get to use that client side framework that you love. So it's, it just feels very cohesive it when you're building like a, a solid web application.

Splitting Team Responsibilities1:26

So it's, it just feels very cohesive it when you're building like a, a solid web application. Yeah, that's a dream for developers for sure. Yeah. Um, so how do teams split front end and backend work when using Inertia? Do you see any patterns? Yeah, I mean I think the cool thing about Inertia is that everybody gets to play to their strengths, right? So if you have strictly backend or strictly front end or somebody who's leaning backend or front end

So if you have strictly backend or strictly front end or somebody who's leaning backend or front end and they're not, they're not necessarily full stack, um, they get to just do what they love and they don't really have to worry about the in-between stuff. So you just have to agree like this is the contract, right? So you say like, these are the props I'm gonna feed you. And then the client side framework just acts as the view VIEW, not VUE.

And then the client side framework just acts as the view VIEW, not VUE. And uh, and it's just, and it just works. So everybody gets to write the code that they love, which I think is sort of the beauty of something like Inertia. That's amazing. What is something new Inertia users get wrong quite often or totally overlook? Okay, so last year we launched history encryption,

Overlooked Security Feature2:25

or totally overlook? Okay, so last year we launched history encryption, which I think is a really neat feature that probably is heavily underutilized. I don't think a lot of the inner users are probably using it, but if you aren't using it, you should look at history encryption. It's a very cool way to secure your app, um, and something that was asked for for a long time. So I hope people start using it. That's

Using Deferred Props2:44

and something that was asked for for a long time. So I hope people start using it. That's Great. I must look into this. Uh, what's the feature of Inertia that just sparks joy every time you use it for you? I love deferred props. I don't know what it is. It makes me very happy deferred props. You just say this prop is deferred. You get the snappy page load.

You just say this prop is deferred. You get the snappy page load and it automatically loads those props into the page asynchronously. I don't know anybody who's doing it like better or easier than that. It's really, it makes me happy every time. So. Cool. So do you use this when you want to load the page instantly and then load something in the background?

to load the page render the page instantly and then load something in the background and when it's ready it shows up? Right? So if you have some, some like heavy data that needs to be loaded, you don't need to wait for the initial payload page load for that. It'll automatically load it after the page has already done the initial load. Yeah. If you just mark it as a deferred prop. Awesome. Yep. Do you ever see Inertia moving

Stance on Server Components3:30

Yeah. If you just mark it as a deferred prop. Awesome. Yep. Do you ever see Inertia moving towards server components? I don't know if you're familiar with React and how now there's client and server components and React can and Inertia kind of battles with that space. You're talking about like writing server side code in a JavaScript component? Is that basically kind of what you're saying or is it Yeah, what I, what I mean is like React used

Is that basically kind of what you're saying or is it Yeah, what I, what I mean is like React used to be just a client side library and now it's moved towards doing a lot of stuff mm-hmm. For server code. And so that's the area where Inertia operates. So there's overlap here. So I don't think so. I think that's probably not in the future for Inertia. I think it, I think we're gonna let the back end

I think that's probably not in the future for Inertia. I think it, I think we're gonna let the back end Laravel play to its strengths and what the client side played is strengths. And I think we're gonna like keep those separate but cohesive. I think that makes sense. The more I play with Inertia, the more I think I don't need the decline side, the server side of React. Yeah, It's the whole selling point. It's amazing.

Future Type-Safe Integration4:23

the server side of React. Yeah, It's the whole selling point. It's amazing. It really, it really is. Alright. And my last question, uh, what's one feature or idea, feature or idea that you're itching to add or improve in Inertia? Sure. Or its ecosystem. So not necessarily Inertia specific, but it's gonna play very nicely with Inertia. I really want the two sides to talk to each other, uh, even

but it's gonna play very nicely with Inertia. I really want the two sides to talk to each other, uh, even more cohesively. So I want the client side to know as much as possible about what's going on in the backend, whether it's um, what type of props it can expect as defined by the backend, what types of models we have, what types of Eloquent. Like I want all of that stuff to be things that the client side knows about via

Like I want all of that stuff to be things that the client side knows about via TypeScript or JavaScript. And I think that's something that I'm excited about. That's something I'm excited to put out there and it's something we're working on right now as a, as a little project. Sounds. Sounds great. Alright Joe, that's all the time we got. Thank you so much. That thank.

Thank you so much. That thank.

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟