WEBVTT

1
00:00:05.639 --> 00:00:10.960
<v Speaker 1>Hello, and welcome to Ruby Rokes. I'm John Epperson, and

2
00:00:11.240 --> 00:00:13.880
<v Speaker 1>we are we have a couple of panelists today.

3
00:00:13.919 --> 00:00:18.399
<v Speaker 2>We have Luke I welcome, and we have Jonathan Nni.

4
00:00:18.679 --> 00:00:20.519
<v Speaker 1>Your thing like cut off and gave me the dots

5
00:00:20.600 --> 00:00:22.079
<v Speaker 1>right as I was looking at it, and I was like,

6
00:00:22.120 --> 00:00:25.920
<v Speaker 1>oh my gosh, Rinie, welcome. Jonathan is the author or

7
00:00:26.039 --> 00:00:27.960
<v Speaker 1>creator however you want to say that of a nurser

8
00:00:28.079 --> 00:00:30.839
<v Speaker 1>JS and we just have him here today to yap

9
00:00:30.839 --> 00:00:32.520
<v Speaker 1>about it. Can you just give us a little bit

10
00:00:32.679 --> 00:00:35.039
<v Speaker 1>just to start out about your background and how why

11
00:00:35.039 --> 00:00:36.920
<v Speaker 1>you might be famous, and then we can go ahead

12
00:00:37.200 --> 00:00:38.000
<v Speaker 1>to a nursery after that.

13
00:00:38.159 --> 00:00:38.840
<v Speaker 3>Yeah, for sure.

14
00:00:39.000 --> 00:00:42.560
<v Speaker 4>I am a web developer and I've been doing web

15
00:00:42.600 --> 00:00:46.039
<v Speaker 4>development for almost two decades by now, and I hang

16
00:00:46.079 --> 00:00:49.280
<v Speaker 4>out mostly in the Layra bell community, so I contribute

17
00:00:49.320 --> 00:00:51.600
<v Speaker 4>to that framework and kind of like doing all things

18
00:00:51.640 --> 00:00:55.560
<v Speaker 4>PHP and yeah, my main projects have been some libraries

19
00:00:55.600 --> 00:00:59.119
<v Speaker 4>and some phree libraries. I was also involved early on

20
00:00:59.280 --> 00:01:02.200
<v Speaker 4>in the tail when CSS framework if you're familiar with that.

21
00:01:02.359 --> 00:01:04.400
<v Speaker 4>Me and my buddy Adam Weathern built that, and more

22
00:01:04.400 --> 00:01:08.840
<v Speaker 4>recently I have focused on inertia as well as a bunch.

23
00:01:08.599 --> 00:01:09.879
<v Speaker 3>Of database stuff.

24
00:01:09.920 --> 00:01:13.159
<v Speaker 4>I'm a big fan of databases and optimizing databases and

25
00:01:13.319 --> 00:01:15.519
<v Speaker 4>active record and so I put out a course recently

26
00:01:15.560 --> 00:01:17.719
<v Speaker 4>about that. So those are kind of the things I

27
00:01:17.799 --> 00:01:20.079
<v Speaker 4>mostly work on. I work for myself. Outside of that,

28
00:01:20.159 --> 00:01:23.439
<v Speaker 4>I run a small SaaS business solo SaaS and that's fun.

29
00:01:23.519 --> 00:01:25.480
<v Speaker 2>That's pretty much me awesome.

30
00:01:25.640 --> 00:01:28.079
<v Speaker 1>So, since we were planning to talk about inertia, let's

31
00:01:28.120 --> 00:01:30.840
<v Speaker 1>go ahead and dive in what exactly is inertia.

32
00:01:30.920 --> 00:01:33.040
<v Speaker 4>Yeah, so it's always fun when you come up with

33
00:01:33.079 --> 00:01:36.120
<v Speaker 4>a new project that's a little bit different than other things.

34
00:01:35.480 --> 00:01:38.280
<v Speaker 4>It's certainly been one of the most challenging things. It's

35
00:01:38.319 --> 00:01:41.719
<v Speaker 4>just explaining what inertia is. And kind of the simplest

36
00:01:41.799 --> 00:01:44.799
<v Speaker 4>way to describe it is it's a way to build

37
00:01:44.959 --> 00:01:49.799
<v Speaker 4>single page applications without needing an API, Meaning you can

38
00:01:49.840 --> 00:01:52.959
<v Speaker 4>build a single page app using a classic server side

39
00:01:53.000 --> 00:01:56.719
<v Speaker 4>framework such as Rails or layer bel and you can

40
00:01:56.799 --> 00:02:00.560
<v Speaker 4>use classic service side routing, classic server side control. But

41
00:02:00.599 --> 00:02:03.959
<v Speaker 4>the only difference is with inertia there is no server

42
00:02:04.079 --> 00:02:07.439
<v Speaker 4>side views. All the views are done with view or

43
00:02:07.480 --> 00:02:10.560
<v Speaker 4>they're done and react or done using spell And what

44
00:02:10.680 --> 00:02:14.439
<v Speaker 4>happens is you basically return some data from our controller

45
00:02:14.560 --> 00:02:17.039
<v Speaker 4>and where you'd normally return a view and they'll put

46
00:02:17.039 --> 00:02:21.639
<v Speaker 4>that data. You instead return a JavaScript page component. So

47
00:02:21.879 --> 00:02:24.840
<v Speaker 4>just imagine a JavaScript page component being rendered on the

48
00:02:24.879 --> 00:02:27.520
<v Speaker 4>page instead of like an EERB template I guess is

49
00:02:27.560 --> 00:02:29.800
<v Speaker 4>what they would be considered in rails. And obviously that's

50
00:02:29.879 --> 00:02:32.400
<v Speaker 4>client side rendered, so it's not server side rendered. But

51
00:02:32.479 --> 00:02:34.759
<v Speaker 4>what happens is every single time you navigate from one

52
00:02:34.800 --> 00:02:38.560
<v Speaker 4>page to the next, inertia intercepts any page clicks so

53
00:02:38.599 --> 00:02:41.759
<v Speaker 4>that you don't do full page reloads, but instead, when

54
00:02:41.759 --> 00:02:44.879
<v Speaker 4>you click a link, inertia will intercept that link click

55
00:02:45.039 --> 00:02:47.240
<v Speaker 4>and instead of doing a full page reload, it'll run

56
00:02:47.240 --> 00:02:49.719
<v Speaker 4>off to the server making what's called an inertia request,

57
00:02:49.800 --> 00:02:51.599
<v Speaker 4>and the server will pick it up saying okay, this

58
00:02:51.639 --> 00:02:53.800
<v Speaker 4>is the inertia request, and it'll fire back the data

59
00:02:53.879 --> 00:02:56.159
<v Speaker 4>needed for the next page. And the data is the

60
00:02:56.280 --> 00:03:00.280
<v Speaker 4>JavaScript page component, be view or react or whatever, the

61
00:03:00.360 --> 00:03:03.280
<v Speaker 4>data the props for that component. And then what happens

62
00:03:03.319 --> 00:03:05.919
<v Speaker 4>is client side, so that's made as an age AX request,

63
00:03:05.960 --> 00:03:09.120
<v Speaker 4>that data comes back, the response comes back, and then dynamically,

64
00:03:09.280 --> 00:03:12.840
<v Speaker 4>client side, the page component is swapped out, and that's

65
00:03:12.960 --> 00:03:15.840
<v Speaker 4>using dynamic components, which is a feature of all three

66
00:03:15.879 --> 00:03:19.159
<v Speaker 4>of the popular client side frameworks view Reaction SPELT, so

67
00:03:19.159 --> 00:03:22.680
<v Speaker 4>it's dynamically swapped out and it's given its new page props.

68
00:03:22.759 --> 00:03:26.199
<v Speaker 4>And the big, big, big benefit there is one when

69
00:03:26.199 --> 00:03:27.120
<v Speaker 4>you're navigating from one.

70
00:03:27.199 --> 00:03:28.680
<v Speaker 3>So there's like three key benefits.

71
00:03:28.919 --> 00:03:31.599
<v Speaker 4>One, you're navigating page page, you're not doing full page reloads,

72
00:03:31.599 --> 00:03:34.400
<v Speaker 4>so there's a performance benefit to that. Two when it's

73
00:03:34.400 --> 00:03:36.280
<v Speaker 4>doing that because you're not doing a full page reload,

74
00:03:36.319 --> 00:03:39.280
<v Speaker 4>it's not having to reboot, view or react every single time.

75
00:03:39.560 --> 00:03:42.400
<v Speaker 4>So it's like really like silky smooth kind of experience.

76
00:03:42.479 --> 00:03:44.800
<v Speaker 4>It's just like a it's like you're working with an SPA,

77
00:03:44.919 --> 00:03:47.560
<v Speaker 4>except you're not. You're just navigating from one page to

78
00:03:47.560 --> 00:03:49.719
<v Speaker 4>the next, and it's just swapping out those components, those

79
00:03:49.759 --> 00:03:51.159
<v Speaker 4>page components dynamically.

80
00:03:51.439 --> 00:03:53.599
<v Speaker 3>And three and I knew this was going to happen.

81
00:03:53.639 --> 00:03:57.000
<v Speaker 4>I don't remember my third third benefit, but oh, the

82
00:03:57.039 --> 00:03:58.719
<v Speaker 4>third one is the obvious one. You get to build

83
00:03:58.719 --> 00:04:02.199
<v Speaker 4>an app using client side technology. And really kind of

84
00:04:02.280 --> 00:04:04.919
<v Speaker 4>what pushed me down this road is I was building

85
00:04:04.960 --> 00:04:07.360
<v Speaker 4>more like in my applications that I built and I build,

86
00:04:07.360 --> 00:04:10.080
<v Speaker 4>I always use layravel, which is very similar to rails.

87
00:04:10.120 --> 00:04:12.120
<v Speaker 4>So for this audience just kind of think of them

88
00:04:12.120 --> 00:04:14.159
<v Speaker 4>more or less as the same thing I was. You know,

89
00:04:14.240 --> 00:04:16.240
<v Speaker 4>much of my apps were starting to contain more and

90
00:04:16.319 --> 00:04:20.759
<v Speaker 4>more like rich UI and more client side functionality, more

91
00:04:20.839 --> 00:04:24.199
<v Speaker 4>JavaScript requirements to basically make the UI's work a certain

92
00:04:24.240 --> 00:04:27.160
<v Speaker 4>way that just kind of wasn't possible using classic server

93
00:04:27.279 --> 00:04:30.319
<v Speaker 4>side rendering. And what I was basically doing is I

94
00:04:30.480 --> 00:04:34.120
<v Speaker 4>was in my page responses, I was returning server side renderview,

95
00:04:34.160 --> 00:04:38.160
<v Speaker 4>which would then have view components mixed into the page.

96
00:04:38.360 --> 00:04:40.079
<v Speaker 4>So what would happen is the response would come back

97
00:04:40.079 --> 00:04:42.000
<v Speaker 4>from the server, then view would kick in the gear,

98
00:04:42.040 --> 00:04:43.839
<v Speaker 4>and any of the view components on the page there'd

99
00:04:43.879 --> 00:04:45.480
<v Speaker 4>be like a little flicker and then they would show

100
00:04:45.560 --> 00:04:48.120
<v Speaker 4>up right, and then you'd have those individual components would

101
00:04:48.160 --> 00:04:51.480
<v Speaker 4>be reactive and whatnot right. And so by going that

102
00:04:51.560 --> 00:04:53.480
<v Speaker 4>kind of comes with a whole bunch of interesting problems.

103
00:04:53.519 --> 00:04:55.480
<v Speaker 4>I mentioned the flicker and just kind of having to

104
00:04:55.480 --> 00:04:57.600
<v Speaker 4>manage each one of those separate components.

105
00:04:57.800 --> 00:04:59.680
<v Speaker 3>So by going this way with.

106
00:04:59.639 --> 00:05:02.639
<v Speaker 4>A NURSE, you're really like fully committing to client side

107
00:05:02.680 --> 00:05:04.959
<v Speaker 4>render views, So you give up server side rendered views.

108
00:05:04.959 --> 00:05:08.480
<v Speaker 4>That is a trade off, but that means is anytime

109
00:05:08.519 --> 00:05:10.680
<v Speaker 4>you're working with any of the templates within your application.

110
00:05:10.920 --> 00:05:13.079
<v Speaker 4>You have the power of JavaScript, you have the power

111
00:05:13.120 --> 00:05:14.959
<v Speaker 4>of view or React, and you can do whatever you

112
00:05:15.000 --> 00:05:15.519
<v Speaker 4>need to do.

113
00:05:15.720 --> 00:05:18.040
<v Speaker 3>And it's just a really really nice way of working it.

114
00:05:18.160 --> 00:05:20.839
<v Speaker 4>Yeah, so that's kind of a longer description. I would

115
00:05:20.839 --> 00:05:24.240
<v Speaker 4>say that, like, I definitely built it for people who

116
00:05:24.399 --> 00:05:28.639
<v Speaker 4>have traditionally worked with server side rendered applications like frameworks

117
00:05:28.680 --> 00:05:31.480
<v Speaker 4>like again layer Bell, Ruby, Django, that kind of stuff.

118
00:05:31.519 --> 00:05:34.639
<v Speaker 4>People who are familiar with creating controllers and getting data

119
00:05:34.639 --> 00:05:37.040
<v Speaker 4>from the database and then passing that data to a view.

120
00:05:37.079 --> 00:05:40.399
<v Speaker 4>The whole paradigm is very, very similar and much different

121
00:05:40.480 --> 00:05:44.000
<v Speaker 4>than the classic, the more standard SPA approach where you

122
00:05:44.040 --> 00:05:47.560
<v Speaker 4>have some separate API, some separate app that provides like

123
00:05:47.639 --> 00:05:49.319
<v Speaker 4>ar rest API or graphic you LAPI.

124
00:05:49.600 --> 00:05:51.480
<v Speaker 3>So it's definitely targeted.

125
00:05:51.079 --> 00:05:53.720
<v Speaker 4>At that audience, and kind of, as I've said to

126
00:05:53.800 --> 00:05:55.879
<v Speaker 4>people before, I kind of joke that Inertia is like

127
00:05:55.920 --> 00:05:59.040
<v Speaker 4>the gateway drug to creating single page applications because if

128
00:05:59.040 --> 00:06:01.360
<v Speaker 4>you're coming from a monol with background in er should

129
00:06:01.360 --> 00:06:03.399
<v Speaker 4>just makes it so easy to get up and running

130
00:06:03.439 --> 00:06:06.199
<v Speaker 4>with creating like what essentially feels exactly like a client

131
00:06:06.279 --> 00:06:09.000
<v Speaker 4>side single page app of kind of using the technology

132
00:06:09.040 --> 00:06:10.120
<v Speaker 4>that you know and love already.

133
00:06:10.279 --> 00:06:13.680
<v Speaker 1>Yeah, I actually find it super interesting. I mean I've

134
00:06:13.720 --> 00:06:16.439
<v Speaker 1>been for at least the past day or so kind

135
00:06:16.480 --> 00:06:18.759
<v Speaker 1>of checking out some of the stuff on the side

136
00:06:18.879 --> 00:06:21.160
<v Speaker 1>and things like this, and there's a lot of interest.

137
00:06:21.279 --> 00:06:23.240
<v Speaker 1>So it kind of sounds just to make sure that

138
00:06:23.360 --> 00:06:25.480
<v Speaker 1>I understand this the way that I think that I

139
00:06:25.560 --> 00:06:28.879
<v Speaker 1>understand this, You're more or less going to, obviously, being

140
00:06:28.879 --> 00:06:31.160
<v Speaker 1>familiar with rails here, You're going to create like this

141
00:06:31.279 --> 00:06:33.720
<v Speaker 1>kind of high level sort of meta layout as you

142
00:06:33.759 --> 00:06:37.680
<v Speaker 1>will or whatever. And then instead of creating a whole

143
00:06:37.680 --> 00:06:40.560
<v Speaker 1>bunch of views for all of my pages, I'm just

144
00:06:40.639 --> 00:06:44.480
<v Speaker 1>returning this inertia thing which has a props attribute or whatever,

145
00:06:44.560 --> 00:06:47.240
<v Speaker 1>and then I'm just basically returning data is Jason, so

146
00:06:47.360 --> 00:06:50.000
<v Speaker 1>kind of a bit like an inline API kind of

147
00:06:50.079 --> 00:06:52.720
<v Speaker 1>thing almost like I'm just kind of rendering Jason almost there,

148
00:06:52.759 --> 00:06:54.360
<v Speaker 1>And that's more or less how my page is going

149
00:06:54.439 --> 00:06:56.480
<v Speaker 1>to run, and that's how my back end's going to run.

150
00:06:56.560 --> 00:06:59.160
<v Speaker 1>And then I basically just have a single page.

151
00:06:59.000 --> 00:06:59.680
<v Speaker 2>App on the page.

152
00:06:59.800 --> 00:07:02.639
<v Speaker 1>That's it, and all these props get passed down and

153
00:07:02.720 --> 00:07:04.519
<v Speaker 1>I just do with it what I want to in

154
00:07:04.519 --> 00:07:05.199
<v Speaker 1>that single page.

155
00:07:05.240 --> 00:07:07.839
<v Speaker 2>Of Yes, so a couple interface as you will.

156
00:07:08.560 --> 00:07:11.600
<v Speaker 4>Yes, I like, yeah, So a couple of things to

157
00:07:11.639 --> 00:07:13.720
<v Speaker 4>be aware of. Like, I like to compare inertia in

158
00:07:13.759 --> 00:07:17.040
<v Speaker 4>a lot of ways to almost React router or view router,

159
00:07:17.160 --> 00:07:20.879
<v Speaker 4>because in a way, all Inertia is is a specialized

160
00:07:21.079 --> 00:07:24.879
<v Speaker 4>router like client side router that lives between your server

161
00:07:25.040 --> 00:07:28.279
<v Speaker 4>and your controllers, which is returning data as Jason and

162
00:07:28.360 --> 00:07:29.399
<v Speaker 4>your client.

163
00:07:29.120 --> 00:07:31.639
<v Speaker 3>Side page components. So it's the piece that connects the two.

164
00:07:31.800 --> 00:07:35.040
<v Speaker 4>But unlike with a classic app, you know, with view router,

165
00:07:35.160 --> 00:07:38.639
<v Speaker 4>React router, whatever, you don't have any client side state

166
00:07:38.720 --> 00:07:42.600
<v Speaker 4>management at all, So you're not using any client side

167
00:07:42.680 --> 00:07:46.160
<v Speaker 4>like view x or whatever the React equivalents are. You're

168
00:07:46.160 --> 00:07:48.519
<v Speaker 4>not using any of that stuff because all your data

169
00:07:48.600 --> 00:07:51.360
<v Speaker 4>and all your state is essentially at the server, So

170
00:07:51.360 --> 00:07:54.560
<v Speaker 4>it's not like you're making requests to the API client side,

171
00:07:54.600 --> 00:07:58.680
<v Speaker 4>saving that in your client side's vieux library or database

172
00:07:58.759 --> 00:08:00.600
<v Speaker 4>or whatever you want to call it, and then rendering

173
00:08:00.800 --> 00:08:04.079
<v Speaker 4>components based on that. Basically, every single time you visit

174
00:08:04.120 --> 00:08:07.480
<v Speaker 4>a page, the data's coming straight from your controller and

175
00:08:07.519 --> 00:08:10.079
<v Speaker 4>go into your your client side page component.

176
00:08:10.199 --> 00:08:12.399
<v Speaker 5>All right, I got a dumb question. You're going to

177
00:08:12.439 --> 00:08:15.120
<v Speaker 5>have a few votes from me. So I wanted to

178
00:08:15.199 --> 00:08:17.040
<v Speaker 5>kind of have a go at this. And I've been

179
00:08:17.040 --> 00:08:20.959
<v Speaker 5>building this view app. And the way I populate my

180
00:08:21.560 --> 00:08:25.079
<v Speaker 5>VU is it a view or VU view? It's the accent,

181
00:08:25.120 --> 00:08:27.160
<v Speaker 5>isn't it. I can't I can't even tell. I think

182
00:08:27.199 --> 00:08:29.199
<v Speaker 5>I'm trying to make it English. The way I populate

183
00:08:29.240 --> 00:08:31.759
<v Speaker 5>my component is I go off with my HERB, my

184
00:08:32.120 --> 00:08:35.759
<v Speaker 5>ERB template downloads, and then I do a get to

185
00:08:35.840 --> 00:08:38.679
<v Speaker 5>get the initial data from the page, and then it

186
00:08:38.759 --> 00:08:41.360
<v Speaker 5>drops in when to get returns. You've got your view

187
00:08:41.519 --> 00:08:45.519
<v Speaker 5>building there. Yeah. Now in the examples on the inertia

188
00:08:45.799 --> 00:08:49.759
<v Speaker 5>JS site, then it uses Laravelle. And we could take

189
00:08:49.799 --> 00:08:53.279
<v Speaker 5>a nice divergence here because I'm starting to get Laravelle

190
00:08:53.399 --> 00:08:56.440
<v Speaker 5>envy some of the tooling, some of the tooling that

191
00:08:56.519 --> 00:08:59.480
<v Speaker 5>you show off on the inertia jas website. I don't.

192
00:08:59.519 --> 00:09:02.679
<v Speaker 5>I didn't think the Ruby or rails community have. I'm

193
00:09:02.720 --> 00:09:05.799
<v Speaker 5>sure John no more. But there's a there's a plug

194
00:09:05.799 --> 00:09:10.120
<v Speaker 5>in where you can see the database queries being done

195
00:09:10.240 --> 00:09:13.120
<v Speaker 5>on that page like the sequel, and I saw that.

196
00:09:13.399 --> 00:09:17.240
<v Speaker 5>Oh would have been useful. I mean for years if

197
00:09:17.279 --> 00:09:20.000
<v Speaker 5>I could just see what the what the page was hitting.

198
00:09:20.200 --> 00:09:21.919
<v Speaker 5>You know, does that exist for rails.

199
00:09:22.120 --> 00:09:24.360
<v Speaker 1>I'm pretty sure I've seen various things, and you can

200
00:09:24.440 --> 00:09:25.759
<v Speaker 1>definitely see it in your logs.

201
00:09:26.000 --> 00:09:28.120
<v Speaker 5>I know, I know I can see it in my logs,

202
00:09:28.559 --> 00:09:29.679
<v Speaker 5>but you know to have it.

203
00:09:30.200 --> 00:09:32.440
<v Speaker 1>There, you know, Hang on, I mean, maybe I could

204
00:09:32.480 --> 00:09:33.919
<v Speaker 1>go find this. I don't know if it's a good

205
00:09:34.000 --> 00:09:35.480
<v Speaker 1>use of my time, but maybe I could go find this.

206
00:09:35.519 --> 00:09:37.399
<v Speaker 1>But I'm pretty sure that I've seen something somewhere that

207
00:09:37.519 --> 00:09:40.279
<v Speaker 1>does something like that. However, regardless, you do know that

208
00:09:40.320 --> 00:09:43.279
<v Speaker 1>you can switch those Laravel things to Rails to see

209
00:09:43.320 --> 00:09:46.240
<v Speaker 1>the Rails examples on the Inertia site.

210
00:09:46.360 --> 00:09:49.080
<v Speaker 5>No, I don't actually no, I didn't find a tab.

211
00:09:49.120 --> 00:09:49.879
<v Speaker 5>Where's the tab?

212
00:09:50.440 --> 00:09:53.480
<v Speaker 4>Every code snippet, every code snippet there is on the site?

213
00:09:53.519 --> 00:09:56.000
<v Speaker 4>It defaults to Larvel, but you can switch it over

214
00:09:56.080 --> 00:09:56.600
<v Speaker 4>to rails.

215
00:09:56.840 --> 00:09:59.399
<v Speaker 5>Oh no, some basic fail going on here.

216
00:09:59.559 --> 00:10:00.000
<v Speaker 2>No worry.

217
00:10:00.360 --> 00:10:03.159
<v Speaker 1>So what I'm saying is you're very appreciative of how

218
00:10:03.200 --> 00:10:05.240
<v Speaker 1>awesome Laaravel is on a review podcast.

219
00:10:05.960 --> 00:10:08.480
<v Speaker 5>All right, listen, I'll be honest.

220
00:10:08.279 --> 00:10:10.159
<v Speaker 3>This is not the first time this has happened.

221
00:10:11.440 --> 00:10:14.200
<v Speaker 5>That's a nice workflow, you know. I like the tool.

222
00:10:14.200 --> 00:10:17.240
<v Speaker 5>I can't find this finger I don't believe it.

223
00:10:17.240 --> 00:10:19.960
<v Speaker 2>Exists, right, now I'll take a screenshot.

224
00:10:20.360 --> 00:10:23.759
<v Speaker 4>Yeah, So the tool and layer bel in the PHP

225
00:10:24.039 --> 00:10:27.120
<v Speaker 4>community it's called it's called the PHP debug bar, and

226
00:10:27.159 --> 00:10:30.600
<v Speaker 4>there's a Layervell debug Bar version built on top of that.

227
00:10:30.840 --> 00:10:33.120
<v Speaker 3>And it's fantastic because it's exactly what you can.

228
00:10:33.360 --> 00:10:35.279
<v Speaker 4>You know, you can figure out all your database queries

229
00:10:35.320 --> 00:10:37.639
<v Speaker 4>and your logs and whatnot. But what the layravel debug

230
00:10:37.759 --> 00:10:39.279
<v Speaker 4>bar does is it just puts them right in the

231
00:10:39.320 --> 00:10:41.480
<v Speaker 4>bottom of your screen, just like it's almost like a

232
00:10:41.600 --> 00:10:45.080
<v Speaker 4>Chrome console right where it shows you exactly what database

233
00:10:45.159 --> 00:10:47.759
<v Speaker 4>queris you're making, and what models you're loading from the database,

234
00:10:47.799 --> 00:10:50.840
<v Speaker 4>and how much memory you're using. It's super super helpful,

235
00:10:50.840 --> 00:10:53.600
<v Speaker 4>helpful you identify N plus one issues and slow queries

236
00:10:53.639 --> 00:10:54.039
<v Speaker 4>and stuff.

237
00:10:54.080 --> 00:10:56.720
<v Speaker 5>Where's my Rails debug bar? That's what I want to know,

238
00:10:56.960 --> 00:11:00.799
<v Speaker 5>Moving swiftly on from my basic ability to use a website.

239
00:11:00.960 --> 00:11:03.879
<v Speaker 5>So I was asking about the way you cook it

240
00:11:03.919 --> 00:11:06.559
<v Speaker 5>in what there's for the benefit of people who can't

241
00:11:06.639 --> 00:11:09.720
<v Speaker 5>use website like me. How does Rail send down that

242
00:11:09.879 --> 00:11:13.120
<v Speaker 5>lump that cut because there's two things, aren't there. There's

243
00:11:13.159 --> 00:11:15.679
<v Speaker 5>the kind of layout and there's the and the props.

244
00:11:15.879 --> 00:11:17.720
<v Speaker 3>Yes, yeah, yeah, so I'll walk you through.

245
00:11:17.759 --> 00:11:20.720
<v Speaker 4>That's I often failed to kind of explain this just

246
00:11:20.759 --> 00:11:23.000
<v Speaker 4>because you know, you forget sometimes kind of where to

247
00:11:23.039 --> 00:11:25.360
<v Speaker 4>start after you've talked about something for long enough. But

248
00:11:25.480 --> 00:11:28.320
<v Speaker 4>so what essentially happens, and I'll explain it as best

249
00:11:28.360 --> 00:11:30.600
<v Speaker 4>I can kind of using Rail's lingo, but I'm not

250
00:11:30.720 --> 00:11:32.759
<v Speaker 4>super familiar with with it all, but like.

251
00:11:32.720 --> 00:11:33.200
<v Speaker 3>Work with me.

252
00:11:33.360 --> 00:11:35.320
<v Speaker 4>So basically, a request is going to come in, so

253
00:11:35.440 --> 00:11:38.279
<v Speaker 4>through the very first time that someone hits your inertia application,

254
00:11:38.320 --> 00:11:41.120
<v Speaker 4>your inertia rails application. What's going to happen is it's

255
00:11:41.120 --> 00:11:43.360
<v Speaker 4>going to notice that it's just it's a standard full

256
00:11:43.440 --> 00:11:45.639
<v Speaker 4>page visit, right, And what it's going to do is

257
00:11:45.720 --> 00:11:48.399
<v Speaker 4>it's going to hit rails and it's going to see

258
00:11:48.399 --> 00:11:50.480
<v Speaker 4>that it's not an inertial request. So it's not going

259
00:11:50.559 --> 00:11:52.840
<v Speaker 4>to return some JSON. It's just going to go through

260
00:11:52.840 --> 00:11:55.000
<v Speaker 4>the normal flow. And what it's going to do is

261
00:11:55.120 --> 00:11:58.240
<v Speaker 4>it's going to return your base ERB template, so your

262
00:11:58.360 --> 00:12:00.679
<v Speaker 4>layout file, right, and that layout file, well, it's just

263
00:12:00.720 --> 00:12:03.399
<v Speaker 4>like a standard layout file that has your head which

264
00:12:03.519 --> 00:12:06.080
<v Speaker 4>is going to have your script tags and it's gonna

265
00:12:06.080 --> 00:12:08.559
<v Speaker 4>have your style tags kind of just your standard layout.

266
00:12:08.679 --> 00:12:11.039
<v Speaker 4>The difference is what it's not going to do is

267
00:12:11.080 --> 00:12:13.399
<v Speaker 4>it's not going to keep in mind that someone may

268
00:12:13.480 --> 00:12:15.360
<v Speaker 4>land on your app on any different page. It doesn't

269
00:12:15.360 --> 00:12:16.960
<v Speaker 4>have to be the homepage, of course, of the index page.

270
00:12:16.960 --> 00:12:18.840
<v Speaker 4>It could be any page in your application, right, So

271
00:12:18.879 --> 00:12:20.320
<v Speaker 4>it's going to see that request coming in, so it's

272
00:12:20.360 --> 00:12:22.440
<v Speaker 4>going to return or it's going to server side render

273
00:12:22.559 --> 00:12:25.879
<v Speaker 4>that layout. Except the only difference is within the body

274
00:12:26.200 --> 00:12:29.240
<v Speaker 4>of that server side rendered HTML file, it's not going

275
00:12:29.320 --> 00:12:31.360
<v Speaker 4>to have any page content, So the page content will

276
00:12:31.360 --> 00:12:34.240
<v Speaker 4>not exist. So you landed on, say the user's page

277
00:12:34.240 --> 00:12:36.320
<v Speaker 4>within your application, it's not going to have a bunch

278
00:12:36.320 --> 00:12:39.720
<v Speaker 4>of HTML server side HTML generated and rendered. What it's

279
00:12:39.759 --> 00:12:42.879
<v Speaker 4>going to do instead is there is a base DIV

280
00:12:43.039 --> 00:12:46.080
<v Speaker 4>that it's that you need to put in your base layout,

281
00:12:46.320 --> 00:12:49.840
<v Speaker 4>and that's the DIV that your client side application is

282
00:12:49.879 --> 00:12:52.799
<v Speaker 4>going to mount to. So what happens is that based div,

283
00:12:53.039 --> 00:12:56.320
<v Speaker 4>your client side app, view, React whatever mounts to that.

284
00:12:56.440 --> 00:13:00.200
<v Speaker 4>But what happens is server side it passes this page

285
00:13:00.240 --> 00:13:03.399
<v Speaker 4>object so Adjason encoded page object as one of the

286
00:13:03.600 --> 00:13:07.960
<v Speaker 4>attributes within that DIV. So I think it's called data

287
00:13:08.039 --> 00:13:11.879
<v Speaker 4>dash page is the page attribute. I should probably double

288
00:13:12.000 --> 00:13:14.080
<v Speaker 4>check and know that offhand, but I'm pretty certain, Yeah,

289
00:13:14.120 --> 00:13:16.840
<v Speaker 4>it's a data dash page. That's the attribute on the div.

290
00:13:16.919 --> 00:13:19.440
<v Speaker 4>So imagine ATIV has an idea of app, which is

291
00:13:19.440 --> 00:13:21.919
<v Speaker 4>what your Viewer React apps can amount into, and then

292
00:13:21.960 --> 00:13:24.919
<v Speaker 4>it has an attribute called data dash page and the

293
00:13:25.519 --> 00:13:29.399
<v Speaker 4>contents of that data dash page attribute is just a string,

294
00:13:29.440 --> 00:13:32.399
<v Speaker 4>but it's actually a Jason encoded string, and what it's

295
00:13:32.440 --> 00:13:37.240
<v Speaker 4>including is all the necessary information that INERTI needs in

296
00:13:37.360 --> 00:13:40.919
<v Speaker 4>order to boot up that particular client side page component.

297
00:13:41.000 --> 00:13:43.039
<v Speaker 3>So it's going to include two main things that the

298
00:13:43.080 --> 00:13:45.799
<v Speaker 3>most important things to know are. One the component name,

299
00:13:45.919 --> 00:13:47.519
<v Speaker 3>So the component name is going to be the viewer

300
00:13:47.559 --> 00:13:50.480
<v Speaker 3>React component page component name, so in this case it

301
00:13:50.559 --> 00:13:52.360
<v Speaker 3>might be the user page, which is going to have

302
00:13:52.399 --> 00:13:55.960
<v Speaker 3>a corresponding user page dot view file or user page

303
00:13:55.960 --> 00:13:58.799
<v Speaker 3>dot react file. And then the second piece of information

304
00:13:58.879 --> 00:14:01.360
<v Speaker 3>that's going to be in that Jason payload is the props,

305
00:14:01.399 --> 00:14:03.559
<v Speaker 3>which is the data. I call them props because they're

306
00:14:03.600 --> 00:14:06.960
<v Speaker 3>considered when you're working with viewer React. Props are the

307
00:14:07.000 --> 00:14:10.080
<v Speaker 3>properties there, the attributes the data that gets passed to

308
00:14:10.279 --> 00:14:12.279
<v Speaker 3>that component. So it's essentially the data.

309
00:14:12.360 --> 00:14:15.679
<v Speaker 4>So if you imagine now if we hit the Rails app,

310
00:14:15.759 --> 00:14:18.960
<v Speaker 4>it's the user's page which gets which causes the routing

311
00:14:19.120 --> 00:14:22.080
<v Speaker 4>to go to the user's controller, the index method of

312
00:14:22.120 --> 00:14:24.919
<v Speaker 4>the user's controller. Your index method is going to go off,

313
00:14:25.000 --> 00:14:27.159
<v Speaker 4>and it's gonna use active record to get some data

314
00:14:27.200 --> 00:14:29.320
<v Speaker 4>from the database for the users that you want to

315
00:14:29.320 --> 00:14:30.440
<v Speaker 4>display on that page.

316
00:14:30.519 --> 00:14:32.039
<v Speaker 3>And then in a classic.

317
00:14:31.679 --> 00:14:33.600
<v Speaker 4>Rails app and jump in if I get any of

318
00:14:33.639 --> 00:14:36.120
<v Speaker 4>the terms wrong here, gents, because I'm you know, I'm

319
00:14:36.440 --> 00:14:38.879
<v Speaker 4>gonna use more kind of lingo that I know. But

320
00:14:38.919 --> 00:14:41.320
<v Speaker 4>what it's going to do is normally you would then

321
00:14:41.360 --> 00:14:44.559
<v Speaker 4>return an ERB template that you pass the user index

322
00:14:44.919 --> 00:14:47.840
<v Speaker 4>view too, and pass the data which is the users

323
00:14:47.919 --> 00:14:50.120
<v Speaker 4>you just looked up from the database, use an active record,

324
00:14:50.279 --> 00:14:52.279
<v Speaker 4>and that's going to go off and generate your HTML.

325
00:14:52.440 --> 00:14:56.360
<v Speaker 4>In this situation, you would instead return an inertia response.

326
00:14:56.480 --> 00:14:59.559
<v Speaker 4>So it's but the clever thing about the inertia response

327
00:14:59.720 --> 00:15:02.320
<v Speaker 4>is so it's basically the exact same thing. You basically

328
00:15:02.519 --> 00:15:05.799
<v Speaker 4>return inertia. You pass it the name of the page component,

329
00:15:05.879 --> 00:15:08.399
<v Speaker 4>and you pass it the data. So the controller itself

330
00:15:08.519 --> 00:15:11.399
<v Speaker 4>doesn't know if it was a full page visit like

331
00:15:11.440 --> 00:15:14.360
<v Speaker 4>a standard get visit, or if it was an actual

332
00:15:14.360 --> 00:15:17.840
<v Speaker 4>inertia visit. Inertia takes care of that. All the controller

333
00:15:17.879 --> 00:15:20.720
<v Speaker 4>has to do is to return the page component name,

334
00:15:20.840 --> 00:15:23.279
<v Speaker 4>so the client side page component name and the data

335
00:15:23.320 --> 00:15:26.519
<v Speaker 4>for that component. Then the Inertia behind the scenes, it

336
00:15:26.600 --> 00:15:29.559
<v Speaker 4>inspects the request and says, okay, was this a full

337
00:15:29.639 --> 00:15:31.919
<v Speaker 4>page visit? You know, so where we need to display

338
00:15:31.960 --> 00:15:33.679
<v Speaker 4>the layout? Well, if that's the case, well then we're

339
00:15:33.679 --> 00:15:35.159
<v Speaker 4>going to display the layout. We're going to render its

340
00:15:35.159 --> 00:15:38.840
<v Speaker 4>server side, and we're going to inject that base div

341
00:15:38.960 --> 00:15:42.120
<v Speaker 4>with the idea of app and with the data page

342
00:15:42.159 --> 00:15:43.759
<v Speaker 4>attribute with all the data for it, and then we're

343
00:15:43.799 --> 00:15:45.279
<v Speaker 4>just going to render that out. It's kind of just

344
00:15:45.279 --> 00:15:48.159
<v Speaker 4>a standard htam olt page. Then Inertia will grab that

345
00:15:48.279 --> 00:15:51.679
<v Speaker 4>data and boot up the client side application. However, on

346
00:15:51.919 --> 00:15:55.000
<v Speaker 4>subsequent visits, when inertia, so if you go then and

347
00:15:55.000 --> 00:15:56.840
<v Speaker 4>click to a different page, maybe you click on one

348
00:15:56.840 --> 00:15:58.440
<v Speaker 4>of the users you want to view the user, when

349
00:15:58.440 --> 00:16:01.919
<v Speaker 4>inertia does is it intersect that click that page visit

350
00:16:02.200 --> 00:16:04.639
<v Speaker 4>and it then makes the XHR request to the server.

351
00:16:04.799 --> 00:16:06.120
<v Speaker 3>It's going to hit in the exact same way.

352
00:16:06.159 --> 00:16:08.679
<v Speaker 4>Now imagine it's going to hit your user's controller again,

353
00:16:08.679 --> 00:16:10.240
<v Speaker 4>but this time it's going to hit the show method.

354
00:16:10.399 --> 00:16:11.440
<v Speaker 3>So again, what would you.

355
00:16:11.399 --> 00:16:14.919
<v Speaker 4>Do just an standard layer or standard layer belt or

356
00:16:15.000 --> 00:16:17.279
<v Speaker 4>rails app is you go off, you'd get that user

357
00:16:17.279 --> 00:16:19.840
<v Speaker 4>from the database, use an active record, right, and then

358
00:16:19.879 --> 00:16:21.960
<v Speaker 4>you would normally just return a response to show the

359
00:16:22.440 --> 00:16:25.679
<v Speaker 4>user show page with the user data. Except again with inertia,

360
00:16:25.679 --> 00:16:27.399
<v Speaker 4>you wouldn't do that. You would do you'd return an

361
00:16:27.440 --> 00:16:31.320
<v Speaker 4>inertial response that would then have the user show page component,

362
00:16:31.360 --> 00:16:33.600
<v Speaker 4>client side page component, and the data which would be

363
00:16:33.639 --> 00:16:35.840
<v Speaker 4>the user data maybe their ID and their first name,

364
00:16:35.879 --> 00:16:37.840
<v Speaker 4>their email and their last name and whatever else. Right,

365
00:16:38.080 --> 00:16:41.320
<v Speaker 4>So when that request comes through the XHR request, what

366
00:16:41.399 --> 00:16:44.960
<v Speaker 4>inertia does is it passes through an ex inertia header

367
00:16:45.000 --> 00:16:47.679
<v Speaker 4>which is set to true so that your rails app

368
00:16:47.879 --> 00:16:50.840
<v Speaker 4>knows that this isn't a full pagreload. This is this

369
00:16:50.919 --> 00:16:53.440
<v Speaker 4>is like an inertia request, So it's an XHR request,

370
00:16:53.600 --> 00:16:56.840
<v Speaker 4>and what it does instead is it returns not the

371
00:16:57.200 --> 00:16:59.279
<v Speaker 4>full body and the full layout and everything else.

372
00:16:59.360 --> 00:17:02.519
<v Speaker 3>It just turns the Jason data that it requires.

373
00:17:02.519 --> 00:17:04.920
<v Speaker 4>So that's the same Jason data that we put in

374
00:17:04.920 --> 00:17:07.359
<v Speaker 4>the data page attribute if it was like the full

375
00:17:07.680 --> 00:17:10.960
<v Speaker 4>you know, HTML layout render kind of on the first visit,

376
00:17:11.240 --> 00:17:14.480
<v Speaker 4>except it just returns the Jason and nothing else and

377
00:17:14.480 --> 00:17:16.839
<v Speaker 4>it returns out obviously is adjacent response, which that's gonna

378
00:17:16.880 --> 00:17:19.440
<v Speaker 4>have your component name and all your props and then

379
00:17:19.519 --> 00:17:21.440
<v Speaker 4>kind of getting back to what I explained earlier, and

380
00:17:21.519 --> 00:17:24.720
<v Speaker 4>Nursa's gonna then take that. It's gonna dynamically swap out

381
00:17:24.759 --> 00:17:27.680
<v Speaker 4>the client side page component with the new page component

382
00:17:27.880 --> 00:17:31.319
<v Speaker 4>and dynamically swap out the data the props for that

383
00:17:31.359 --> 00:17:34.720
<v Speaker 4>component and like service sorry for the for the user

384
00:17:34.720 --> 00:17:35.799
<v Speaker 4>and the browser, it's.

385
00:17:35.680 --> 00:17:37.440
<v Speaker 3>Gonna look like you went to a whole new page.

386
00:17:37.519 --> 00:17:39.799
<v Speaker 4>But the reality is it's just done some really nice

387
00:17:39.839 --> 00:17:41.720
<v Speaker 4>magical work in the background to just kind of flip

388
00:17:41.720 --> 00:17:43.359
<v Speaker 4>it for you. And then, of course, like I said,

389
00:17:43.440 --> 00:17:46.839
<v Speaker 4>Inertia is essentially in its simplest form, it is a

390
00:17:46.839 --> 00:17:50.480
<v Speaker 4>client side routing library. So it's gonna update your URL

391
00:17:50.519 --> 00:17:53.079
<v Speaker 4>in the browser, and it's gonna update the necessary page

392
00:17:53.079 --> 00:17:55.160
<v Speaker 4>state so that you have like you know, proper history

393
00:17:55.200 --> 00:17:57.200
<v Speaker 4>and stuff so you can navigate back and forth and

394
00:17:57.240 --> 00:17:59.279
<v Speaker 4>stuff like that. So that's kind of like the trickiness

395
00:17:59.279 --> 00:18:01.279
<v Speaker 4>that we do with the reality is from a development

396
00:18:01.359 --> 00:18:04.559
<v Speaker 4>experience for people who are using rails or layervell who

397
00:18:04.559 --> 00:18:06.480
<v Speaker 4>are kind of used to working with that, Hey, I

398
00:18:06.519 --> 00:18:08.799
<v Speaker 4>got a controller, I got a controller method, I got

399
00:18:08.799 --> 00:18:10.279
<v Speaker 4>to get some data from the database and I got

400
00:18:10.279 --> 00:18:12.880
<v Speaker 4>a return of you with some data. It literally feels

401
00:18:12.880 --> 00:18:16.160
<v Speaker 4>the exact same way, except the difference is you're ending up.

402
00:18:16.240 --> 00:18:19.400
<v Speaker 4>You're working with viewer React templates, you're not working with

403
00:18:19.480 --> 00:18:20.559
<v Speaker 4>EARB templates.

404
00:18:20.640 --> 00:18:23.440
<v Speaker 5>All right, I found it. Now It's super easy. And

405
00:18:23.799 --> 00:18:26.240
<v Speaker 5>for the other kind of web challenge people who are listening,

406
00:18:26.440 --> 00:18:29.119
<v Speaker 5>there is a gem. There is. This is the this

407
00:18:29.200 --> 00:18:31.559
<v Speaker 5>is the key component I was missing. There is an

408
00:18:31.759 --> 00:18:35.240
<v Speaker 5>inertia under school rails gem that does it for you.

409
00:18:35.559 --> 00:18:38.960
<v Speaker 3>Yes, yes, I should have mentioned that probably too. Yes,

410
00:18:39.039 --> 00:18:40.359
<v Speaker 3>so you don't got to do any of this work.

411
00:18:40.400 --> 00:18:42.680
<v Speaker 4>This, like I said, when inertia does all the magical

412
00:18:42.720 --> 00:18:44.839
<v Speaker 4>work for you, it's actually and when I say magical,

413
00:18:44.880 --> 00:18:45.640
<v Speaker 4>it's really not that.

414
00:18:45.839 --> 00:18:48.640
<v Speaker 3>It's not magical at all. It's in its most basic form.

415
00:18:48.680 --> 00:18:49.319
<v Speaker 3>It's imagine this.

416
00:18:49.559 --> 00:18:52.680
<v Speaker 4>You have a page response, The inertia gem looks to see,

417
00:18:52.720 --> 00:18:55.519
<v Speaker 4>Hey was the x HR Sorry was the ex inertia

418
00:18:55.519 --> 00:18:58.119
<v Speaker 4>header set to true? Well yeah, if it is, then

419
00:18:58.160 --> 00:19:01.240
<v Speaker 4>return Jason instead of HTML. It's like literally that basic,

420
00:19:01.359 --> 00:19:03.720
<v Speaker 4>and there is you know, some other interesting features that

421
00:19:03.799 --> 00:19:06.359
<v Speaker 4>kind of go along with it, such as automatic asset

422
00:19:06.440 --> 00:19:09.680
<v Speaker 4>refreshing and partial reloads so it does get more complicated,

423
00:19:09.759 --> 00:19:11.920
<v Speaker 4>but in its basic form, like I tell people that

424
00:19:11.920 --> 00:19:13.440
<v Speaker 4>if you didn't have the gem, like so, we do

425
00:19:13.480 --> 00:19:17.000
<v Speaker 4>have an official Inertia gem for Rails, and we also

426
00:19:17.039 --> 00:19:19.799
<v Speaker 4>have an official layer bel package for this as well,

427
00:19:19.839 --> 00:19:21.680
<v Speaker 4>so it kind of just makes it really really easy.

428
00:19:21.759 --> 00:19:24.200
<v Speaker 4>But there's all kinds of people who are making adapters,

429
00:19:24.240 --> 00:19:27.759
<v Speaker 4>client side adapters for other languages and frameworks, and it's

430
00:19:27.920 --> 00:19:30.000
<v Speaker 4>in its most basic form, it's really does not take

431
00:19:30.039 --> 00:19:30.319
<v Speaker 4>that much.

432
00:19:30.359 --> 00:19:32.599
<v Speaker 3>We actually have a page that kind of explains.

433
00:19:32.160 --> 00:19:34.240
<v Speaker 4>A spec I kind of call it a protocol because

434
00:19:34.279 --> 00:19:36.039
<v Speaker 4>in a way, that's really what it is. And as

435
00:19:36.039 --> 00:19:38.039
<v Speaker 4>long as you implement that protocol, which is a very

436
00:19:38.039 --> 00:19:40.000
<v Speaker 4>simple protocol, you can do this in other language. I

437
00:19:40.279 --> 00:19:42.599
<v Speaker 4>tell people I've literally seen this done. Somebody reached out

438
00:19:42.599 --> 00:19:44.680
<v Speaker 4>and they had done this in cold Fusion. I didn't

439
00:19:44.680 --> 00:19:47.039
<v Speaker 4>even know cold fusion was still a thing, but somebody

440
00:19:47.079 --> 00:19:51.240
<v Speaker 4>has created an inertia cold Fusion adapter, and there's there.

441
00:19:51.279 --> 00:19:53.359
<v Speaker 4>I know there's been one creative for Django and all

442
00:19:53.440 --> 00:19:56.039
<v Speaker 4>kinds of other frameworks. Now, the challenge for me as

443
00:19:56.119 --> 00:19:59.240
<v Speaker 4>a library maintainer is normally in the past, anytime I've

444
00:19:59.279 --> 00:20:02.599
<v Speaker 4>created library I've always worked with the language that I'm

445
00:20:02.640 --> 00:20:04.799
<v Speaker 4>familiar with. So I've worked with PHP and layer Vell

446
00:20:05.000 --> 00:20:07.240
<v Speaker 4>and it's not been that or even JavaScript, and it's

447
00:20:07.519 --> 00:20:09.960
<v Speaker 4>not been that hard making the you know, maintain the library.

448
00:20:09.960 --> 00:20:12.759
<v Speaker 4>The challenge where the ertia is I'm finding myself becoming

449
00:20:12.799 --> 00:20:15.880
<v Speaker 4>more proficient in other languages and frameworks because in order

450
00:20:15.920 --> 00:20:18.640
<v Speaker 4>to maintain the Rails adapter, I got to now be

451
00:20:18.720 --> 00:20:20.839
<v Speaker 4>more of a Ruby expert on anything about an expert

452
00:20:20.880 --> 00:20:22.319
<v Speaker 4>I should even said that, but like I got to

453
00:20:22.319 --> 00:20:23.680
<v Speaker 4>know the basics of those frameworks.

454
00:20:23.680 --> 00:20:25.359
<v Speaker 3>But fortunately I've had some a lot.

455
00:20:25.279 --> 00:20:27.039
<v Speaker 4>Of people kind of like jump in and help out

456
00:20:27.079 --> 00:20:30.720
<v Speaker 4>on framework specific adapters. Really that my job at the

457
00:20:30.799 --> 00:20:33.039
<v Speaker 4>end of the day is managing the client side adapters,

458
00:20:33.039 --> 00:20:35.359
<v Speaker 4>because that's, honestly, that's really the hard part. The view

459
00:20:35.640 --> 00:20:38.480
<v Speaker 4>the React and the Spelt adapters are the tricky kind

460
00:20:38.480 --> 00:20:40.759
<v Speaker 4>of piece because they're all they kind of got little differences.

461
00:20:40.799 --> 00:20:43.240
<v Speaker 4>The way they do dynamic components swapping, the way they

462
00:20:43.279 --> 00:20:46.079
<v Speaker 4>do data handling, the way they do reactivity. All that

463
00:20:46.119 --> 00:20:48.200
<v Speaker 4>stuff is it's a little bit different each one of

464
00:20:48.200 --> 00:20:49.279
<v Speaker 4>those client side frameworks.

465
00:20:49.279 --> 00:20:50.079
<v Speaker 3>So that's kind of like.

466
00:20:50.079 --> 00:20:51.880
<v Speaker 4>Really the heart of my job. And even there I

467
00:20:51.880 --> 00:20:54.160
<v Speaker 4>actually have somebody who's helped on the project. One guy

468
00:20:54.200 --> 00:20:56.640
<v Speaker 4>who's managing the so I managed to view adapter, another

469
00:20:56.680 --> 00:21:00.200
<v Speaker 4>guy manages the React adapter, and another guy manages be

470
00:21:00.319 --> 00:21:03.440
<v Speaker 4>spelt adapter. So that's been It's really quite a collaborative

471
00:21:03.480 --> 00:21:04.599
<v Speaker 4>project in that sense.

472
00:21:04.880 --> 00:21:05.279
<v Speaker 2>All right.

473
00:21:05.359 --> 00:21:08.000
<v Speaker 1>Now that we theoretically know how to make an app

474
00:21:08.000 --> 00:21:10.720
<v Speaker 1>with inertia, why am I making an app with inertia?

475
00:21:10.759 --> 00:21:12.799
<v Speaker 1>Like what where do you see inertia kind of fitting

476
00:21:12.839 --> 00:21:15.680
<v Speaker 1>into the space? And what kinds of apps are we

477
00:21:15.799 --> 00:21:16.240
<v Speaker 1>using it for?

478
00:21:16.359 --> 00:21:16.880
<v Speaker 2>Things like that?

479
00:21:17.079 --> 00:21:20.720
<v Speaker 4>Yeah, that's a really good question to ask, because I

480
00:21:20.759 --> 00:21:23.880
<v Speaker 4>think it's important. I think sometimes what happens is people

481
00:21:23.920 --> 00:21:26.799
<v Speaker 4>come out with new projects, and I think people like

482
00:21:26.839 --> 00:21:29.319
<v Speaker 4>the idea of saying, well, this, this whatever, this new

483
00:21:29.319 --> 00:21:32.079
<v Speaker 4>piece of technology is, this is now the one way

484
00:21:32.160 --> 00:21:34.319
<v Speaker 4>to do all the things, and we just like we

485
00:21:34.359 --> 00:21:36.119
<v Speaker 4>want to like double down and fully commit to that

486
00:21:36.160 --> 00:21:38.759
<v Speaker 4>for everything. And if it doesn't do everything, well, then

487
00:21:38.759 --> 00:21:41.000
<v Speaker 4>we don't like it. Yeah, we get disappointed if it

488
00:21:41.119 --> 00:21:42.759
<v Speaker 4>isn't appropriate for all use cases.

489
00:21:42.839 --> 00:21:44.480
<v Speaker 3>And I'm generally.

490
00:21:44.119 --> 00:21:46.200
<v Speaker 4>Like slow to say use the right tool for the job,

491
00:21:46.200 --> 00:21:48.839
<v Speaker 4>because I find quite often we're just most effective using

492
00:21:48.960 --> 00:21:51.039
<v Speaker 4>the tool we know and that's tends to be what's

493
00:21:51.079 --> 00:21:53.720
<v Speaker 4>worked out better for me. I know that, you know, yeah,

494
00:21:53.839 --> 00:21:55.680
<v Speaker 4>I know that Electra might be better or no, it

495
00:21:55.799 --> 00:21:58.359
<v Speaker 4>might be better for creating certain apps nowadays, but I'm

496
00:21:58.359 --> 00:22:00.200
<v Speaker 4>just so stinking fast with layer Bell that I just

497
00:22:00.240 --> 00:22:01.960
<v Speaker 4>I use that because it's a tool I know and love.

498
00:22:02.079 --> 00:22:03.920
<v Speaker 4>But I do I will say that kind of in

499
00:22:04.039 --> 00:22:05.119
<v Speaker 4>response to that question.

500
00:22:05.440 --> 00:22:06.119
<v Speaker 3>I do think that.

501
00:22:06.000 --> 00:22:09.000
<v Speaker 4>Inertia is super suited, super well suited for some situations

502
00:22:09.039 --> 00:22:11.279
<v Speaker 4>and not others. So the one that it's not well

503
00:22:11.319 --> 00:22:13.799
<v Speaker 4>suited for is in a situation where it actually does

504
00:22:13.920 --> 00:22:17.440
<v Speaker 4>make sense to make a full on API. So if

505
00:22:17.799 --> 00:22:19.599
<v Speaker 4>it makes sense for you to have a full rest

506
00:22:19.640 --> 00:22:23.480
<v Speaker 4>API and a full graph QLAPI, then Inertia maybe not

507
00:22:23.559 --> 00:22:25.759
<v Speaker 4>the right choice because with inertia, the whole like my

508
00:22:25.880 --> 00:22:28.920
<v Speaker 4>goal with this is to avoid you having to create

509
00:22:28.960 --> 00:22:32.160
<v Speaker 4>this whole separate project, this whole separate API, figuring out

510
00:22:32.160 --> 00:22:34.440
<v Speaker 4>all the authentication figuring out with all the old off

511
00:22:34.480 --> 00:22:36.960
<v Speaker 4>stuff and all that Hoopla and the separate hosting account

512
00:22:37.000 --> 00:22:37.559
<v Speaker 4>and everything else.

513
00:22:37.680 --> 00:22:39.160
<v Speaker 3>Like, my goal is that I just want to build

514
00:22:39.160 --> 00:22:39.400
<v Speaker 3>an app.

515
00:22:39.400 --> 00:22:40.640
<v Speaker 4>I want to get some data from the database to

516
00:22:40.680 --> 00:22:42.079
<v Speaker 4>use an active record, and I want to spit that

517
00:22:42.079 --> 00:22:43.519
<v Speaker 4>to I you and render it like that's what I

518
00:22:43.519 --> 00:22:45.880
<v Speaker 4>want to do with inertia. It's a like the very fast,

519
00:22:45.920 --> 00:22:48.359
<v Speaker 4>classic monolith way of building an application. But if you

520
00:22:48.400 --> 00:22:51.079
<v Speaker 4>did have a use case that you really truly did

521
00:22:51.200 --> 00:22:54.240
<v Speaker 4>need an API. So maybe you're building a web app

522
00:22:54.240 --> 00:22:56.920
<v Speaker 4>that has an iOS app and an Android app, and

523
00:22:56.960 --> 00:22:59.960
<v Speaker 4>maybe you have maybe you have a native desktop applications

524
00:23:00.119 --> 00:23:02.559
<v Speaker 4>or whatever. If you have that use case, then inertia

525
00:23:02.599 --> 00:23:04.400
<v Speaker 4>may not be the right choice because it might just

526
00:23:04.440 --> 00:23:06.680
<v Speaker 4>make sense in that situation to actually just go off

527
00:23:06.720 --> 00:23:09.839
<v Speaker 4>and build that HOLYPI. But in my experience, there's a

528
00:23:10.039 --> 00:23:12.640
<v Speaker 4>ton of applications that get built and I would say,

529
00:23:12.680 --> 00:23:15.240
<v Speaker 4>like especially like a lot of just like business level

530
00:23:15.279 --> 00:23:19.039
<v Speaker 4>applications that never ever ever go past being a web app.

531
00:23:19.119 --> 00:23:20.519
<v Speaker 3>That's what they always are.

532
00:23:20.680 --> 00:23:22.359
<v Speaker 4>So yeah, there is there a chance that it could

533
00:23:22.440 --> 00:23:25.799
<v Speaker 4>eventually need an API, sure, but so often you don't

534
00:23:25.880 --> 00:23:28.000
<v Speaker 4>need that. And you know what you think about any

535
00:23:28.039 --> 00:23:30.599
<v Speaker 4>application that's built with just Classic LAYERVELT and built with

536
00:23:30.680 --> 00:23:34.039
<v Speaker 4>just Classic rails using Classic Rails service side rendering or

537
00:23:34.119 --> 00:23:37.240
<v Speaker 4>layveel service side rendering, you've already made that decision. You've

538
00:23:37.240 --> 00:23:39.880
<v Speaker 4>already said this is the web app. And if I

539
00:23:39.880 --> 00:23:41.279
<v Speaker 4>ever need an API, well, then I going to go

540
00:23:41.359 --> 00:23:42.920
<v Speaker 4>off and build this a great API for it. So

541
00:23:43.079 --> 00:23:46.000
<v Speaker 4>that's really where inertia fits. If you were planning and

542
00:23:46.039 --> 00:23:49.480
<v Speaker 4>building a server side rendered application, you've already given You've

543
00:23:49.519 --> 00:23:50.240
<v Speaker 4>already said.

544
00:23:50.079 --> 00:23:50.799
<v Speaker 3>No to the API.

545
00:23:50.960 --> 00:23:53.279
<v Speaker 4>So my thing here is I really wanted Anertia to

546
00:23:53.319 --> 00:23:55.480
<v Speaker 4>be for those developers, those who said, you know, I

547
00:23:55.480 --> 00:23:57.559
<v Speaker 4>want to build a service side application. I was gonna

548
00:23:57.559 --> 00:23:59.359
<v Speaker 4>build it with layer bel or I was gonna build

549
00:23:59.359 --> 00:24:02.559
<v Speaker 4>with rails using the standard monolith approach. I've already decided

550
00:24:02.599 --> 00:24:04.240
<v Speaker 4>I'm not going to build an API. Well, then inertia

551
00:24:04.240 --> 00:24:06.640
<v Speaker 4>is a wonderful fit because then it allows you to

552
00:24:06.720 --> 00:24:09.960
<v Speaker 4>build a rich client side application using viewer react will

553
00:24:10.000 --> 00:24:13.119
<v Speaker 4>still completely working within the paradigm the monolith approach that

554
00:24:13.240 --> 00:24:16.039
<v Speaker 4>you know, and you can be really really really fast

555
00:24:16.079 --> 00:24:18.519
<v Speaker 4>with that approach. And in my experience as well, I

556
00:24:18.640 --> 00:24:21.920
<v Speaker 4>have built applications that use Inertia.

557
00:24:21.279 --> 00:24:23.279
<v Speaker 3>As kind of the web app tool.

558
00:24:23.440 --> 00:24:26.319
<v Speaker 4>And even in those applications I've have like my own application,

559
00:24:26.440 --> 00:24:28.200
<v Speaker 4>I do have an iOS and Android app that I'm

560
00:24:28.200 --> 00:24:30.440
<v Speaker 4>building right now, but the iOS and Android app is

561
00:24:30.759 --> 00:24:32.799
<v Speaker 4>so simple compared to the web app, because that's what

562
00:24:32.839 --> 00:24:33.400
<v Speaker 4>makes sense for.

563
00:24:33.359 --> 00:24:34.799
<v Speaker 3>My business that I didn't.

564
00:24:34.839 --> 00:24:36.920
<v Speaker 4>Even then, I still went in my layer of bel

565
00:24:36.920 --> 00:24:39.279
<v Speaker 4>app and I just built a really light rest API

566
00:24:39.359 --> 00:24:42.240
<v Speaker 4>for my native iOS and Android apps. I still didn't

567
00:24:42.240 --> 00:24:44.440
<v Speaker 4>need to fully double down and make my whole web app,

568
00:24:44.480 --> 00:24:46.880
<v Speaker 4>you know, run on on this API. It's still made

569
00:24:46.960 --> 00:24:50.039
<v Speaker 4>sense to build a web app using using Reactor, View

570
00:24:50.240 --> 00:24:53.559
<v Speaker 4>and Inertia without an API. And then literally I have

571
00:24:53.640 --> 00:24:56.240
<v Speaker 4>like five endpoints, five API en points for this core

572
00:24:56.279 --> 00:25:00.000
<v Speaker 4>functionality that I'm making available natively to iOS and Android.

573
00:25:00.279 --> 00:25:02.119
<v Speaker 4>So I hope that kind of explains it. So that's

574
00:25:02.160 --> 00:25:04.720
<v Speaker 4>really I would say. The reality is there are probably

575
00:25:04.799 --> 00:25:07.720
<v Speaker 4>a ton of situations. Basically, anytime you were planning on

576
00:25:07.799 --> 00:25:10.680
<v Speaker 4>building just a classic rails application, that's a good use

577
00:25:10.680 --> 00:25:13.200
<v Speaker 4>case for an inertia app if you have any sort

578
00:25:13.200 --> 00:25:16.559
<v Speaker 4>of more interesting client side needs. And by that, and

579
00:25:16.599 --> 00:25:19.240
<v Speaker 4>this is maybe the last distinction I should make, I

580
00:25:19.440 --> 00:25:22.640
<v Speaker 4>wouldn't personally use Inertia for anything that needs to be

581
00:25:22.720 --> 00:25:25.559
<v Speaker 4>public facing. So that's and the reason why is Inertia

582
00:25:25.640 --> 00:25:30.160
<v Speaker 4>is still a client side rendered application, meaning it doesn't

583
00:25:30.160 --> 00:25:32.720
<v Speaker 4>work great from an SEO perspective. Yes, Google is getting

584
00:25:32.720 --> 00:25:36.839
<v Speaker 4>better at indexing View and React apps. The JavaScript apps

585
00:25:36.839 --> 00:25:39.039
<v Speaker 4>it is, and it probably only will continue to get better.

586
00:25:39.079 --> 00:25:40.720
<v Speaker 4>But I think if I was building an application, if

587
00:25:40.759 --> 00:25:42.240
<v Speaker 4>I was building a blog, or if I was building

588
00:25:42.279 --> 00:25:44.279
<v Speaker 4>a news side, or I was building anything that had

589
00:25:44.319 --> 00:25:47.960
<v Speaker 4>a public face that where SEO Search engine optimization was

590
00:25:48.000 --> 00:25:52.640
<v Speaker 4>a concern, I probably wouldn't use inertia because of that limitation. Really,

591
00:25:52.680 --> 00:25:56.359
<v Speaker 4>I designed inertia for you know, admin control panels, applications,

592
00:25:56.400 --> 00:25:58.519
<v Speaker 4>you know SaaS applications where you need to log.

593
00:25:58.319 --> 00:26:00.000
<v Speaker 3>In all those kind of tools.

594
00:26:00.400 --> 00:26:03.279
<v Speaker 4>And one great use cases I've done this as well

595
00:26:03.440 --> 00:26:06.000
<v Speaker 4>is you could absolutely say, build a RAILS application that's

596
00:26:06.039 --> 00:26:09.440
<v Speaker 4>completely server side rendered for your public facing pages. Maybe

597
00:26:09.440 --> 00:26:10.880
<v Speaker 4>you're building a SaaS app. You have a bunch of

598
00:26:10.920 --> 00:26:13.160
<v Speaker 4>documentation that you want to make sure it's SEO friendly.

599
00:26:13.279 --> 00:26:15.039
<v Speaker 4>You have your pricing page, and you're about page, and

600
00:26:15.079 --> 00:26:17.759
<v Speaker 4>all those feature pages. You could build all that stuff

601
00:26:17.880 --> 00:26:20.839
<v Speaker 4>using RAILS with classic server side rendering, will still having

602
00:26:20.839 --> 00:26:24.200
<v Speaker 4>the application in the background. For the actual SaaS application

603
00:26:24.519 --> 00:26:27.359
<v Speaker 4>be an inertia application, but that's only available after you

604
00:26:27.440 --> 00:26:29.920
<v Speaker 4>log in. And that's a really common combo where you

605
00:26:30.000 --> 00:26:32.400
<v Speaker 4>use server side rendering on the front end and you

606
00:26:32.519 --> 00:26:35.359
<v Speaker 4>use inertia and client side rendering on the back end.

607
00:26:35.519 --> 00:26:37.119
<v Speaker 5>Can we talk about the flicker.

608
00:26:37.359 --> 00:26:40.480
<v Speaker 4>Yes, yes, So the simple answer is there is no flicker,

609
00:26:40.880 --> 00:26:43.119
<v Speaker 4>no flicker at all. That's why it's so wonderful. So

610
00:26:43.200 --> 00:26:45.400
<v Speaker 4>there was a flicker. Building it the old way. So

611
00:26:45.440 --> 00:26:48.400
<v Speaker 4>the old way I do this is anytime I needed

612
00:26:48.440 --> 00:26:51.160
<v Speaker 4>some view of view component or React component in my application,

613
00:26:51.359 --> 00:26:54.319
<v Speaker 4>I would be using classic server side rendering in layer vow,

614
00:26:54.400 --> 00:26:57.160
<v Speaker 4>which would return my full document, which would have all

615
00:26:57.160 --> 00:26:59.319
<v Speaker 4>the page content, but somewhere in the page. So imagine

616
00:26:59.319 --> 00:27:01.079
<v Speaker 4>it's maybe like a create user page, and maybe I

617
00:27:01.119 --> 00:27:03.559
<v Speaker 4>want to create the form to create the user.

618
00:27:03.559 --> 00:27:04.119
<v Speaker 3>Maybe I wanted to.

619
00:27:04.079 --> 00:27:06.480
<v Speaker 4>Build that in view because I like the reactivity of it.

620
00:27:06.559 --> 00:27:08.200
<v Speaker 4>I like be able to handle errors and everything else,

621
00:27:08.279 --> 00:27:10.440
<v Speaker 4>just kind of using that view approach. Right, So maybe

622
00:27:10.440 --> 00:27:12.519
<v Speaker 4>i'd have the whole page load, except the form itself

623
00:27:12.559 --> 00:27:13.960
<v Speaker 4>would just be a view component that.

624
00:27:13.920 --> 00:27:16.200
<v Speaker 3>Would boot up after the page loaded. Right, And that's

625
00:27:16.240 --> 00:27:17.359
<v Speaker 3>what I mean by a flicker.

626
00:27:17.440 --> 00:27:19.480
<v Speaker 4>That little thing takes a second to boot up because

627
00:27:19.599 --> 00:27:22.000
<v Speaker 4>view has to viewed boot up, and it's minor, like

628
00:27:22.039 --> 00:27:24.319
<v Speaker 4>we're talking milliseconds, but our eyes can perceive it, and

629
00:27:24.359 --> 00:27:27.680
<v Speaker 4>we especially notice it when that component takes no space

630
00:27:27.720 --> 00:27:29.319
<v Speaker 4>at first. But then if then it renders and it

631
00:27:29.319 --> 00:27:30.839
<v Speaker 4>takes a bunch of space and kind of like causes

632
00:27:30.880 --> 00:27:34.000
<v Speaker 4>the page to become longer, and you know, things move around,

633
00:27:34.039 --> 00:27:35.920
<v Speaker 4>and if you have a lot of view components, maybe

634
00:27:35.920 --> 00:27:38.519
<v Speaker 4>you have a drop down component or modal or different

635
00:27:38.519 --> 00:27:40.759
<v Speaker 4>things like this, that problem just becomes worse and worse.

636
00:27:40.839 --> 00:27:44.119
<v Speaker 4>Where with inertia that totally totally goes away because you're

637
00:27:44.119 --> 00:27:46.680
<v Speaker 4>getting exactly what you'd have with like a Classic view

638
00:27:46.920 --> 00:27:50.200
<v Speaker 4>or Rails or sorry, a view or React app, where

639
00:27:50.359 --> 00:27:52.759
<v Speaker 4>when you go to visit another page, it's going to

640
00:27:52.880 --> 00:27:56.279
<v Speaker 4>just render that new view component and nothing's getting destroyed

641
00:27:56.279 --> 00:27:58.440
<v Speaker 4>in the in between because you're not doing a full

642
00:27:58.480 --> 00:27:59.119
<v Speaker 4>page reload.

643
00:27:59.319 --> 00:28:01.119
<v Speaker 3>View and React are long living.

644
00:28:01.480 --> 00:28:03.359
<v Speaker 4>So when I go to the next page, it's going

645
00:28:03.440 --> 00:28:05.480
<v Speaker 4>to load that file in the background, it's going to

646
00:28:05.480 --> 00:28:07.960
<v Speaker 4>load the data in the background via that exit tour request,

647
00:28:08.119 --> 00:28:09.880
<v Speaker 4>and then when it's ready, it's going to swap it

648
00:28:09.920 --> 00:28:11.680
<v Speaker 4>out and you can you know, there's load ways to

649
00:28:11.680 --> 00:28:14.359
<v Speaker 4>have loading graphics and stuff in between that, but the

650
00:28:14.400 --> 00:28:17.240
<v Speaker 4>point is nothing's being destroyed when you go from one

651
00:28:17.240 --> 00:28:19.519
<v Speaker 4>page to the next that's causing any sort of flicker.

652
00:28:19.519 --> 00:28:21.599
<v Speaker 3>It's really really smooth.

653
00:28:21.440 --> 00:28:24.200
<v Speaker 5>So you sound like you care a lot about kind

654
00:28:24.240 --> 00:28:28.400
<v Speaker 5>of responsibility and user experience. Yes, very much, So let's

655
00:28:28.400 --> 00:28:32.039
<v Speaker 5>talk milliseconds here. Let's talk some real numbers, because I

656
00:28:32.039 --> 00:28:34.799
<v Speaker 5>can see we could take an enormous effort into kind

657
00:28:34.799 --> 00:28:37.640
<v Speaker 5>of making this to help people improve the experience so

658
00:28:37.720 --> 00:28:39.759
<v Speaker 5>they use this. Let's face it, the whole point is

659
00:28:39.799 --> 00:28:42.119
<v Speaker 5>to make the site nicer for the people we write

660
00:28:42.119 --> 00:28:45.240
<v Speaker 5>the software for. So what looks like a good load

661
00:28:45.319 --> 00:28:45.920
<v Speaker 5>page for you?

662
00:28:46.119 --> 00:28:48.640
<v Speaker 4>Yeah, So my goal generally on a regular web app

663
00:28:48.839 --> 00:28:51.000
<v Speaker 4>is two hundred milliseconds or less. If I'm building a

664
00:28:51.000 --> 00:28:54.400
<v Speaker 4>new application, That's really what I'm going for. Now, That's

665
00:28:54.519 --> 00:28:57.799
<v Speaker 4>what I would consider like a typical server response. But

666
00:28:57.880 --> 00:29:00.000
<v Speaker 4>as you know, there's more that goes into a website

667
00:29:00.039 --> 00:29:02.440
<v Speaker 4>loading than just your server response. You also have your

668
00:29:02.440 --> 00:29:04.720
<v Speaker 4>client side, the time that it needs to render there,

669
00:29:05.079 --> 00:29:07.200
<v Speaker 4>the time that it needs to actually painted it on

670
00:29:07.240 --> 00:29:09.079
<v Speaker 4>the page, the time that it needs to download, and

671
00:29:09.200 --> 00:29:12.160
<v Speaker 4>JavaScript bundles and different things like that. So yeah, for me,

672
00:29:12.480 --> 00:29:14.359
<v Speaker 4>this is honestly, this is one of the reasons why

673
00:29:14.400 --> 00:29:16.759
<v Speaker 4>I like this approach so much, is because I've been

674
00:29:16.880 --> 00:29:20.319
<v Speaker 4>very frustrated in the past building rest APIs or even

675
00:29:20.359 --> 00:29:23.079
<v Speaker 4>graph Q on the graph QL is amazing, but you

676
00:29:23.119 --> 00:29:25.720
<v Speaker 4>can run into performance issues really easy with graph u L.

677
00:29:25.759 --> 00:29:27.519
<v Speaker 4>If you're not careful, you can run into n plus

678
00:29:27.559 --> 00:29:30.599
<v Speaker 4>one issues just depending on the sort of graph of

679
00:29:30.680 --> 00:29:33.720
<v Speaker 4>data you're returning. It can be tricky from a performance

680
00:29:33.759 --> 00:29:37.240
<v Speaker 4>perspective in real applications to have every response from your

681
00:29:37.240 --> 00:29:40.839
<v Speaker 4>API be really quick. And that's because these APIs, especially

682
00:29:40.839 --> 00:29:44.240
<v Speaker 4>a rest API, is generic. It's generic because it needs

683
00:29:44.240 --> 00:29:46.440
<v Speaker 4>to work for multiple different any application that wants to

684
00:29:46.440 --> 00:29:49.519
<v Speaker 4>consume that that API. The wonderful thing about rails, and

685
00:29:49.519 --> 00:29:52.240
<v Speaker 4>the wonderful thing about layer val is that every single

686
00:29:52.319 --> 00:29:55.880
<v Speaker 4>control or method you are going to get the data

687
00:29:55.920 --> 00:29:59.039
<v Speaker 4>exactly as you need it for that page. There's no

688
00:29:59.200 --> 00:30:03.200
<v Speaker 4>generalized A there. It's like, okay, I'm displaying the user's page.

689
00:30:03.240 --> 00:30:04.759
<v Speaker 4>I want to go to the database and I want

690
00:30:04.759 --> 00:30:07.519
<v Speaker 4>to get these ten users if it's paginated for example,

691
00:30:07.720 --> 00:30:09.440
<v Speaker 4>and I want to get their name, and I want

692
00:30:09.440 --> 00:30:11.039
<v Speaker 4>to get their ID, and I want to get their

693
00:30:11.039 --> 00:30:13.359
<v Speaker 4>email address, and maybe I want to egarload their company

694
00:30:13.599 --> 00:30:16.359
<v Speaker 4>company along with it. So what inertia And this isn't

695
00:30:16.359 --> 00:30:18.279
<v Speaker 4>really an inertia feature. This is really just this is

696
00:30:18.279 --> 00:30:20.519
<v Speaker 4>really just a rail. This is like a monolith features,

697
00:30:20.519 --> 00:30:22.920
<v Speaker 4>like when each end point is only responsible for getting

698
00:30:22.920 --> 00:30:24.680
<v Speaker 4>the data that it needs for the page that it's

699
00:30:24.720 --> 00:30:28.799
<v Speaker 4>going to display, you can highly highly optimize the data

700
00:30:28.839 --> 00:30:32.000
<v Speaker 4>retrieval for those endpoints for exactly what's needed in that application.

701
00:30:32.319 --> 00:30:34.000
<v Speaker 4>So that's one of the reasons why I really just

702
00:30:34.200 --> 00:30:37.440
<v Speaker 4>like monolith apps in general, because I feel like that

703
00:30:37.440 --> 00:30:38.559
<v Speaker 4>that approach.

704
00:30:38.279 --> 00:30:40.200
<v Speaker 3>Just leads to fast applications.

705
00:30:40.319 --> 00:30:42.119
<v Speaker 4>And I've talked you know, I mentioned earlier that I

706
00:30:42.599 --> 00:30:45.400
<v Speaker 4>love databases and I love writing learning how to you know,

707
00:30:45.519 --> 00:30:47.440
<v Speaker 4>kind of make the most of the database, create proper

708
00:30:47.480 --> 00:30:49.960
<v Speaker 4>indexes and return the minimal amount of data, and that

709
00:30:50.039 --> 00:30:52.079
<v Speaker 4>run the fastest career as possible. That's that's stuff that

710
00:30:52.079 --> 00:30:55.480
<v Speaker 4>I'm super interested in and focus on. So roundabout way

711
00:30:55.519 --> 00:30:57.920
<v Speaker 4>of answering your question, I like two hundred milliseconds or

712
00:30:57.960 --> 00:31:00.480
<v Speaker 4>less from a response time from the server, which would

713
00:31:00.480 --> 00:31:03.039
<v Speaker 4>be the inertia response. But then there's also this whole

714
00:31:03.039 --> 00:31:06.000
<v Speaker 4>client side performance side of things, So let me talk

715
00:31:06.039 --> 00:31:09.000
<v Speaker 4>briefly about that as well, because that is absolutely a

716
00:31:09.039 --> 00:31:12.119
<v Speaker 4>tradeoff you get when you build a client side application.

717
00:31:12.160 --> 00:31:13.920
<v Speaker 4>So one of the trade offs we've talked about already

718
00:31:14.079 --> 00:31:16.839
<v Speaker 4>is you the sdo tradeoff if SEO is important to you,

719
00:31:16.920 --> 00:31:18.839
<v Speaker 4>probably not going to make sense to build a fully

720
00:31:18.880 --> 00:31:21.240
<v Speaker 4>client side rendered application unless you have some sort of

721
00:31:21.240 --> 00:31:23.599
<v Speaker 4>service side rendering in place. And there's all kinds of

722
00:31:23.599 --> 00:31:26.039
<v Speaker 4>fancy tools nowadays even to do that with JavaScript stuff.

723
00:31:26.039 --> 00:31:28.359
<v Speaker 4>But you know what I'm saying, if SEO is important

724
00:31:28.359 --> 00:31:29.799
<v Speaker 4>to you, you're not going to want to have client side

725
00:31:29.799 --> 00:31:32.119
<v Speaker 4>rendering as your primary way. So the other trade off

726
00:31:32.319 --> 00:31:34.880
<v Speaker 4>is that you now need to send all that to

727
00:31:35.119 --> 00:31:38.279
<v Speaker 4>all your client side views. So all your page components,

728
00:31:38.319 --> 00:31:40.400
<v Speaker 4>all your view components, are your your React components or

729
00:31:40.400 --> 00:31:42.839
<v Speaker 4>your spell components, they all need to now be sent

730
00:31:43.079 --> 00:31:45.759
<v Speaker 4>over the wire as JavaScript bundles to the client.

731
00:31:45.880 --> 00:31:46.079
<v Speaker 2>Right.

732
00:31:46.200 --> 00:31:48.559
<v Speaker 4>So Inertia what it does, and this is kind of

733
00:31:48.680 --> 00:31:51.200
<v Speaker 4>like a really just I think a cool feature, is

734
00:31:51.440 --> 00:31:54.559
<v Speaker 4>it will automatically like it makes you can use because

735
00:31:54.599 --> 00:31:56.519
<v Speaker 4>it is just really a plain old regular view or

736
00:31:56.599 --> 00:31:59.359
<v Speaker 4>React app. It supports code splitting. So if you use

737
00:31:59.400 --> 00:32:01.759
<v Speaker 4>code splitting, what happens is you land on the very

738
00:32:01.759 --> 00:32:03.440
<v Speaker 4>first page. So maybe you know, going back to our

739
00:32:03.440 --> 00:32:05.359
<v Speaker 4>example from earlier, let's say you hit for the very

740
00:32:05.359 --> 00:32:08.079
<v Speaker 4>first page, the user index page. What it's gonna happen

741
00:32:08.079 --> 00:32:10.359
<v Speaker 4>in Inertia app is it's gonna go and get whatever,

742
00:32:10.720 --> 00:32:14.000
<v Speaker 4>only the minimal amount of JavaScript that's required to display

743
00:32:14.039 --> 00:32:16.240
<v Speaker 4>that page. So it's gonna get your typically kind of

744
00:32:16.279 --> 00:32:18.519
<v Speaker 4>like your core bundle, which is gonna have like view

745
00:32:18.640 --> 00:32:22.039
<v Speaker 4>or React and maybe some like core dependencies that are

746
00:32:22.160 --> 00:32:24.599
<v Speaker 4>used kind of by the you know, all pages on

747
00:32:24.640 --> 00:32:26.720
<v Speaker 4>the site. So it's gonna grab that core bundle, which

748
00:32:26.759 --> 00:32:29.839
<v Speaker 4>is small because it doesn't have all the pages through

749
00:32:29.839 --> 00:32:32.039
<v Speaker 4>your whole applications, just the core bundle, and then it's

750
00:32:32.039 --> 00:32:35.359
<v Speaker 4>gonna load whatever whatever components are required for that page.

751
00:32:35.359 --> 00:32:37.960
<v Speaker 4>So it could be the if it's the user index page,

752
00:32:37.960 --> 00:32:40.079
<v Speaker 4>it's gonna go off and get the user index JavaScript

753
00:32:40.079 --> 00:32:42.720
<v Speaker 4>bundle and download that, and then once it's downloaded, you

754
00:32:42.759 --> 00:32:44.519
<v Speaker 4>never have to download it again because it's cash right

755
00:32:44.559 --> 00:32:46.440
<v Speaker 4>and the browser knows to not go off and download

756
00:32:46.440 --> 00:32:46.799
<v Speaker 4>it again.

757
00:32:46.839 --> 00:32:47.400
<v Speaker 3>So what that.

758
00:32:47.359 --> 00:32:50.720
<v Speaker 4>Practically means is you hit an inertia endpoint. It's gonna

759
00:32:50.880 --> 00:32:53.119
<v Speaker 4>it's gonna only get the minimal amount of JavaScript that

760
00:32:53.160 --> 00:32:55.400
<v Speaker 4>you need to actually display that page, and it's gonna

761
00:32:55.400 --> 00:32:57.359
<v Speaker 4>get the minimal amount of data from the server because

762
00:32:57.359 --> 00:33:00.319
<v Speaker 4>that's the way a rails app works, and the page

763
00:33:00.359 --> 00:33:02.480
<v Speaker 4>can load like loads extremely quick, So I actually have

764
00:33:02.519 --> 00:33:03.920
<v Speaker 4>a demo app if you want to try it out,

765
00:33:04.200 --> 00:33:06.920
<v Speaker 4>if you call the demo apps called ping CRM, which

766
00:33:06.960 --> 00:33:09.720
<v Speaker 4>is available on the Inertia Gas website, and you can actually,

767
00:33:09.799 --> 00:33:12.160
<v Speaker 4>you know, click around this application and see exactly what

768
00:33:12.200 --> 00:33:13.160
<v Speaker 4>the performance is like.

769
00:33:13.279 --> 00:33:15.720
<v Speaker 3>And I think, like, so it's hosted on I host it.

770
00:33:15.759 --> 00:33:18.200
<v Speaker 4>On Heroku, and I do that intentionally because anytime you

771
00:33:18.279 --> 00:33:20.839
<v Speaker 4>host in Heroku, there's even a performance cost in saying

772
00:33:20.920 --> 00:33:23.759
<v Speaker 4>having a one off linot or Digital Ocean, you know, server,

773
00:33:23.880 --> 00:33:27.279
<v Speaker 4>because one for one, the database is the Postcrest database,

774
00:33:27.279 --> 00:33:29.279
<v Speaker 4>which is not hosted on the same site as the

775
00:33:29.319 --> 00:33:31.480
<v Speaker 4>actual web dinos, so there's always a performance cost that

776
00:33:31.519 --> 00:33:33.440
<v Speaker 4>comes with that, which often you know, of course makes

777
00:33:33.440 --> 00:33:35.839
<v Speaker 4>sense if you want to have multiple web dinos and whatnot.

778
00:33:35.920 --> 00:33:37.359
<v Speaker 4>So I've hosted it that way because I feel like

779
00:33:37.400 --> 00:33:39.880
<v Speaker 4>that's a good representation of a real life application. And

780
00:33:40.039 --> 00:33:42.559
<v Speaker 4>most responses from the server come back in about one

781
00:33:42.640 --> 00:33:45.359
<v Speaker 4>hundred milliseconds, and I think, you know, that's a pretty

782
00:33:45.400 --> 00:33:46.200
<v Speaker 4>awesome experience.

783
00:33:46.319 --> 00:33:48.799
<v Speaker 5>I've tried it. It is disgustingly quick.

784
00:33:50.079 --> 00:33:50.920
<v Speaker 3>That's what I want to hear.

785
00:33:51.200 --> 00:33:54.240
<v Speaker 5>For me in the UK comes back in well under

786
00:33:54.279 --> 00:33:56.920
<v Speaker 5>one hundred well under one hundred to the extent that

787
00:33:56.960 --> 00:33:59.720
<v Speaker 5>I'm quite suspicious that you're loading the next page the

788
00:34:00.079 --> 00:34:02.480
<v Speaker 5>ground that terming me first or doing some kind of

789
00:34:02.519 --> 00:34:04.200
<v Speaker 5>dirty trick like that isn't you know?

790
00:34:04.240 --> 00:34:08.199
<v Speaker 3>It's funny that you mentioned one hundred percent. Absolutely it is. Yeah, absolutely,

791
00:34:08.280 --> 00:34:09.320
<v Speaker 3>it is hitting the database.

792
00:34:09.519 --> 00:34:11.880
<v Speaker 4>And that's interesting you mentioned that because because it is

793
00:34:12.239 --> 00:34:16.280
<v Speaker 4>a JavaScript application, there is really some cool opportunities to

794
00:34:16.320 --> 00:34:18.519
<v Speaker 4>even do stuff like that. So if you hover over

795
00:34:18.559 --> 00:34:20.280
<v Speaker 4>a link for more than a certain period of time,

796
00:34:20.480 --> 00:34:22.559
<v Speaker 4>go off and eager load that data. And even if

797
00:34:22.559 --> 00:34:24.400
<v Speaker 4>you don't want to egerload the data, what we can

798
00:34:24.440 --> 00:34:27.280
<v Speaker 4>do is eiger load the next JavaScript page component that

799
00:34:27.280 --> 00:34:29.679
<v Speaker 4>that page, that link would require. So even if you

800
00:34:29.719 --> 00:34:32.599
<v Speaker 4>are using code splitting, we can be smart about eger

801
00:34:32.599 --> 00:34:35.320
<v Speaker 4>loading that next page component that you may want.

802
00:34:35.159 --> 00:34:37.039
<v Speaker 3>To click to. So yeah, there's that's a kind of

803
00:34:37.039 --> 00:34:37.599
<v Speaker 3>the neat thing.

804
00:34:37.639 --> 00:34:41.280
<v Speaker 4>Because it is ultimately a real view or ultimately a

805
00:34:41.320 --> 00:34:43.480
<v Speaker 4>real React app, you kind of get some of the

806
00:34:43.480 --> 00:34:45.360
<v Speaker 4>cool things that you can do with those pieces of

807
00:34:45.400 --> 00:34:48.400
<v Speaker 4>technology as well. I've been working on another feature that

808
00:34:48.519 --> 00:34:51.119
<v Speaker 4>even allows you to do kind of like placeholder pages.

809
00:34:51.199 --> 00:34:52.639
<v Speaker 4>So if you were to click on a if you're

810
00:34:52.679 --> 00:34:54.599
<v Speaker 4>on the user index page and you were to click

811
00:34:54.639 --> 00:34:57.400
<v Speaker 4>on the user like a show user page. I've got

812
00:34:57.440 --> 00:34:59.920
<v Speaker 4>a working prototype where it could show kind of like

813
00:35:00.119 --> 00:35:02.880
<v Speaker 4>a shell of the show user page while inertia is

814
00:35:02.880 --> 00:35:05.519
<v Speaker 4>still in the background grabbing that data just again using

815
00:35:05.519 --> 00:35:08.280
<v Speaker 4>a classic rails controller show endpoint.

816
00:35:07.840 --> 00:35:10.159
<v Speaker 3>And then swap it out when it has the data ready.

817
00:35:10.239 --> 00:35:10.960
<v Speaker 3>And these are like those.

818
00:35:11.000 --> 00:35:13.599
<v Speaker 4>It's not necessarily something so the inertia, So the Pinxi

819
00:35:13.679 --> 00:35:15.360
<v Speaker 4>r M demo doesn't do any of that, but it's

820
00:35:15.639 --> 00:35:17.639
<v Speaker 4>I just think it's neat that if you had an

821
00:35:17.639 --> 00:35:20.880
<v Speaker 4>application that you were that concerned about the user experience

822
00:35:20.880 --> 00:35:23.000
<v Speaker 4>and you just really wanted to show something right off

823
00:35:23.039 --> 00:35:25.199
<v Speaker 4>the bat when someone clicked a link to view a

824
00:35:25.239 --> 00:35:28.199
<v Speaker 4>new page, that inertia allows you to will allow you.

825
00:35:28.119 --> 00:35:29.599
<v Speaker 3>To do that. It technically doesn't allow you to do

826
00:35:29.599 --> 00:35:30.960
<v Speaker 3>that yet, but that's something I'm working on.

827
00:35:31.320 --> 00:35:35.280
<v Speaker 1>Yeah, I certainly like speed, but I certainly don't get

828
00:35:35.280 --> 00:35:37.840
<v Speaker 1>as excited necessarily as other people do about speed. But

829
00:35:37.880 --> 00:35:39.679
<v Speaker 1>I know that a lot of people do care about it.

830
00:35:39.760 --> 00:35:42.840
<v Speaker 1>I think the thing that's most interesting here is so

831
00:35:43.079 --> 00:35:45.480
<v Speaker 1>I know that it might be heresy, but I for

832
00:35:45.519 --> 00:35:48.119
<v Speaker 1>a long time have more or less said that to me.

833
00:35:48.400 --> 00:35:52.320
<v Speaker 1>The controller in NBC right, really is an API provider

834
00:35:52.400 --> 00:35:55.960
<v Speaker 1>and you're just consuming that API with your view and

835
00:35:55.960 --> 00:35:57.880
<v Speaker 1>that's sort of like the typical way that people use it.

836
00:35:57.960 --> 00:36:00.920
<v Speaker 1>And so I think that inertia like just kind of

837
00:36:01.199 --> 00:36:04.039
<v Speaker 1>leverages that. In my mind, you're just leveraging that and

838
00:36:04.079 --> 00:36:06.800
<v Speaker 1>making it really easy for people who are just used

839
00:36:06.840 --> 00:36:08.800
<v Speaker 1>to using views to just be like not have to

840
00:36:08.800 --> 00:36:11.719
<v Speaker 1>think about it. Yeah, it's an awesome evolution in my opinion.

841
00:36:11.840 --> 00:36:14.480
<v Speaker 4>Yeah, I love that comment that that comment that it's

842
00:36:14.519 --> 00:36:15.519
<v Speaker 4>just essentially an API.

843
00:36:15.679 --> 00:36:16.039
<v Speaker 3>It is.

844
00:36:16.519 --> 00:36:19.119
<v Speaker 4>The difference is with a rails or layer ofl app,

845
00:36:19.199 --> 00:36:22.119
<v Speaker 4>you've accepted that there is this type coupling between this

846
00:36:22.199 --> 00:36:24.039
<v Speaker 4>back end controller and the front end view.

847
00:36:24.079 --> 00:36:27.360
<v Speaker 3>That's just an accepsolutely, you know. And you know, some people.

848
00:36:27.320 --> 00:36:29.559
<v Speaker 4>Say, well, that coupling's bad because now I can't use

849
00:36:29.599 --> 00:36:31.719
<v Speaker 4>the sendpoint for other things, and I say, no, actually,

850
00:36:31.719 --> 00:36:34.280
<v Speaker 4>that coupling is awesome because one, it makes it really fast.

851
00:36:34.400 --> 00:36:37.639
<v Speaker 4>You can create these these applications really quickly, and you

852
00:36:37.679 --> 00:36:40.760
<v Speaker 4>can optimize them from a performance perspective because you're only

853
00:36:40.760 --> 00:36:42.880
<v Speaker 4>worrying about this one request. You're not worried about thirty

854
00:36:42.920 --> 00:36:44.360
<v Speaker 4>possible different permutations.

855
00:36:44.400 --> 00:36:46.119
<v Speaker 3>It's just one request. That you're concerned about.

856
00:36:46.239 --> 00:36:46.760
<v Speaker 2>Absolutely.

857
00:36:46.800 --> 00:36:49.159
<v Speaker 1>Really, the only benefit to thinking about it that way

858
00:36:49.559 --> 00:36:52.440
<v Speaker 1>is when you're suddenly ready to break the rules, right,

859
00:36:52.519 --> 00:36:53.519
<v Speaker 1>So yeah, awesome.

860
00:36:53.679 --> 00:36:56.159
<v Speaker 2>Anything else that we should know about.

861
00:36:56.079 --> 00:36:58.840
<v Speaker 1>Inertia that you you're just like, haven't talked about this,

862
00:36:59.119 --> 00:36:59.480
<v Speaker 1>you guys?

863
00:36:59.559 --> 00:37:00.599
<v Speaker 2>Yeah, thinking about this?

864
00:37:00.920 --> 00:37:01.159
<v Speaker 3>Yeah?

865
00:37:01.239 --> 00:37:04.199
<v Speaker 4>So yes, there's maybe a couple different things that I

866
00:37:04.239 --> 00:37:07.320
<v Speaker 4>think inertia does really well and stuff that I'm even

867
00:37:07.559 --> 00:37:11.519
<v Speaker 4>proving on is one is scroll management. So what happens

868
00:37:11.719 --> 00:37:14.280
<v Speaker 4>by default when you browse from one page to the next,

869
00:37:14.559 --> 00:37:17.840
<v Speaker 4>just using like standard normal, plain old website, and you

870
00:37:17.880 --> 00:37:19.519
<v Speaker 4>scroll down and you visit the next page, and then

871
00:37:19.519 --> 00:37:21.880
<v Speaker 4>you scroll down, you visit the next page, you know whatever,

872
00:37:21.960 --> 00:37:24.199
<v Speaker 4>and then you hit back in the browser. The browser

873
00:37:24.199 --> 00:37:26.079
<v Speaker 4>is smart enough to remember exactly where you were on

874
00:37:26.119 --> 00:37:28.920
<v Speaker 4>each one of those pages, and that helps maintain context, right,

875
00:37:29.199 --> 00:37:30.719
<v Speaker 4>which is a really nice thing.

876
00:37:30.800 --> 00:37:32.639
<v Speaker 3>Inertia allows you to do that.

877
00:37:32.559 --> 00:37:34.239
<v Speaker 4>Because that basically is for free out of the box,

878
00:37:34.280 --> 00:37:36.679
<v Speaker 4>if you just do a standard page. But where it

879
00:37:36.679 --> 00:37:39.760
<v Speaker 4>becomes tricky, and this is becoming more and more common,

880
00:37:40.000 --> 00:37:43.159
<v Speaker 4>is people have like essentially what are considered like scroll

881
00:37:43.320 --> 00:37:46.599
<v Speaker 4>areas within your UI. So one really common use case

882
00:37:46.599 --> 00:37:48.239
<v Speaker 4>for this is imagine you have kind of like your

883
00:37:48.239 --> 00:37:51.199
<v Speaker 4>standard layout. Left hand side is your navigation and the

884
00:37:51.280 --> 00:37:53.159
<v Speaker 4>right hand side is your content, and maybe along the

885
00:37:53.159 --> 00:37:56.039
<v Speaker 4>top you have a bar right when you scroll the content,

886
00:37:56.320 --> 00:37:58.119
<v Speaker 4>you maybe want to scroll the content but not have

887
00:37:58.199 --> 00:37:59.960
<v Speaker 4>your left hand nav change.

888
00:37:59.760 --> 00:38:01.000
<v Speaker 3>Or even the other way around.

889
00:38:01.119 --> 00:38:03.239
<v Speaker 4>Maybe when you scroll the content you want your left

890
00:38:03.280 --> 00:38:06.119
<v Speaker 4>hand ab to follow with you or whatever. Right, So

891
00:38:06.159 --> 00:38:09.440
<v Speaker 4>you do this using scroll areas, you know, overflow auto

892
00:38:09.559 --> 00:38:12.159
<v Speaker 4>and stuff with CSS to kind of allow that sort

893
00:38:12.159 --> 00:38:14.840
<v Speaker 4>of functionality. And yeah, so that's a very common thing

894
00:38:14.880 --> 00:38:17.599
<v Speaker 4>with like modern applications especially I would say, like, yeah,

895
00:38:17.760 --> 00:38:19.719
<v Speaker 4>more application style websites.

896
00:38:19.800 --> 00:38:21.840
<v Speaker 3>So that kind of like goes out the window. What

897
00:38:22.199 --> 00:38:24.119
<v Speaker 3>goes out the window when you're using scroll areas like

898
00:38:24.159 --> 00:38:26.679
<v Speaker 3>that is scroll position management. So if you were to

899
00:38:26.719 --> 00:38:28.199
<v Speaker 3>do that and you would go to visit the next

900
00:38:28.239 --> 00:38:30.480
<v Speaker 3>page and you go back, the browser has no idea

901
00:38:30.480 --> 00:38:33.079
<v Speaker 3>that you were scrolled in this container down three hundred pixels.

902
00:38:33.119 --> 00:38:35.840
<v Speaker 4>It's like that, don't care, not my problem. All it

903
00:38:35.840 --> 00:38:39.800
<v Speaker 4>cares about is restoring the body scroll position. So inertia,

904
00:38:40.119 --> 00:38:44.400
<v Speaker 4>we're we have support for basically automatically automatic scroll restoration

905
00:38:44.679 --> 00:38:47.000
<v Speaker 4>of containers as well, and you can and you don't

906
00:38:47.000 --> 00:38:48.719
<v Speaker 4>have to. That doesn't happen to all containers. You can

907
00:38:48.760 --> 00:38:51.960
<v Speaker 4>actually define on a per container basis, like inertia track

908
00:38:52.039 --> 00:38:54.960
<v Speaker 4>the scroll position for this, and that's like a really

909
00:38:55.000 --> 00:38:58.480
<v Speaker 4>really nice feature that you basically Yeah, so that's one thing.

910
00:38:58.679 --> 00:39:01.280
<v Speaker 4>Another thing that in or she does really well is

911
00:39:01.599 --> 00:39:03.880
<v Speaker 4>asset version ing. So this is a problem that a

912
00:39:03.920 --> 00:39:07.239
<v Speaker 4>lot of people run into with modern client side rendered

913
00:39:07.280 --> 00:39:10.840
<v Speaker 4>applications is imagine you have a user, right and they

914
00:39:10.880 --> 00:39:13.239
<v Speaker 4>go to your application, they go to your website, and

915
00:39:13.320 --> 00:39:15.800
<v Speaker 4>they click through a few different pages and while they click,

916
00:39:15.840 --> 00:39:17.159
<v Speaker 4>you know, maybe they're on the user's page, and then

917
00:39:17.239 --> 00:39:19.400
<v Speaker 4>when the user show page and right at that moment,

918
00:39:19.599 --> 00:39:21.199
<v Speaker 4>you had to fix a bug or do something in

919
00:39:21.239 --> 00:39:23.360
<v Speaker 4>that template and you redeployed it, so you would deployed

920
00:39:23.360 --> 00:39:26.199
<v Speaker 4>those assets to the server. The problem is right now

921
00:39:26.400 --> 00:39:29.400
<v Speaker 4>is with a typical client side rendered application is if

922
00:39:29.519 --> 00:39:33.079
<v Speaker 4>you now go back to visit that user index page,

923
00:39:33.119 --> 00:39:36.239
<v Speaker 4>because it's not doing a full page reload, there's no

924
00:39:36.480 --> 00:39:39.239
<v Speaker 4>way for the browser to know that maybe that user

925
00:39:39.280 --> 00:39:41.800
<v Speaker 4>index page template changed, so they're going to see the

926
00:39:41.840 --> 00:39:44.480
<v Speaker 4>old page template, which might be fine, or it might

927
00:39:44.519 --> 00:39:47.079
<v Speaker 4>not because you might be expecting data back from the

928
00:39:47.079 --> 00:39:49.239
<v Speaker 4>server that's now out of sync with your template. You

929
00:39:49.239 --> 00:39:51.360
<v Speaker 4>remember that type coupling that we're talking about between these

930
00:39:51.360 --> 00:39:53.199
<v Speaker 4>two things, and would be no different if you're working

931
00:39:53.199 --> 00:39:54.880
<v Speaker 4>with an API, if there's an expectation for the data

932
00:39:54.920 --> 00:39:56.920
<v Speaker 4>to be there and it's not, and that old template

933
00:39:56.960 --> 00:40:00.639
<v Speaker 4>could now generate an error the Appleic application craft simply

934
00:40:00.639 --> 00:40:01.679
<v Speaker 4>because you deployed.

935
00:40:01.400 --> 00:40:02.519
<v Speaker 3>An update to the application.

936
00:40:02.639 --> 00:40:05.119
<v Speaker 4>And this is something that rails and layerbelt developers never

937
00:40:05.119 --> 00:40:06.599
<v Speaker 4>have to worry about if you use some service side

938
00:40:06.639 --> 00:40:08.840
<v Speaker 4>render views because when you go to the new page,

939
00:40:08.840 --> 00:40:10.840
<v Speaker 4>it's doing a full page reload. You're getting a full page,

940
00:40:10.920 --> 00:40:13.679
<v Speaker 4>all the new assets, everything else. So what inertia does

941
00:40:13.760 --> 00:40:15.760
<v Speaker 4>is we have like and there's like there are ways

942
00:40:15.800 --> 00:40:19.000
<v Speaker 4>to solve this with client side like Classic viewer, React apps,

943
00:40:19.119 --> 00:40:22.639
<v Speaker 4>but it's complicated and they use people use service workers

944
00:40:22.679 --> 00:40:24.239
<v Speaker 4>and I'm not going to get into details of how

945
00:40:24.280 --> 00:40:27.400
<v Speaker 4>that gets solved, but it's kind of complicated, whereas with inertia.

946
00:40:27.599 --> 00:40:30.360
<v Speaker 4>What's really cool about inertia is that the front end

947
00:40:30.400 --> 00:40:32.360
<v Speaker 4>and the back end are coupled together. So that's like,

948
00:40:32.440 --> 00:40:34.039
<v Speaker 4>you know, this coupling that we keep talking about, like,

949
00:40:34.079 --> 00:40:36.360
<v Speaker 4>that's the real benefit because we can now let the

950
00:40:36.440 --> 00:40:39.320
<v Speaker 4>server and the client side frameworks, and essentially what it

951
00:40:39.360 --> 00:40:41.639
<v Speaker 4>is is it's a service side inertia adapter working with

952
00:40:41.639 --> 00:40:44.400
<v Speaker 4>a client side inertia adaptor, and they're working together to

953
00:40:44.480 --> 00:40:47.079
<v Speaker 4>make sure that things are working properly. So what happens

954
00:40:47.159 --> 00:40:49.960
<v Speaker 4>is every single time you make it an inertia visit,

955
00:40:50.159 --> 00:40:52.639
<v Speaker 4>we keep track of you know what, Let me back

956
00:40:52.719 --> 00:40:54.360
<v Speaker 4>up before I even go there. It might be zero

957
00:40:54.360 --> 00:40:57.920
<v Speaker 4>to explaining it this way. When you define your inertia

958
00:40:57.920 --> 00:41:00.840
<v Speaker 4>set up in Rails, you have the option on every

959
00:41:00.840 --> 00:41:03.480
<v Speaker 4>single page, like, you know, kind of like does it

960
00:41:03.880 --> 00:41:05.840
<v Speaker 4>does Rails have this concept of like some sort of

961
00:41:05.840 --> 00:41:08.960
<v Speaker 4>like base like application service provider where you do kind

962
00:41:08.960 --> 00:41:10.880
<v Speaker 4>of like default work. Could it like happen in like

963
00:41:10.880 --> 00:41:12.559
<v Speaker 4>a middleware or just like kind of like something that

964
00:41:12.599 --> 00:41:14.239
<v Speaker 4>gets run on every single page request?

965
00:41:14.320 --> 00:41:16.639
<v Speaker 3>Is that right?

966
00:41:16.679 --> 00:41:20.599
<v Speaker 4>So imagine I forget exactly how the gens who put

967
00:41:20.599 --> 00:41:23.199
<v Speaker 4>together the inertiative Rails adapter did this, but just imagine

968
00:41:23.199 --> 00:41:27.559
<v Speaker 4>that somewhere in your inertia configuration in your Rails application,

969
00:41:27.920 --> 00:41:32.360
<v Speaker 4>you basically say this is the version of my assets.

970
00:41:32.440 --> 00:41:37.400
<v Speaker 4>Your assets being your JavaScript basically could also be yours. Yeah,

971
00:41:37.440 --> 00:41:40.400
<v Speaker 4>so you you have some sort of version number that

972
00:41:40.480 --> 00:41:43.119
<v Speaker 4>indicates the current version of your assets.

973
00:41:43.239 --> 00:41:44.599
<v Speaker 3>Like the way I do it in layer.

974
00:41:44.519 --> 00:41:46.400
<v Speaker 4>Bel is I literally just do I just get an

975
00:41:46.400 --> 00:41:49.639
<v Speaker 4>empty five of the assets and and if it changes,

976
00:41:49.679 --> 00:41:50.159
<v Speaker 4>it changes.

977
00:41:50.239 --> 00:41:51.079
<v Speaker 3>So what you do is you.

978
00:41:51.039 --> 00:41:53.920
<v Speaker 4>Say inertia version and you pass it the current version,

979
00:41:53.920 --> 00:41:56.480
<v Speaker 4>and that happens on every single request. So what happens

980
00:41:56.480 --> 00:41:59.079
<v Speaker 4>then is that version gets past to the client side.

981
00:41:59.079 --> 00:41:59.480
<v Speaker 3>So that's one.

982
00:41:59.519 --> 00:42:01.519
<v Speaker 4>And so I've talked about this page object that that

983
00:42:01.559 --> 00:42:04.719
<v Speaker 4>gets passed around, which includes the component name and the props. Well,

984
00:42:04.760 --> 00:42:08.760
<v Speaker 4>another another property in that that page object is the

985
00:42:09.360 --> 00:42:13.039
<v Speaker 4>asset version. So the client side Inertia always knows what

986
00:42:13.119 --> 00:42:16.280
<v Speaker 4>the current version of your assets are. So then when

987
00:42:16.360 --> 00:42:18.039
<v Speaker 4>you now click from one page to the next, so

988
00:42:18.079 --> 00:42:19.679
<v Speaker 4>you're on the user show page and you want to

989
00:42:19.679 --> 00:42:21.559
<v Speaker 4>go to the user index page. Well, you you click

990
00:42:21.599 --> 00:42:24.199
<v Speaker 4>the user index page, Inertia goes off and it makes

991
00:42:24.199 --> 00:42:26.840
<v Speaker 4>the XHR request, the inertial inertial request to your server

992
00:42:26.920 --> 00:42:28.480
<v Speaker 4>to get the index page and the data for the

993
00:42:28.519 --> 00:42:32.159
<v Speaker 4>index page. Inertia automatically passes what it believes is a

994
00:42:32.199 --> 00:42:37.519
<v Speaker 4>current version two rails, then rails the rails. Inertia adapter says, okay,

995
00:42:37.719 --> 00:42:39.400
<v Speaker 4>I got this request coming in, it's saying that the

996
00:42:39.400 --> 00:42:41.760
<v Speaker 4>current asset version is one, two, three, but we can

997
00:42:41.840 --> 00:42:43.760
<v Speaker 4>see now that it's a new deploye has happened and

998
00:42:43.800 --> 00:42:46.280
<v Speaker 4>the new asset version that is actually four or five six.

999
00:42:46.519 --> 00:42:49.400
<v Speaker 4>And what Inertia does is it actually stops the request

1000
00:42:49.559 --> 00:42:53.039
<v Speaker 4>at that point and it then gives returns a four

1001
00:42:53.039 --> 00:42:55.480
<v Speaker 4>oh I believe it think it's a yeah it returns.

1002
00:42:55.559 --> 00:42:59.519
<v Speaker 4>So imagine this XHR request gets an immediately immediate four

1003
00:42:59.599 --> 00:43:03.199
<v Speaker 4>oh nine conflict response back from Rails, and then what

1004
00:43:03.360 --> 00:43:06.960
<v Speaker 4>happens is Inertia gets that four h nine conflict response

1005
00:43:07.000 --> 00:43:09.000
<v Speaker 4>back and it says, oh, assets are at a date.

1006
00:43:09.079 --> 00:43:11.840
<v Speaker 4>So what Inertia then does is that automatically does not

1007
00:43:12.000 --> 00:43:14.519
<v Speaker 4>an XHR request to that page. So going from the

1008
00:43:14.599 --> 00:43:17.159
<v Speaker 4>user show page to the user index page, it's gonna

1009
00:43:17.159 --> 00:43:18.760
<v Speaker 4>say the assets are at a date because the server

1010
00:43:18.920 --> 00:43:21.599
<v Speaker 4>just told me that, and it just cuts that XHR

1011
00:43:21.599 --> 00:43:24.199
<v Speaker 4>INNERSI request short and it now does an automatic full

1012
00:43:24.280 --> 00:43:27.840
<v Speaker 4>page visit to the user index page. And then because

1013
00:43:27.880 --> 00:43:29.800
<v Speaker 4>you're doing a full page visit, you have an off

1014
00:43:30.000 --> 00:43:32.639
<v Speaker 4>the opportunity to use cash bussing to reload your assets

1015
00:43:32.679 --> 00:43:33.920
<v Speaker 4>and you're right back in business.

1016
00:43:34.119 --> 00:43:35.159
<v Speaker 3>So for the end user.

1017
00:43:35.679 --> 00:43:37.719
<v Speaker 4>It does mean that they'll have to redownload those assets,

1018
00:43:37.760 --> 00:43:39.480
<v Speaker 4>of course, but that's what you want because otherwise you

1019
00:43:39.519 --> 00:43:42.679
<v Speaker 4>want to deploy them so they can continue browsing your

1020
00:43:42.679 --> 00:43:46.039
<v Speaker 4>Inertia app like a classic SPA until the assets are

1021
00:43:46.039 --> 00:43:47.840
<v Speaker 4>aut a date, and then they're gonna be forced without

1022
00:43:47.840 --> 00:43:50.280
<v Speaker 4>their they won't even notice really that it's happening other

1023
00:43:50.320 --> 00:43:52.679
<v Speaker 4>than that request will reload the whole page and it'll

1024
00:43:52.679 --> 00:43:54.679
<v Speaker 4>look like a full page visit and you're gonna be

1025
00:43:54.719 --> 00:43:56.960
<v Speaker 4>right back in business on the page. And we do

1026
00:43:57.039 --> 00:44:00.159
<v Speaker 4>some smart things about the way we make that request,

1027
00:44:00.079 --> 00:44:03.840
<v Speaker 4>that four nine response, and like we automatically reflash data,

1028
00:44:03.880 --> 00:44:05.679
<v Speaker 4>so if there was any if you had any flash

1029
00:44:05.760 --> 00:44:08.360
<v Speaker 4>data that was going to be used, it automatically reflashes that.

1030
00:44:08.480 --> 00:44:10.559
<v Speaker 4>So even though you're doing a full page reload, you're

1031
00:44:10.599 --> 00:44:13.159
<v Speaker 4>going to still get that flash data come available. So

1032
00:44:13.199 --> 00:44:16.920
<v Speaker 4>that's a really, really, really cool feature of Inertia that is,

1033
00:44:16.960 --> 00:44:18.920
<v Speaker 4>like I think it would be harder to do with

1034
00:44:19.000 --> 00:44:21.320
<v Speaker 4>a classic SBA, but because of the way that the

1035
00:44:21.599 --> 00:44:24.400
<v Speaker 4>clients side and service side adapters work together, it basically

1036
00:44:24.400 --> 00:44:27.519
<v Speaker 4>takes all the work out of asset refreshing and asset

1037
00:44:27.679 --> 00:44:30.519
<v Speaker 4>versioning like you Literally, all you have to do is

1038
00:44:30.679 --> 00:44:33.000
<v Speaker 4>tell service side, tell Inertia what the current version of

1039
00:44:33.000 --> 00:44:34.719
<v Speaker 4>the assets are, and you're done and it handles it.

1040
00:44:34.920 --> 00:44:37.760
<v Speaker 4>Which is also really nice from a development perspective because

1041
00:44:37.800 --> 00:44:40.360
<v Speaker 4>if you're developing, you're constantly changing your files, and inertia

1042
00:44:40.400 --> 00:44:41.760
<v Speaker 4>you don't have to like constantly hit refresh.

1043
00:44:41.760 --> 00:44:43.280
<v Speaker 3>You can just click a link and it'll just update

1044
00:44:43.280 --> 00:44:44.239
<v Speaker 3>automatically for you.

1045
00:44:44.320 --> 00:44:46.760
<v Speaker 1>No, I agree, that is super cool. I mean to

1046
00:44:46.880 --> 00:44:50.159
<v Speaker 1>b Frank, I've been used to Rails handling asset management

1047
00:44:50.199 --> 00:44:53.000
<v Speaker 1>to me for so long that it is frustrating every

1048
00:44:53.039 --> 00:44:55.000
<v Speaker 1>time that I have to deal with it because I

1049
00:44:55.199 --> 00:44:57.719
<v Speaker 1>just at this point in my development career, I just

1050
00:44:57.760 --> 00:44:59.239
<v Speaker 1>think that I shouldn't.

1051
00:44:58.840 --> 00:45:02.280
<v Speaker 2>Have to deal with it because I know exactly I

1052
00:45:02.480 --> 00:45:03.320
<v Speaker 2>literally cannot.

1053
00:45:03.440 --> 00:45:05.880
<v Speaker 1>I mean, shoot, we didn't even have that problem in

1054
00:45:05.960 --> 00:45:08.480
<v Speaker 1>Rails one because we weren't serving assets on the project

1055
00:45:08.519 --> 00:45:09.320
<v Speaker 1>that I was working on.

1056
00:45:09.400 --> 00:45:13.280
<v Speaker 2>So yeah, yeah, it was so long ago.

1057
00:45:13.440 --> 00:45:16.559
<v Speaker 4>Yeah, and there's there's some really the last thing, you so,

1058
00:45:16.599 --> 00:45:19.199
<v Speaker 4>the last thing I want to just mention about inertia

1059
00:45:19.199 --> 00:45:21.719
<v Speaker 4>that we kind of didn't talk about yet, and is

1060
00:45:21.960 --> 00:45:25.960
<v Speaker 4>the fact that inertia visits are not limited to get requests,

1061
00:45:26.159 --> 00:45:29.880
<v Speaker 4>so you can make inertia visits for post requests, put requests,

1062
00:45:29.880 --> 00:45:32.960
<v Speaker 4>patch requests, and delete as well. And this is really

1063
00:45:33.000 --> 00:45:35.519
<v Speaker 4>cool and it's kind of a complex thing to explain,

1064
00:45:35.800 --> 00:45:38.280
<v Speaker 4>maybe on a podcast, but what it does is it

1065
00:45:38.320 --> 00:45:43.800
<v Speaker 4>makes forms a lot more like classic Rails form submissions,

1066
00:45:43.840 --> 00:45:46.760
<v Speaker 4>except it's all done ya xhr, and it's like it's

1067
00:45:46.840 --> 00:45:49.760
<v Speaker 4>like the most wonderfully simple thing ever. So I'll explain

1068
00:45:49.840 --> 00:45:52.159
<v Speaker 4>kind of how it works real briefly in layer Bell

1069
00:45:52.199 --> 00:45:54.400
<v Speaker 4>and then you, guys, hopefully you can kind of hopefully it'll

1070
00:45:54.519 --> 00:45:56.119
<v Speaker 4>make sense in Rails as well. So what you do

1071
00:45:56.239 --> 00:45:58.719
<v Speaker 4>is if you have a form, say a view form

1072
00:45:59.119 --> 00:46:01.599
<v Speaker 4>with all the React of inputs right, and then you

1073
00:46:01.760 --> 00:46:05.320
<v Speaker 4>then a user presses submit to submit that data to

1074
00:46:05.400 --> 00:46:08.039
<v Speaker 4>the form, you know, down to the server. In that situation,

1075
00:46:08.199 --> 00:46:11.639
<v Speaker 4>you would still submit that using inertia. So what you

1076
00:46:11.639 --> 00:46:14.840
<v Speaker 4>would have is you'd have a submit interceptor where you

1077
00:46:14.920 --> 00:46:17.639
<v Speaker 4>prevent the default browser full page submission and then you

1078
00:46:17.639 --> 00:46:19.840
<v Speaker 4>would say, so imagine we were on the create user

1079
00:46:19.880 --> 00:46:22.119
<v Speaker 4>page right and you hit create user, hit the button,

1080
00:46:22.239 --> 00:46:24.920
<v Speaker 4>the form submits, We catch it, and then in your jabscript,

1081
00:46:24.920 --> 00:46:27.559
<v Speaker 4>in your view page component or in your React page

1082
00:46:27.559 --> 00:46:30.920
<v Speaker 4>component whatever. You would then say inertia dot post if

1083
00:46:30.920 --> 00:46:33.280
<v Speaker 4>we're creating a user yet post and you would say,

1084
00:46:33.320 --> 00:46:36.039
<v Speaker 4>we're going to post that to slash users and passing

1085
00:46:36.079 --> 00:46:38.599
<v Speaker 4>the data from that component. So it's just like literally

1086
00:46:38.599 --> 00:46:41.159
<v Speaker 4>a one liner. But you don't then do a bunch

1087
00:46:41.199 --> 00:46:42.880
<v Speaker 4>of work after that. You don't say, well, give me

1088
00:46:42.920 --> 00:46:45.400
<v Speaker 4>the response back and let me inspect the response to

1089
00:46:45.400 --> 00:46:47.639
<v Speaker 4>see if there is errors, and if there's errors, I'm

1090
00:46:47.639 --> 00:46:50.360
<v Speaker 4>going to go and manually update the view display those errors.

1091
00:46:50.440 --> 00:46:51.880
<v Speaker 4>And if there's no errors, well then we're going to

1092
00:46:51.920 --> 00:46:53.719
<v Speaker 4>redirect to somewhere else. You don't do any of that.

1093
00:46:54.000 --> 00:46:56.440
<v Speaker 4>All you say is inertia post to the user's page.

1094
00:46:56.519 --> 00:46:59.159
<v Speaker 4>Then what happens is there's two paths. There's a happy

1095
00:46:59.199 --> 00:47:01.719
<v Speaker 4>path the user created and there's the unhappy path. There

1096
00:47:01.800 --> 00:47:05.280
<v Speaker 4>was a validation error service sidevalidation error, So do happy path. First, user,

1097
00:47:05.760 --> 00:47:08.800
<v Speaker 4>you hit the user create page or the user store endpoint,

1098
00:47:08.880 --> 00:47:12.119
<v Speaker 4>so that controller endpoint to store the user validation all passes,

1099
00:47:12.440 --> 00:47:15.760
<v Speaker 4>it creates the user, and then server side in that

1100
00:47:15.840 --> 00:47:19.440
<v Speaker 4>exit that XHR inertial request, you then just do a

1101
00:47:19.480 --> 00:47:21.440
<v Speaker 4>classic redirect to wherever.

1102
00:47:21.159 --> 00:47:22.400
<v Speaker 3>You would have normally gone.

1103
00:47:22.519 --> 00:47:24.280
<v Speaker 4>You you would if it was just like a regular

1104
00:47:24.480 --> 00:47:27.159
<v Speaker 4>standard full page application. You would just do a redirect

1105
00:47:27.280 --> 00:47:29.280
<v Speaker 4>wherever you want that user to go after they created

1106
00:47:29.280 --> 00:47:31.440
<v Speaker 4>the user, so maybe you send them to the user

1107
00:47:31.480 --> 00:47:33.480
<v Speaker 4>show page at that point, right, So what you would do,

1108
00:47:33.519 --> 00:47:36.360
<v Speaker 4>you would do the same thing with inertia. You'd literally

1109
00:47:36.400 --> 00:47:39.159
<v Speaker 4>just say, however, in rails or in layer bel you

1110
00:47:39.280 --> 00:47:42.920
<v Speaker 4>return a redirect to that new user's page. So then

1111
00:47:43.280 --> 00:47:46.800
<v Speaker 4>that redirects going to happen in within that XHR request,

1112
00:47:46.880 --> 00:47:48.239
<v Speaker 4>and what's going to do is it's going to go

1113
00:47:48.360 --> 00:47:50.920
<v Speaker 4>now to that show user page, and that show user

1114
00:47:50.920 --> 00:47:52.840
<v Speaker 4>page is gonna load. Keep in mind, this is all

1115
00:47:52.840 --> 00:47:56.320
<v Speaker 4>happening within the initial inertia, the initial inertia post request. Okay,

1116
00:47:56.320 --> 00:47:59.400
<v Speaker 4>so that that redirects happening, you're now landing on the

1117
00:47:59.519 --> 00:48:02.320
<v Speaker 4>user show page and it's just given you a response,

1118
00:48:02.360 --> 00:48:05.400
<v Speaker 4>but it knows that it was an inertial request because

1119
00:48:05.400 --> 00:48:09.280
<v Speaker 4>that ex inertia header actually gets forwarded on when that

1120
00:48:09.400 --> 00:48:12.280
<v Speaker 4>redirect happens. And then on the user show page, it

1121
00:48:12.400 --> 00:48:14.679
<v Speaker 4>just returns because it knows it's an inertia request. It

1122
00:48:14.800 --> 00:48:18.960
<v Speaker 4>just returns the Jason payload back, which includes the page

1123
00:48:19.000 --> 00:48:21.239
<v Speaker 4>component name and the page data, which would be the

1124
00:48:21.320 --> 00:48:24.840
<v Speaker 4>show user page and the user data for that page,

1125
00:48:24.880 --> 00:48:28.960
<v Speaker 4>so that all then comes back to your create user page.

1126
00:48:29.159 --> 00:48:32.599
<v Speaker 4>You know that form and Inertia automatically now dynamically swaps

1127
00:48:32.599 --> 00:48:35.039
<v Speaker 4>out the create user page for the show user page

1128
00:48:35.119 --> 00:48:37.159
<v Speaker 4>and passes the component. So you don't need to do

1129
00:48:37.199 --> 00:48:40.000
<v Speaker 4>any work to like redirect the user. It just automatically

1130
00:48:40.039 --> 00:48:43.280
<v Speaker 4>happens because you're redirecting server side. So that's the happy path.

1131
00:48:43.360 --> 00:48:46.400
<v Speaker 4>The unhappy path is validation fails, and it essentially works

1132
00:48:46.440 --> 00:48:50.079
<v Speaker 4>the same way. The user submits the form via post

1133
00:48:50.159 --> 00:48:53.199
<v Speaker 4>inernship post that goes to the store controller endpoint, the

1134
00:48:53.280 --> 00:48:55.519
<v Speaker 4>validation fails, and the way at least this is how

1135
00:48:55.519 --> 00:48:58.480
<v Speaker 4>it works in layer about when the validation fails, it

1136
00:48:58.639 --> 00:49:02.719
<v Speaker 4>automatically redirect you back to the page that you're on. So,

1137
00:49:03.079 --> 00:49:05.159
<v Speaker 4>Lara Bell, if I go to create a user and

1138
00:49:05.320 --> 00:49:09.079
<v Speaker 4>maybe it's missing the first name, Larva automatically does a

1139
00:49:09.199 --> 00:49:11.599
<v Speaker 4>redirect back to the user page, but then includes some

1140
00:49:11.840 --> 00:49:14.480
<v Speaker 4>flash data saying well, there was an error and here's

1141
00:49:14.480 --> 00:49:17.360
<v Speaker 4>the error, which if you're using server side classic server

1142
00:49:17.480 --> 00:49:20.639
<v Speaker 4>side templates, you would then take that air and repopulate

1143
00:49:20.639 --> 00:49:24.079
<v Speaker 4>the page with your old values and display the errors. However,

1144
00:49:24.199 --> 00:49:27.159
<v Speaker 4>with inertia, you get an Inertia response back. So what

1145
00:49:27.199 --> 00:49:29.519
<v Speaker 4>it'll do is so redback, redirect back to the create

1146
00:49:29.639 --> 00:49:33.760
<v Speaker 4>user page, and it will pass along all the data

1147
00:49:33.760 --> 00:49:35.480
<v Speaker 4>that you would have for that page anyway. So the

1148
00:49:35.519 --> 00:49:37.519
<v Speaker 4>create user page maybe there is no data because you're

1149
00:49:37.519 --> 00:49:38.880
<v Speaker 4>creating a user, but it would say it's a create

1150
00:49:38.960 --> 00:49:40.679
<v Speaker 4>user page and then it would have some data, which

1151
00:49:40.719 --> 00:49:43.840
<v Speaker 4>is the errors that just happened. Those errors now get

1152
00:49:43.880 --> 00:49:47.039
<v Speaker 4>passed back to inertia, and Inertia sees that we're on

1153
00:49:47.039 --> 00:49:48.519
<v Speaker 4>the same page still, so we went to the create

1154
00:49:48.559 --> 00:49:51.039
<v Speaker 4>post page. It failed and redirected us back to the

1155
00:49:51.039 --> 00:49:53.199
<v Speaker 4>create user page. But now we have this bucket of

1156
00:49:53.280 --> 00:49:56.480
<v Speaker 4>errors and what but in those errors have been provided

1157
00:49:56.679 --> 00:49:59.960
<v Speaker 4>from Inertia as props, so the page component doesn't change,

1158
00:50:00.000 --> 00:50:02.079
<v Speaker 4>so there's no swapping of the page component. So it's

1159
00:50:02.159 --> 00:50:04.079
<v Speaker 4>you're gonna still be on the create user page, but

1160
00:50:04.119 --> 00:50:06.639
<v Speaker 4>what it now has is the errors, and all you

1161
00:50:06.679 --> 00:50:09.079
<v Speaker 4>do and those errors come through is props, so they

1162
00:50:09.199 --> 00:50:11.360
<v Speaker 4>will you don't have to do any work to update

1163
00:50:11.400 --> 00:50:14.000
<v Speaker 4>as long as you're taking as long as your page component,

1164
00:50:14.079 --> 00:50:17.599
<v Speaker 4>your client side page components designed that anytime your page

1165
00:50:17.599 --> 00:50:20.920
<v Speaker 4>create user page component is rendering any errors that come

1166
00:50:21.000 --> 00:50:23.480
<v Speaker 4>through as a prop, it's just gonna because it's all reactive,

1167
00:50:23.800 --> 00:50:26.440
<v Speaker 4>it's just going to automatically display those errors. So, like

1168
00:50:26.480 --> 00:50:28.559
<v Speaker 4>I said, this is a tough thing to explain over

1169
00:50:28.719 --> 00:50:31.519
<v Speaker 4>over a podcast, but the point is because it's all reactive,

1170
00:50:31.519 --> 00:50:33.760
<v Speaker 4>because that's the way view and reactings felt work. When

1171
00:50:33.800 --> 00:50:36.239
<v Speaker 4>that response comes back and has the errors, the props

1172
00:50:36.239 --> 00:50:39.440
<v Speaker 4>come in and they automatically update, so you literally it

1173
00:50:39.599 --> 00:50:42.920
<v Speaker 4>just ends up making for these really really simple forms

1174
00:50:42.960 --> 00:50:44.559
<v Speaker 4>because you don't have to do a whole bunch of

1175
00:50:44.559 --> 00:50:47.480
<v Speaker 4>wrangling to like figure out what the response was and

1176
00:50:47.559 --> 00:50:48.119
<v Speaker 4>update it.

1177
00:50:48.119 --> 00:50:50.360
<v Speaker 3>It just kind of all happens magically.

1178
00:50:50.559 --> 00:50:53.159
<v Speaker 4>And because you're not doing a full page load, you're

1179
00:50:53.159 --> 00:50:55.599
<v Speaker 4>not having to repopulate all that data that you put in,

1180
00:50:55.639 --> 00:50:57.440
<v Speaker 4>so that whatever data they put into the form, it's

1181
00:50:57.440 --> 00:50:59.559
<v Speaker 4>not like you're having to repopulate that because it's all

1182
00:50:59.599 --> 00:51:01.840
<v Speaker 4>they're still because that page component wasn't.

1183
00:51:01.719 --> 00:51:04.079
<v Speaker 3>Destroyed, it was, it's still persistent.

1184
00:51:04.159 --> 00:51:06.639
<v Speaker 2>There. Does that make sense, Oh, it totally makes sense.

1185
00:51:06.760 --> 00:51:08.880
<v Speaker 1>I think it's I think it's very close to what

1186
00:51:08.880 --> 00:51:11.079
<v Speaker 1>what we would have in Rails, right because.

1187
00:51:10.880 --> 00:51:13.000
<v Speaker 4>Rails doesn't magic with that stuff, right, Like it kind

1188
00:51:13.000 --> 00:51:15.400
<v Speaker 4>of like adds some stuff to your form, some JavaScript

1189
00:51:15.400 --> 00:51:15.960
<v Speaker 4>stuff already.

1190
00:51:16.039 --> 00:51:18.880
<v Speaker 1>Right, well, I mean if you have rails, not not

1191
00:51:19.000 --> 00:51:21.119
<v Speaker 1>really so the way that it would Okay, So if

1192
00:51:21.159 --> 00:51:23.599
<v Speaker 1>I just had vanilla Rails, right, I would submit my

1193
00:51:23.679 --> 00:51:26.239
<v Speaker 1>form right, happy path would redirect me to like a

1194
00:51:26.239 --> 00:51:28.960
<v Speaker 1>show page or an index page maybe the failed path,

1195
00:51:29.199 --> 00:51:31.960
<v Speaker 1>you know, I would come back and what would probably

1196
00:51:32.039 --> 00:51:37.039
<v Speaker 1>happen is validation. Things that weren't there before would now

1197
00:51:37.079 --> 00:51:39.840
<v Speaker 1>suddenly be there because Rails is going to render that template,

1198
00:51:40.079 --> 00:51:43.760
<v Speaker 1>and Rails is going to conditionally now render some new things.

1199
00:51:43.920 --> 00:51:45.639
<v Speaker 2>Kind of depends on maybe what gems you have.

1200
00:51:45.639 --> 00:51:48.559
<v Speaker 1>Installed other things like that, but that's that's usually going

1201
00:51:48.639 --> 00:51:49.199
<v Speaker 1>to be what it is.

1202
00:51:49.320 --> 00:51:51.679
<v Speaker 2>Yeah, but yeah, it makes it really close. It's really close. Yeah.

1203
00:51:51.920 --> 00:51:52.519
<v Speaker 3>Well that's good.

1204
00:51:52.719 --> 00:51:54.400
<v Speaker 2>Yeah, so awesome.

1205
00:51:54.559 --> 00:51:57.159
<v Speaker 1>I mean yeah, I think I think the basic gist

1206
00:51:57.320 --> 00:52:00.800
<v Speaker 1>here that I'm understanding is that inertia is going to

1207
00:52:00.840 --> 00:52:03.400
<v Speaker 1>make it pretty easy for me as a rail developer

1208
00:52:03.519 --> 00:52:06.440
<v Speaker 1>to say, you know what, I have this maybe legacy

1209
00:52:06.440 --> 00:52:08.920
<v Speaker 1>application or something like. I'm seeing a lot of use

1210
00:52:08.960 --> 00:52:12.719
<v Speaker 1>cases with already existing applications where I then want to

1211
00:52:12.800 --> 00:52:15.679
<v Speaker 1>sprinkle some view or some react or something on a

1212
00:52:15.719 --> 00:52:18.000
<v Speaker 1>page or two and have it be a little bit

1213
00:52:18.000 --> 00:52:19.920
<v Speaker 1>of a spa there for a little while. That's kind

1214
00:52:19.960 --> 00:52:22.440
<v Speaker 1>of what I'm seeing the major use case with rails

1215
00:52:22.480 --> 00:52:24.480
<v Speaker 1>B there. I mean, I guess you could design this

1216
00:52:24.559 --> 00:52:26.679
<v Speaker 1>with this in mine too. I don't see anything wrong

1217
00:52:26.679 --> 00:52:26.880
<v Speaker 1>with that.

1218
00:52:26.960 --> 00:52:29.360
<v Speaker 4>Yeah, that's what most people are doing. People are upgrading

1219
00:52:29.400 --> 00:52:32.480
<v Speaker 4>like existing apps to use inertia. But like most people

1220
00:52:32.559 --> 00:52:35.079
<v Speaker 4>are using it there. It's kind of like greenfield projects

1221
00:52:35.079 --> 00:52:36.599
<v Speaker 4>at this point. But that's also because it's a pretty

1222
00:52:36.599 --> 00:52:37.079
<v Speaker 4>new project.

1223
00:52:37.159 --> 00:52:40.239
<v Speaker 1>Yeah, excitement things like that also, always playing to this stuff. Yeah,

1224
00:52:40.320 --> 00:52:43.880
<v Speaker 1>any any other questions from you, Luke before we kind

1225
00:52:43.880 --> 00:52:44.840
<v Speaker 1>of roll into picks here?

1226
00:52:44.960 --> 00:52:47.440
<v Speaker 5>Do we want to tool amount gate, hubs, bumster shit?

1227
00:52:47.599 --> 00:52:48.239
<v Speaker 2>Sure? Why not?

1228
00:52:48.480 --> 00:52:48.559
<v Speaker 5>So?

1229
00:52:49.039 --> 00:52:51.239
<v Speaker 1>In the notes that you sent us, John Nathan, you

1230
00:52:51.400 --> 00:52:53.960
<v Speaker 1>said that you had started to get hub sponsorship campaign.

1231
00:52:53.960 --> 00:52:55.159
<v Speaker 1>You want to talk a little bit about that before

1232
00:52:55.159 --> 00:52:55.639
<v Speaker 1>we get wrong?

1233
00:52:55.719 --> 00:52:56.519
<v Speaker 3>Yeah, sure, that's cool.

1234
00:52:56.760 --> 00:52:58.320
<v Speaker 4>I was just trying to think of interesting things that

1235
00:52:58.519 --> 00:53:00.159
<v Speaker 4>might be fun talking about. That's kind of a of

1236
00:53:00.159 --> 00:53:02.079
<v Speaker 4>a newer thing, is so this. You know, I've been

1237
00:53:02.079 --> 00:53:04.880
<v Speaker 4>working I've been doing open source for a long long time,

1238
00:53:05.320 --> 00:53:08.039
<v Speaker 4>and it's always a challenge working an open source you know,

1239
00:53:08.800 --> 00:53:11.119
<v Speaker 4>justifying spending time, and if you're running a business and

1240
00:53:11.280 --> 00:53:13.960
<v Speaker 4>if you have a family and life's busy, it's difficult

1241
00:53:14.079 --> 00:53:17.360
<v Speaker 4>to justify committing large, large chunks of time to open

1242
00:53:17.360 --> 00:53:19.440
<v Speaker 4>source just strictly from a business or.

1243
00:53:19.559 --> 00:53:21.639
<v Speaker 3>You know, personal time management perspective.

1244
00:53:21.800 --> 00:53:24.519
<v Speaker 4>And so the what I did with Inertia when gethub

1245
00:53:24.559 --> 00:53:26.639
<v Speaker 4>sponsorships came out, I said, you know what, this is

1246
00:53:26.639 --> 00:53:29.199
<v Speaker 4>a project that I think has legs for the long term,

1247
00:53:29.239 --> 00:53:31.320
<v Speaker 4>and this is something I want to work on. But

1248
00:53:31.559 --> 00:53:34.519
<v Speaker 4>I've seen how much work tailwind CSS took and what

1249
00:53:34.559 --> 00:53:37.880
<v Speaker 4>it takes to make a really really successful project, open

1250
00:53:37.920 --> 00:53:39.719
<v Speaker 4>source project, and I thought, you know, I want to

1251
00:53:39.760 --> 00:53:42.480
<v Speaker 4>try to monetize it in some way to help me

1252
00:53:42.679 --> 00:53:44.679
<v Speaker 4>justify spending a bit of time on this thing. So

1253
00:53:44.719 --> 00:53:47.440
<v Speaker 4>I put out the GitHub sponsorships and it was really

1254
00:53:47.920 --> 00:53:49.880
<v Speaker 4>I totally didn't expect much of a response, but I

1255
00:53:49.920 --> 00:53:53.079
<v Speaker 4>got over fifty over fifty sponsors, which is, you know,

1256
00:53:53.199 --> 00:53:55.360
<v Speaker 4>not an enormous amount of money, but it's you know,

1257
00:53:55.440 --> 00:53:57.840
<v Speaker 4>upwards about you know, one thousand dollars a month.

1258
00:53:57.599 --> 00:53:58.239
<v Speaker 3>Which was double.

1259
00:53:58.320 --> 00:53:59.920
<v Speaker 4>So it was like two thousand dollars a month for

1260
00:54:00.159 --> 00:54:02.079
<v Speaker 4>getthub for a while, which was awesome.

1261
00:54:02.199 --> 00:54:03.840
<v Speaker 3>I think that's just I didn't know what to think

1262
00:54:03.880 --> 00:54:05.480
<v Speaker 3>of the GitHub sponsorship stuff at first.

1263
00:54:05.519 --> 00:54:08.440
<v Speaker 4>I'm like, are people actually gonna help contribute out of

1264
00:54:08.440 --> 00:54:12.239
<v Speaker 4>their own pockets toward open source? And obviously Gethub believe

1265
00:54:12.280 --> 00:54:14.400
<v Speaker 4>that that would happen, and and now you know, it's

1266
00:54:14.480 --> 00:54:16.599
<v Speaker 4>it's crazy what some people are able to do with

1267
00:54:16.599 --> 00:54:19.119
<v Speaker 4>their GitHub sponsors. And it's there's some people working on

1268
00:54:19.159 --> 00:54:22.199
<v Speaker 4>open source full time making making a lot more money

1269
00:54:22.199 --> 00:54:25.320
<v Speaker 4>than that on their GitHub sponsors, which I think, honestly

1270
00:54:25.599 --> 00:54:28.079
<v Speaker 4>is a really really cool thing for open source. It

1271
00:54:28.199 --> 00:54:31.000
<v Speaker 4>kind of just it's it's recognizing the amount of time

1272
00:54:31.039 --> 00:54:32.960
<v Speaker 4>and effort it takes for for people to work on

1273
00:54:33.000 --> 00:54:35.760
<v Speaker 4>open source and build quality software that you know, it's

1274
00:54:35.800 --> 00:54:37.719
<v Speaker 4>crazy at the amount of at least for me, I've

1275
00:54:37.719 --> 00:54:40.440
<v Speaker 4>I've always worked in the layer vel, PHP space, like

1276
00:54:40.480 --> 00:54:43.079
<v Speaker 4>it's it's all free software, right and this is what

1277
00:54:43.119 --> 00:54:45.920
<v Speaker 4>we're using to run our businesses and everything else. And

1278
00:54:46.000 --> 00:54:47.639
<v Speaker 4>to me, it only makes sense that some of that

1279
00:54:47.719 --> 00:54:50.119
<v Speaker 4>money goes back, if nothing else, to just help people

1280
00:54:50.320 --> 00:54:53.400
<v Speaker 4>spend business hours on open source and not have to

1281
00:54:53.440 --> 00:54:56.320
<v Speaker 4>feel like they're they're losing money or you know, running

1282
00:54:56.360 --> 00:54:58.360
<v Speaker 4>the issues with their boss because they feel bad working

1283
00:54:58.360 --> 00:54:59.599
<v Speaker 4>on a during work hours or whatever.

1284
00:55:00.000 --> 00:55:01.719
<v Speaker 1>You know, I think it's pretty cool too. I I

1285
00:55:01.760 --> 00:55:03.679
<v Speaker 1>do not think it's the end all be all, because

1286
00:55:03.719 --> 00:55:06.480
<v Speaker 1>I think there's a limit right to if programmers are

1287
00:55:06.519 --> 00:55:09.400
<v Speaker 1>the only people contributing to open source, like there's we're

1288
00:55:09.440 --> 00:55:11.239
<v Speaker 1>just not going to have enough money in open source.

1289
00:55:11.280 --> 00:55:13.119
<v Speaker 1>But I do think it's a definitely piece.

1290
00:55:12.880 --> 00:55:15.159
<v Speaker 2>Of the puzzle. I'm pretty so pleased with it myself.

1291
00:55:15.280 --> 00:55:17.320
<v Speaker 3>Yeah, yeah, I touly agree with that sentiment.

1292
00:55:17.440 --> 00:55:19.559
<v Speaker 2>Yeah, awesome. Well, I'm glad that you are able to

1293
00:55:19.559 --> 00:55:21.320
<v Speaker 2>get some people to support you. So let's I guess

1294
00:55:21.360 --> 00:55:23.519
<v Speaker 2>before we move into picks, if people.

1295
00:55:23.280 --> 00:55:25.360
<v Speaker 1>Want to like get a hold of you, follow you

1296
00:55:25.480 --> 00:55:27.280
<v Speaker 1>things like that, how do you recommend they do that?

1297
00:55:27.440 --> 00:55:29.440
<v Speaker 4>Yeah, So I'm active on Twitter. That's kind of like

1298
00:55:29.440 --> 00:55:32.039
<v Speaker 4>the go to place. Just my last name renik ari

1299
00:55:32.079 --> 00:55:35.599
<v Speaker 4>e I n I n K on Twitter, and I

1300
00:55:35.679 --> 00:55:38.760
<v Speaker 4>talk about you know, all kinds of inertia and database

1301
00:55:38.800 --> 00:55:41.880
<v Speaker 4>and layer bell stuff there. So you're interested follow me there,

1302
00:55:42.079 --> 00:55:45.920
<v Speaker 4>and then my website reanik so same same handle, Renick

1303
00:55:45.960 --> 00:55:48.039
<v Speaker 4>ari I n I n K dot ca A. I

1304
00:55:48.119 --> 00:55:51.159
<v Speaker 4>blog on there, and yeah, and then obviously inertia if

1305
00:55:51.159 --> 00:55:54.000
<v Speaker 4>you if you google inertia JS you'll find inertiajs dot

1306
00:55:54.039 --> 00:55:55.920
<v Speaker 4>com if you want to learn more about that project.

1307
00:55:56.079 --> 00:55:56.480
<v Speaker 2>Awesome.

1308
00:55:56.559 --> 00:55:58.800
<v Speaker 1>Well, we'll make sure that those links are in the

1309
00:55:58.800 --> 00:56:01.119
<v Speaker 1>show notes too. So sweet, let's go and move on

1310
00:56:01.199 --> 00:56:03.800
<v Speaker 1>into picks. Luke, do you have any picks for us

1311
00:56:03.840 --> 00:56:04.239
<v Speaker 1>this week?

1312
00:56:04.480 --> 00:56:07.039
<v Speaker 5>My word, do I have a pick for you? This week?

1313
00:56:07.199 --> 00:56:12.440
<v Speaker 5>We were recently unlucky enough to lose our server developer

1314
00:56:12.679 --> 00:56:16.000
<v Speaker 5>who has been building our Kubernetes stack for us, and

1315
00:56:16.079 --> 00:56:19.880
<v Speaker 5>this means that I've been spending the whole week doing Kubernetes,

1316
00:56:20.000 --> 00:56:23.880
<v Speaker 5>non stop, non stop Kubernetes this week. I have had

1317
00:56:24.039 --> 00:56:28.920
<v Speaker 5>used it before, back in twenty eighteen, but the Kubernetes

1318
00:56:29.000 --> 00:56:31.000
<v Speaker 5>is in a bit of a state of flux at

1319
00:56:31.039 --> 00:56:34.599
<v Speaker 5>the moment, so coming back to it, especially if you're

1320
00:56:34.679 --> 00:56:38.000
<v Speaker 5>kind of running on Google Kubernetes engine or something's been

1321
00:56:38.039 --> 00:56:40.320
<v Speaker 5>a lot of changes. So my pick for this week

1322
00:56:40.599 --> 00:56:46.039
<v Speaker 5>is a book on Kubernetes. It's by another Englishman, the

1323
00:56:46.159 --> 00:56:50.639
<v Speaker 5>English it Mathia coming in here, and it's called imaginatively enough,

1324
00:56:50.719 --> 00:56:55.079
<v Speaker 5>the Kubernettes Book. It was updated in February twenty twenty

1325
00:56:55.280 --> 00:56:58.039
<v Speaker 5>and it's been very helpful getting up the speed with

1326
00:56:58.280 --> 00:56:59.239
<v Speaker 5>the Kubernetes.

1327
00:57:00.000 --> 00:57:01.880
<v Speaker 2>Any other picks for us? Is that you're Is that

1328
00:57:01.960 --> 00:57:02.840
<v Speaker 2>it for us? That's it.

1329
00:57:03.039 --> 00:57:05.800
<v Speaker 5>I'm not going to pick Kubernettes itself. Make of that

1330
00:57:05.960 --> 00:57:06.440
<v Speaker 5>what you will.

1331
00:57:08.400 --> 00:57:08.840
<v Speaker 2>That's fair.

1332
00:57:08.920 --> 00:57:11.519
<v Speaker 1>I'd have to push chaplaine if if you did, I

1333
00:57:11.559 --> 00:57:13.400
<v Speaker 1>feel like anything to make it easier.

1334
00:57:13.559 --> 00:57:15.639
<v Speaker 5>Do you know what we got? We've got time for

1335
00:57:15.639 --> 00:57:18.360
<v Speaker 5>a quick rant. Here we go. Cubernettes. Right, you're learning

1336
00:57:18.360 --> 00:57:20.880
<v Speaker 5>a Cubernettes, you think. Right, I've got my book, I've

1337
00:57:20.920 --> 00:57:23.760
<v Speaker 5>got my my my Docker desktop. I'm going to go

1338
00:57:23.800 --> 00:57:26.639
<v Speaker 5>into settings and tick tick the box. I've got a

1339
00:57:26.679 --> 00:57:29.079
<v Speaker 5>requirement for Windows, so doing all the windows. And I

1340
00:57:29.440 --> 00:57:31.920
<v Speaker 5>say to I say to docer desktop, make me a

1341
00:57:32.000 --> 00:57:33.159
<v Speaker 5>Kubernettes cluster.

1342
00:57:33.559 --> 00:57:33.800
<v Speaker 2>Yes.

1343
00:57:33.920 --> 00:57:36.320
<v Speaker 5>Would you like to guess how much RAM this uses

1344
00:57:36.519 --> 00:57:39.400
<v Speaker 5>on my desktop machine? It's to take a wild guess

1345
00:57:39.440 --> 00:57:41.920
<v Speaker 5>how much this ticking this little box costs me?

1346
00:57:42.119 --> 00:57:42.480
<v Speaker 2>All of it?

1347
00:57:42.719 --> 00:57:48.559
<v Speaker 5>It's free gigabytes of RAM. And I haven't I haven't

1348
00:57:48.639 --> 00:57:51.840
<v Speaker 5>made any pods yet. I haven't. I haven't run my app.

1349
00:57:52.199 --> 00:57:54.639
<v Speaker 5>It's just sitting there. It's eating free. It's the first

1350
00:57:54.679 --> 00:57:58.280
<v Speaker 5>time this machine's cracked ten gig there's two sticks of

1351
00:57:58.360 --> 00:58:01.360
<v Speaker 5>raminist scene and this is the first time the second

1352
00:58:01.360 --> 00:58:02.280
<v Speaker 5>ones had to wake up.

1353
00:58:02.480 --> 00:58:03.599
<v Speaker 2>Yeah, that makes sense.

1354
00:58:03.639 --> 00:58:06.840
<v Speaker 1>The typical Kubernetes closter right cluster is you have a

1355
00:58:06.880 --> 00:58:10.159
<v Speaker 1>box that's just running Kubernetes right. All the other stuff

1356
00:58:10.199 --> 00:58:13.239
<v Speaker 1>comes later right after that box. I wonder if if

1357
00:58:13.280 --> 00:58:15.719
<v Speaker 1>your little ticked box right there is just spinning up

1358
00:58:15.719 --> 00:58:17.119
<v Speaker 1>the Kubernetes sort.

1359
00:58:16.960 --> 00:58:22.800
<v Speaker 5>Of yeah, ground stuff. Yeah, I found a box. You

1360
00:58:22.800 --> 00:58:25.440
<v Speaker 5>can see what it's doing. But I mean the plus side,

1361
00:58:25.559 --> 00:58:29.079
<v Speaker 5>keep it positive. The the the interface, the a p

1362
00:58:29.320 --> 00:58:33.400
<v Speaker 5>I is quite nice, not perfect, but there's some there's

1363
00:58:33.400 --> 00:58:36.559
<v Speaker 5>some things to like. The declaratives all good, but that's

1364
00:58:36.800 --> 00:58:40.199
<v Speaker 5>that's been around for a while. The the the language

1365
00:58:40.400 --> 00:58:43.039
<v Speaker 5>of it is nice and clean, so there's there's some

1366
00:58:43.119 --> 00:58:43.639
<v Speaker 5>good signs.

1367
00:58:43.800 --> 00:58:47.000
<v Speaker 4>I'm a little confused though, I thought all rails developers

1368
00:58:47.079 --> 00:58:47.719
<v Speaker 4>used Roku.

1369
00:58:47.880 --> 00:58:50.000
<v Speaker 3>So why are you even on Kubernetes.

1370
00:58:52.280 --> 00:58:54.119
<v Speaker 2>I know, I know that there's lots of people that

1371
00:58:54.199 --> 00:58:55.960
<v Speaker 2>don't doing around. I haven't.

1372
00:58:56.280 --> 00:58:59.559
<v Speaker 1>I've always been I've always been very devaps like personally

1373
00:58:59.679 --> 00:59:02.119
<v Speaker 1>and and things like that, and so like, I don't

1374
00:59:02.159 --> 00:59:04.639
<v Speaker 1>because I don't get a lot of value at it personally.

1375
00:59:04.679 --> 00:59:06.920
<v Speaker 1>But if you don't, if you're not really into that,

1376
00:59:06.960 --> 00:59:08.159
<v Speaker 1>I can totally see that just a.

1377
00:59:08.119 --> 00:59:10.000
<v Speaker 4>Little joke because I know, I know that that's kind

1378
00:59:10.000 --> 00:59:11.840
<v Speaker 4>of like a big part of Roku's background, right, A

1379
00:59:11.840 --> 00:59:13.760
<v Speaker 4>lot of I think.

1380
00:59:13.599 --> 00:59:16.079
<v Speaker 1>So, yeah, they came from our community. So yeah, it's

1381
00:59:16.559 --> 00:59:19.280
<v Speaker 1>least that's my understanding. Yeah, yeah, no, they're not bad.

1382
00:59:19.679 --> 00:59:22.280
<v Speaker 1>Just I'm not using though. Okay, I guess guess it's

1383
00:59:22.280 --> 00:59:24.760
<v Speaker 1>on me now. So the first thing that I'm picking

1384
00:59:24.800 --> 00:59:28.920
<v Speaker 1>today is we grew tomato plants, like we do every year,

1385
00:59:29.079 --> 00:59:32.119
<v Speaker 1>So yesterday, our tomato plants have been producing for like

1386
00:59:32.199 --> 00:59:35.360
<v Speaker 1>a bottom month, and the average amount that I'm bringing

1387
00:59:35.400 --> 00:59:38.119
<v Speaker 1>in is a bowl fowl. It's like about, you know,

1388
00:59:38.239 --> 00:59:41.039
<v Speaker 1>ten or twelve inches big and like six inches deep.

1389
00:59:41.199 --> 00:59:43.440
<v Speaker 1>Like we have like I don't know, like six or

1390
00:59:43.480 --> 00:59:46.880
<v Speaker 1>seven tomato plants and they go nuts. And it all

1391
00:59:46.960 --> 00:59:50.960
<v Speaker 1>is because we basically watched some YouTube videos on like

1392
00:59:51.199 --> 00:59:53.800
<v Speaker 1>how to like prune them and not like kill them

1393
00:59:53.840 --> 00:59:56.159
<v Speaker 1>and all these things, and so I'll paste them. I'll

1394
00:59:56.159 --> 00:59:58.559
<v Speaker 1>paste them in here. So if you're like totally, there's

1395
00:59:58.559 --> 01:00:01.079
<v Speaker 1>probably more stuff out there, probably somebody that knows how

1396
01:00:01.079 --> 01:00:03.480
<v Speaker 1>to take care of other kinds of plants, but I'm

1397
01:00:03.519 --> 01:00:07.320
<v Speaker 1>definitely like pushing the watch some YouTube videos. If you're

1398
01:00:07.400 --> 01:00:09.440
<v Speaker 1>if you're doing like some home gardening things, you know,

1399
01:00:09.559 --> 01:00:11.880
<v Speaker 1>especially if you're like growing stuff, because it's like COVID

1400
01:00:11.880 --> 01:00:13.400
<v Speaker 1>and everybody seems to be into.

1401
01:00:13.159 --> 01:00:13.679
<v Speaker 2>That this year.

1402
01:00:13.760 --> 01:00:15.920
<v Speaker 1>Maybe it's a little late for you because maybe you're

1403
01:00:15.920 --> 01:00:18.719
<v Speaker 1>growing seasons past, but definitely for if you keep doing

1404
01:00:18.760 --> 01:00:22.519
<v Speaker 1>it next year. So gardening videos awesome. The other thing

1405
01:00:22.920 --> 01:00:25.920
<v Speaker 1>that I was that I wanted to plug here so

1406
01:00:26.239 --> 01:00:29.039
<v Speaker 1>earlier in the session, Luke was like, Hey, I don't

1407
01:00:29.039 --> 01:00:31.239
<v Speaker 1>want to have to go to my logs too for

1408
01:00:31.599 --> 01:00:32.480
<v Speaker 1>queries and stuff.

1409
01:00:32.519 --> 01:00:34.559
<v Speaker 2>Well I did some looking during Well.

1410
01:00:34.480 --> 01:00:36.639
<v Speaker 5>I'll tell you why. I could reveal why now because

1411
01:00:36.679 --> 01:00:39.400
<v Speaker 5>but blasted apps and kubernettes and you can't get at

1412
01:00:39.440 --> 01:00:39.679
<v Speaker 5>the thing.

1413
01:00:39.880 --> 01:00:43.079
<v Speaker 1>Okay, maybe what I should give you is a link

1414
01:00:43.119 --> 01:00:46.280
<v Speaker 1>to tutorial on how to read logs and kubernetes, because

1415
01:00:46.320 --> 01:00:48.639
<v Speaker 1>that that I think is your actual problem. Then all right,

1416
01:00:48.679 --> 01:00:51.639
<v Speaker 1>But I actually I couldn't find a gem that did that.

1417
01:00:51.719 --> 01:00:54.199
<v Speaker 1>But I did find some pretty sweet gems that give

1418
01:00:54.239 --> 01:00:58.840
<v Speaker 1>you all sorts of extra query debugging tracing to the

1419
01:00:58.880 --> 01:01:02.280
<v Speaker 1>exact spot in your code explaining, So I'll just like

1420
01:01:02.400 --> 01:01:03.920
<v Speaker 1>those because they were cool anyway.

1421
01:01:04.000 --> 01:01:06.360
<v Speaker 2>So yep, those are my picks. Jonathan, did you have

1422
01:01:06.400 --> 01:01:07.119
<v Speaker 2>anything for us.

1423
01:01:07.400 --> 01:01:09.000
<v Speaker 4>Yeah, I didn't have anything at the beginning, but it

1424
01:01:09.039 --> 01:01:11.239
<v Speaker 4>kind of as you guys were talking, I've come up

1425
01:01:11.280 --> 01:01:13.880
<v Speaker 4>with three. One of them is, as I've mentioned earlier,

1426
01:01:14.039 --> 01:01:17.039
<v Speaker 4>project that I was involved with is called Tailwind CSS,

1427
01:01:17.199 --> 01:01:19.639
<v Speaker 4>and this is a kind of a unique approach to

1428
01:01:19.679 --> 01:01:23.360
<v Speaker 4>building and a unique approach to CSS and building applications

1429
01:01:23.480 --> 01:01:26.199
<v Speaker 4>that I would highly recommend to your audience to check out.

1430
01:01:26.480 --> 01:01:29.920
<v Speaker 4>It's become really really popular and it's honestly changed the

1431
01:01:29.960 --> 01:01:33.159
<v Speaker 4>way that I handled CSS. I pretty much don'trite CSS

1432
01:01:33.199 --> 01:01:36.400
<v Speaker 4>anymore because I'm using Tailwind, which is If that's confusing

1433
01:01:36.440 --> 01:01:38.480
<v Speaker 4>to you, then it's you should definitely check it out.

1434
01:01:38.519 --> 01:01:40.760
<v Speaker 4>And I will warn you if you've come from like

1435
01:01:40.840 --> 01:01:43.800
<v Speaker 4>a SAS or a less background or just even just

1436
01:01:43.840 --> 01:01:46.280
<v Speaker 4>plain old CSS and you look at this approach, you

1437
01:01:46.320 --> 01:01:49.400
<v Speaker 4>will probably be disgusted at first, but it is really

1438
01:01:49.480 --> 01:01:51.719
<v Speaker 4>really great. Give it a chance, and I pretty much

1439
01:01:51.719 --> 01:01:55.599
<v Speaker 4>guarantee you you'll be making webuis faster than you were before.

1440
01:01:55.800 --> 01:01:59.119
<v Speaker 4>And the maintenance is wonderful moving forward because it's just

1441
01:01:59.119 --> 01:02:01.239
<v Speaker 4>a lot easier to manage because it's all in HTML

1442
01:02:01.280 --> 01:02:02.320
<v Speaker 4>and not in CSS.

1443
01:02:02.360 --> 01:02:05.679
<v Speaker 3>So pick number one, tail in CSS. Pick number two is.

1444
01:02:06.519 --> 01:02:08.880
<v Speaker 4>I mentioned earlier that I put out a database course.

1445
01:02:08.920 --> 01:02:13.519
<v Speaker 4>Now I should mention that this course was primarily primarily

1446
01:02:13.599 --> 01:02:15.239
<v Speaker 4>designed for layveel developers.

1447
01:02:15.280 --> 01:02:16.679
<v Speaker 3>Well totally designed.

1448
01:02:16.320 --> 01:02:19.039
<v Speaker 4>For layravel developed developers, but there is a lot of

1449
01:02:19.079 --> 01:02:23.079
<v Speaker 4>crossover between larravels or m which is called Eloquent and

1450
01:02:23.360 --> 01:02:24.679
<v Speaker 4>active record in rails.

1451
01:02:24.760 --> 01:02:26.239
<v Speaker 3>So there's some interesting techniques.

1452
01:02:26.280 --> 01:02:29.400
<v Speaker 4>So if you are a layerbel developer listening to this,

1453
01:02:29.719 --> 01:02:31.679
<v Speaker 4>or just even a rails developer who wants to learn

1454
01:02:31.679 --> 01:02:34.800
<v Speaker 4>some techniques about databases and how to make your databases

1455
01:02:34.920 --> 01:02:38.920
<v Speaker 4>your database queries faster, check out my course eloquentdas course

1456
01:02:39.119 --> 01:02:42.199
<v Speaker 4>dot renik dot CA, which I'm assuming we'll end up

1457
01:02:42.199 --> 01:02:44.920
<v Speaker 4>in the notes. So yeah, So that's my second pick,

1458
01:02:45.119 --> 01:02:48.880
<v Speaker 4>and my third one is less software related. But I

1459
01:02:48.960 --> 01:02:51.840
<v Speaker 4>live on a farm and this week I so a

1460
01:02:51.880 --> 01:02:53.440
<v Speaker 4>little bit of a background. I live on a farm,

1461
01:02:53.519 --> 01:02:56.079
<v Speaker 4>so I wireless at Internet, which basically means that I

1462
01:02:56.119 --> 01:02:59.000
<v Speaker 4>have an antenna on my property that points to another

1463
01:02:59.039 --> 01:03:03.360
<v Speaker 4>antenna about two kilometers away from this Internet service provider.

1464
01:03:03.480 --> 01:03:06.199
<v Speaker 4>And this year, the tree line between us and the

1465
01:03:06.199 --> 01:03:08.280
<v Speaker 4>tower that we point to is like really growing in.

1466
01:03:08.360 --> 01:03:10.199
<v Speaker 4>The trees are really grown in, the leaves are really

1467
01:03:10.239 --> 01:03:12.960
<v Speaker 4>grown in and our internet's getting more and more unstable.

1468
01:03:13.039 --> 01:03:15.320
<v Speaker 4>So I've been pricing out some new hardware because it

1469
01:03:15.320 --> 01:03:17.400
<v Speaker 4>turns out that if I move my antenna about one

1470
01:03:17.519 --> 01:03:19.840
<v Speaker 4>hundred meters south of where my house is right now,

1471
01:03:19.840 --> 01:03:22.119
<v Speaker 4>which is out in basically the middle of my field

1472
01:03:22.119 --> 01:03:24.320
<v Speaker 4>of a small, little fifty acre property, so we have

1473
01:03:24.559 --> 01:03:26.280
<v Speaker 4>a bit of land, so I have the flexibility to.

1474
01:03:26.199 --> 01:03:26.840
<v Speaker 3>Move the tower.

1475
01:03:27.079 --> 01:03:29.159
<v Speaker 4>I get perfect line of vision to this tower. But

1476
01:03:29.199 --> 01:03:30.760
<v Speaker 4>the problem is I have to then get it from

1477
01:03:30.800 --> 01:03:33.320
<v Speaker 4>there to my house and my barn as well. So

1478
01:03:33.360 --> 01:03:36.159
<v Speaker 4>I've been playing around and been researching a bunch of

1479
01:03:36.239 --> 01:03:39.840
<v Speaker 4>ubiquity products, and if you are in the similar sort

1480
01:03:39.840 --> 01:03:43.599
<v Speaker 4>of position as me, I can't recommend this stuff enough.

1481
01:03:43.639 --> 01:03:46.159
<v Speaker 4>It's so cool. I've been playing around with a product

1482
01:03:46.199 --> 01:03:48.719
<v Speaker 4>called the Nanobeam, which are these like they're really like

1483
01:03:48.760 --> 01:03:51.719
<v Speaker 4>they're small little things or maybe like they're circular, maybe

1484
01:03:51.800 --> 01:03:56.039
<v Speaker 4>six or seven inches wide, and they're rated for fifteen

1485
01:03:56.079 --> 01:03:58.400
<v Speaker 4>I think fifteen to twenty kilometers, Like I only need

1486
01:03:58.400 --> 01:04:00.480
<v Speaker 4>it for like three hundred meters or something, and it

1487
01:04:00.559 --> 01:04:03.559
<v Speaker 4>just makes it really really easy to create these wireless

1488
01:04:03.559 --> 01:04:06.840
<v Speaker 4>connections between like long range wireless connections between different places

1489
01:04:06.840 --> 01:04:09.119
<v Speaker 4>of my property. So whatever, I'm just kind of nerding

1490
01:04:09.159 --> 01:04:11.119
<v Speaker 4>out on the Ubiquity products right now.

1491
01:04:11.000 --> 01:04:12.159
<v Speaker 2>Because I'll give you a plus.

1492
01:04:12.920 --> 01:04:14.599
<v Speaker 3>Yeah you've worked with them before.

1493
01:04:14.760 --> 01:04:17.400
<v Speaker 1>Yeah, So my a job that I had like over

1494
01:04:17.440 --> 01:04:19.599
<v Speaker 1>a decade ago. One of the things that we did

1495
01:04:19.679 --> 01:04:23.159
<v Speaker 1>is we broadcast auctions and a lot of the barns

1496
01:04:23.199 --> 01:04:25.119
<v Speaker 1>that these auctions would be done and they didn't have

1497
01:04:25.199 --> 01:04:27.880
<v Speaker 1>good Internet connections and so we were using wireless equipment

1498
01:04:27.920 --> 01:04:31.559
<v Speaker 1>all the time and we swore by this by Ubiquity.

1499
01:04:31.719 --> 01:04:34.159
<v Speaker 1>So just just saying that was ten years ago. But

1500
01:04:34.280 --> 01:04:36.840
<v Speaker 1>as far as I know, like you know, good stuff, it's.

1501
01:04:36.719 --> 01:04:37.639
<v Speaker 3>It's pretty cool stuff.

1502
01:04:37.639 --> 01:04:39.440
<v Speaker 4>I actually have one already set up on my property

1503
01:04:39.559 --> 01:04:42.119
<v Speaker 4>between two spots and we actually had a wire like

1504
01:04:42.159 --> 01:04:44.639
<v Speaker 4>a buried wire under the ground and it gave us

1505
01:04:44.679 --> 01:04:46.400
<v Speaker 4>all kinds of trouble. And then we put in a

1506
01:04:46.400 --> 01:04:48.880
<v Speaker 4>couple of nanobeams and it's just like it's it's almost

1507
01:04:48.880 --> 01:04:50.360
<v Speaker 4>like they are wired, because that's what it looks like

1508
01:04:50.360 --> 01:04:53.960
<v Speaker 4>from a network perspective, and they just they just work flawlessly.

1509
01:04:54.159 --> 01:04:55.119
<v Speaker 3>So that's my picks.

1510
01:04:55.280 --> 01:04:59.039
<v Speaker 1>Awesome alrighty, well, thanks everybody for joining us, and we'll

1511
01:04:59.039 --> 01:04:59.599
<v Speaker 1>see you again.

1512
01:04:59.599 --> 01:05:00.079
<v Speaker 2>Another that
