1
00:00:06,839 --> 00:00:12,000
Hello and howdy everyone, Welcome to
another Adventures in Anguler. My name is

2
00:00:12,000 --> 00:00:15,960
Alyssa Nichel, and today with us
on the panel, we have Chris Ford,

3
00:00:16,199 --> 00:00:20,359
Hello, from The Hate Death of
the Universe. I here, it's

4
00:00:20,399 --> 00:00:24,719
warm in the UK right now,
just a touch. We also have with

5
00:00:24,800 --> 00:00:30,120
us brook Sports It Hello, Hi, I'm like waving its mate great,

6
00:00:30,199 --> 00:00:33,920
Greg Holdier, doesn't it? Yeah
it does. I'm waving. I'm waving

7
00:00:34,000 --> 00:00:39,039
back and gentlemen. Today with us
our guest of honor, Man of the

8
00:00:39,119 --> 00:00:42,799
Hour, Eli Lucas, Welcome to
the show. Eli, Hi, everybody

9
00:00:42,840 --> 00:00:47,960
from Hot and Smoky, Denver,
Colorado. Smoky. Yeah, we got

10
00:00:48,320 --> 00:00:51,560
we got a forest firing going on, so we've got a bunch of smog

11
00:00:51,600 --> 00:00:55,640
and stuff in the air. I
figured the first half of twenty twenty tried

12
00:00:55,640 --> 00:01:00,880
to fatten us up, and now
it's trying to smoke us. So that's

13
00:01:00,920 --> 00:01:07,280
just what you want, isn't it. I have it. But the way

14
00:01:07,319 --> 00:01:08,680
you described that, I was like
kind of sound like beef jerky. So

15
00:01:08,719 --> 00:01:11,359
it could be the weather, it
could be a smoked meat, you know,

16
00:01:11,519 --> 00:01:17,079
like, right, is Hannibal related
to this? Brooks? What were

17
00:01:17,079 --> 00:01:21,680
you saying? Oh? Well,
people, I mean, oh, right,

18
00:01:22,200 --> 00:01:27,480
you're smoking human meat. So Eli, tell us a bit about yourself,

19
00:01:27,519 --> 00:01:30,280
who you are, where you work. Yeah, I'm a software developmer,

20
00:01:30,400 --> 00:01:33,959
been doing this gig now for a
little over twenty years, and I

21
00:01:34,000 --> 00:01:37,519
work at a pretty awesome company called
Ionic, which you might have heard of

22
00:01:37,599 --> 00:01:41,680
before. Yeah, but you know
today though I'm not I'm not here to

23
00:01:41,719 --> 00:01:45,079
talk about Ionic. I'm here to
talk about a little something else, tell

24
00:01:45,159 --> 00:01:49,200
Us tell us Eli can be talking
about on today's show. So today we're

25
00:01:49,200 --> 00:01:53,920
going to dive into an SJS a
little bit. And before I actually start

26
00:01:53,000 --> 00:01:57,439
talking about SGS, IONE want to
give a little story about like how I

27
00:01:57,519 --> 00:02:00,799
ran into it and where I find
it's very about valuable and so if you

28
00:02:00,799 --> 00:02:04,319
think about it, we got this
like Unicorn and title out there and software

29
00:02:04,319 --> 00:02:07,400
development called the full stack developer,
right, And to me it's like,

30
00:02:07,400 --> 00:02:09,479
well, what what does like full
stacked development mean? And it's kind of

31
00:02:09,520 --> 00:02:14,639
like where you're pretty confident on being
able to work on both the front end

32
00:02:14,639 --> 00:02:19,360
and of the application and the back
of the application. And before like front

33
00:02:19,400 --> 00:02:23,879
end web development really exploded, this
this was like something that people commonly did

34
00:02:23,919 --> 00:02:27,080
on like the website and the back
ends and whatnot. And like, really,

35
00:02:27,280 --> 00:02:30,560
when you said back in developer,
you probably talked about people who like

36
00:02:30,599 --> 00:02:34,199
did more database stuff than just like
server side stuff. And now that role

37
00:02:34,240 --> 00:02:37,280
is kind of like morphed into like, Okay, we have our backend developers

38
00:02:37,280 --> 00:02:39,439
that work on like the APIs and
all the back end things, and the

39
00:02:39,479 --> 00:02:44,479
front and developers which are coming to
the client side. That's because like both

40
00:02:44,520 --> 00:02:47,080
of those sides of the equation have
got a lot more complex over the years.

41
00:02:47,199 --> 00:02:53,439
And that's because we're dealing with oftentimes
like different programming languages, different platforms,

42
00:02:53,520 --> 00:02:58,400
different sometimes even different operating systems that
they use and whatnot. And I

43
00:02:58,439 --> 00:03:01,199
was on a team about three years
ago before I joined Ionic, and we

44
00:03:01,199 --> 00:03:05,439
were kind of in that situation.
We had like four or five fern and

45
00:03:05,520 --> 00:03:09,639
devs that were working on like an
angler JS Ionic application and one Java dev

46
00:03:09,680 --> 00:03:14,719
that was working on the back end, and the front end team was just

47
00:03:14,919 --> 00:03:17,520
like really outpacing what the person could
keep up with on the back end.

48
00:03:19,039 --> 00:03:21,280
And so we got together as a
team was like, well, what are

49
00:03:21,319 --> 00:03:24,919
some of the things that we could
do to solve this problem? And we're

50
00:03:25,039 --> 00:03:28,719
kind of like, well, the
front and devs could go and they could

51
00:03:28,800 --> 00:03:30,840
learn Java and you know, get
with the tools and stuff to do the

52
00:03:30,919 --> 00:03:34,599
Java development. But we also thought, like, well, what is if

53
00:03:34,599 --> 00:03:38,360
we just use like node on the
back end to do our development because everybody

54
00:03:38,360 --> 00:03:43,280
on the front end already knows javascripts. We already had no tooling, and

55
00:03:43,719 --> 00:03:49,280
already the Java developer like hung his
head and walks away slowly. Actually,

56
00:03:49,360 --> 00:03:54,080
actually he was pretty cool. He
got behind it. I was going to

57
00:03:54,159 --> 00:03:59,639
say, how do we speed up
our back end development fire the Java developments?

58
00:04:00,879 --> 00:04:03,319
Oh my god. But yeah,
so that's kind of what we did.

59
00:04:03,360 --> 00:04:08,439
And we moved when we moved around
to like slowly like writing all of

60
00:04:08,439 --> 00:04:13,360
our new stuff and Node with JavaScript, and it was working out pretty good.

61
00:04:13,400 --> 00:04:16,720
But we had this microservice architecture,
and what we found was that whenever

62
00:04:16,879 --> 00:04:20,480
like a developer started up a new
micro service, like we didn't have like

63
00:04:20,560 --> 00:04:25,079
a whole lot of like guidelines to
go by. We were using just like

64
00:04:25,160 --> 00:04:28,439
plan Express on the back end.
And one of the things about Express,

65
00:04:28,480 --> 00:04:31,199
while it's like super easy to get
up and running and get rolling with it,

66
00:04:31,680 --> 00:04:36,199
Express doesn't offer like any type of
real guidance on how to architecture applications.

67
00:04:36,759 --> 00:04:41,160
And so we go any further could
you for people who are have never

68
00:04:41,519 --> 00:04:45,360
I have heard of micro services,
but I've never used them myself in development.

69
00:04:45,439 --> 00:04:48,240
So can you give a quick example
of what a couple of micro services

70
00:04:48,279 --> 00:04:51,600
were and how you used Express with
those. Yeah, And to say like

71
00:04:51,680 --> 00:04:55,959
our stuff was like microservices is probably
a little bit of a misnomer. Why

72
00:04:56,000 --> 00:04:59,959
we tried to break break it up. It wasn't like super super micro services,

73
00:05:00,120 --> 00:05:02,959
but like we had like an authentication
service to deal with authentication, and

74
00:05:03,000 --> 00:05:08,160
we had a user service that dealt
with the actual users of our application,

75
00:05:08,439 --> 00:05:12,920
and then different areas around each major
functionality piece of our system we had a

76
00:05:12,959 --> 00:05:15,480
service for and so this like we
had a chat service, and we had

77
00:05:15,480 --> 00:05:21,040
a notification service and a weather service
and stuff like that. So each service

78
00:05:21,279 --> 00:05:26,439
you're saying there, there weren't very
many like rules around how to write them,

79
00:05:26,480 --> 00:05:29,600
so it was just kind of chaos
between the services, right, Yeah,

80
00:05:29,600 --> 00:05:33,199
And that that's kind of what we
found. And at the time Angler

81
00:05:33,279 --> 00:05:38,000
just popped on the scene, and
with Angular came typescript and I started really

82
00:05:38,000 --> 00:05:41,000
getting into the typeescript and I was
taking a look at all of our different

83
00:05:41,000 --> 00:05:43,519
services and I was like, well, it would be kind of cool if

84
00:05:43,600 --> 00:05:46,800
like we could use some mechanisms from
typescript to help like ease up on the

85
00:05:46,839 --> 00:05:49,560
amount of code that we had to
write. And I came from a background

86
00:05:49,600 --> 00:05:54,120
of like ASP dot net development and
a little bit of job of Spring development,

87
00:05:54,279 --> 00:05:57,480
and so I was kind of like
used to like the frameworks providing like

88
00:05:57,560 --> 00:06:00,720
these this type of guidance how to
do things. And one of the things

89
00:06:00,720 --> 00:06:03,079
I really liked about ESP dot net
development is like how you define your routes

90
00:06:03,079 --> 00:06:06,160
and stuff. And so I was
like, Okay, we got in typescript,

91
00:06:06,160 --> 00:06:10,720
who got decorators? I would really
like to use a decorator to define

92
00:06:10,759 --> 00:06:13,959
how my routes are going to work
instead of Express application. And so I

93
00:06:13,959 --> 00:06:17,360
started looking for how to use Typescript
with Express and that's actually how I found

94
00:06:17,399 --> 00:06:21,439
Nest And so a little bit of
background on nests. So this is about

95
00:06:21,480 --> 00:06:24,560
around when Ness was just coming on
the scene. I think it was like

96
00:06:24,680 --> 00:06:28,439
virsion of one point zero. But
Nest was a back end framework that was

97
00:06:28,519 --> 00:06:32,920
meant to provide an opinionated way to
develop back in applications. And the way

98
00:06:32,959 --> 00:06:36,360
that they accomplished this is that they
took a look at like what was going

99
00:06:36,480 --> 00:06:42,079
on in the angular world, and
Angular was an opinionated way to develop front

100
00:06:42,160 --> 00:06:46,959
end applications, and so the creators
of Nest really got influenced by how Angler

101
00:06:46,000 --> 00:06:54,240
was created and tried to reuse a
lot of the Your Pepper is adorable.

102
00:06:54,319 --> 00:06:59,279
I love her, and she's very
welcome on this podcast. She wants to

103
00:06:59,279 --> 00:07:03,639
be a part of the conversation.
I'm just honestly surprised that you were all

104
00:07:03,680 --> 00:07:09,079
for not doing Java, getting on
the NOE train, getting on the express

105
00:07:09,120 --> 00:07:13,079
train, and then discovering nests when
you had a background in ASP dot net

106
00:07:13,160 --> 00:07:16,000
like and you were ready for more
structure, and yet you dove into the

107
00:07:16,079 --> 00:07:20,040
JavaScript world. So it seems very
Yeah, I was the only one on

108
00:07:20,079 --> 00:07:25,000
the team that came from a background. Everybody else was, well, most

109
00:07:25,040 --> 00:07:28,680
of everybody else was front in developers, and then the entire company was pretty

110
00:07:28,720 --> 00:07:32,920
much JVM Java based, and it
was a little bit of a negotiation with

111
00:07:33,079 --> 00:07:36,879
like our CTO and stuff to start
using Node, but he kind of understood

112
00:07:36,879 --> 00:07:40,000
the value as well as like,
Okay, you got a bunch of jobscript

113
00:07:40,040 --> 00:07:43,480
developers, we should get them right
in jobscript on the back end as well.

114
00:07:43,920 --> 00:07:46,399
But pretty much the entire rest of
the company was all JVM based,

115
00:07:46,800 --> 00:07:49,920
and so when you discovered Nest,
it was like this breadth of fresh air

116
00:07:50,040 --> 00:07:55,879
to bring that structure to the back
end of this application, right yeah,

117
00:07:55,959 --> 00:08:00,800
because Ness just offered what I like
to call building blocks us to structure your

118
00:08:00,839 --> 00:08:03,560
application that you could use. So, especially if like you were an Angular

119
00:08:03,600 --> 00:08:07,879
developer coming to the back end,
Nest uses a lot of the same concepts

120
00:08:07,879 --> 00:08:11,959
and nomenclature and whatnot that Angular apps
do. And so if you see something

121
00:08:13,079 --> 00:08:15,879
like a pipe or an interceptor or
a guard, it's like, okay,

122
00:08:15,959 --> 00:08:18,680
I know as an Angular developer where
that logic is going to go. And

123
00:08:18,720 --> 00:08:22,600
what I find a little bit funny
about it is that, you know,

124
00:08:22,680 --> 00:08:28,040
the Angler team was a bunch of
Java developers originally, I believe, and

125
00:08:28,120 --> 00:08:30,959
so when they went to go right
Angler, they took a lot of the

126
00:08:30,959 --> 00:08:35,120
concepts and stuff that they knew from
developing back in applications into the front end.

127
00:08:35,279 --> 00:08:37,120
And so then I kind of went
like in this big three sixty very

128
00:08:37,159 --> 00:08:41,720
cool. I've used nests before and
I kind of had a similar experience while

129
00:08:41,759 --> 00:08:45,960
I started with Firebase and got frustrated
with that and then said I'm just going

130
00:08:46,039 --> 00:08:48,799
to write an express app. And
then my Express app was Spaghetti and then

131
00:08:48,840 --> 00:08:54,399
I found Nests. It made it
all pretty again. Okay, yeah,

132
00:08:54,440 --> 00:08:58,879
exactly made everything work now, but
yeah, it's mostly done for an end

133
00:08:58,879 --> 00:09:01,879
work for the past like six So
it was like my first time getting into

134
00:09:01,919 --> 00:09:05,480
the back end and it was very
easy to jump right into Nest yep.

135
00:09:05,679 --> 00:09:09,200
And were you an Angular developer before? Yeah? Yeah, yeah, so

136
00:09:09,200 --> 00:09:13,320
that's what I hear, Like Angular
developers are able to jump into Nest like

137
00:09:13,440 --> 00:09:16,440
super easily just because of how close
architectures are. But I also like to

138
00:09:16,480 --> 00:09:20,600
say that, like net, Nest
is a platform for building back end applications,

139
00:09:20,840 --> 00:09:24,799
and it doesn't it doesn't matter what
your front end is. It doesn't

140
00:09:24,840 --> 00:09:28,200
have to be Angular like. Ness
is just as beneficial to like React developers

141
00:09:28,279 --> 00:09:33,200
or View developers or native mobile developers, or if you're building like just the

142
00:09:33,360 --> 00:09:37,480
system of back ends in general,
that ness is a great platform for all

143
00:09:37,519 --> 00:09:41,440
those things. Yeah, definitely potentially
dumb question. So if you're using Angular

144
00:09:41,600 --> 00:09:45,000
for sure, and you have a
note back end and you want to use

145
00:09:45,080 --> 00:09:50,639
Nest, does that mean you are
also for sure using Express or not necessarily

146
00:09:50,120 --> 00:09:56,039
so, Nest by default encapsulates Express, so it uses Express in the behind

147
00:09:56,039 --> 00:10:01,080
the scenes for you as it's HTTP
engine. So while a lot of the

148
00:10:01,080 --> 00:10:05,559
concepts are somewhere with the Express and
you can actually get access to the Express

149
00:10:05,600 --> 00:10:09,159
pieces if you need to. The
develop actually saw something about that in the

150
00:10:09,240 --> 00:10:13,879
Nest JS docs, so I was
like linked, okay, yeah, but

151
00:10:13,000 --> 00:10:18,320
the development experience is like way different
from developing an Express application and a Nest

152
00:10:18,360 --> 00:10:24,360
application. Nest application is more like
developing like in another type of NBC framework,

153
00:10:24,879 --> 00:10:30,519
and so you have these like clear
separations of concerns between like your controllers

154
00:10:30,759 --> 00:10:35,399
and your services, your views,
which if you're writing like an API,

155
00:10:35,519 --> 00:10:39,159
you can probably consider like the view
like the JSON or the model of the

156
00:10:39,240 --> 00:10:43,399
Jason that could returned back to the
client, or if you're using Nests to

157
00:10:43,440 --> 00:10:46,480
do some type of server side generated
HTML, the HTML would be like your

158
00:10:46,559 --> 00:10:50,840
view for the particular aspect. There's
also a great like community around it with

159
00:10:50,879 --> 00:10:56,080
the plugins and stuff. Have you
used any of those or a little bit.

160
00:10:56,360 --> 00:11:01,320
So the back end I typically use
to attach to a Nest application is

161
00:11:01,320 --> 00:11:05,879
like postgrads, and so the data
layer that I use mostly is typeo ORM

162
00:11:05,200 --> 00:11:11,559
and if you like everything that's Nest
is doing, type or M is architected

163
00:11:11,600 --> 00:11:16,799
in a very similar way. There's
lots of uses of decorators to define your

164
00:11:16,879 --> 00:11:22,039
types and your relationships between entities and
so type or M if you're coming from

165
00:11:22,159 --> 00:11:24,879
a dot net background, type of
ORM is like very similar to Energy framework,

166
00:11:26,000 --> 00:11:28,159
and so you can use it to
it's a code first database approach.

167
00:11:28,200 --> 00:11:33,679
You can use it to generate your
database and run updates to your database as

168
00:11:33,720 --> 00:11:37,120
you do like deployments and whatnot.
It's pretty cool. Some of the other

169
00:11:37,200 --> 00:11:39,919
plugins I haven't gotten too much into, but I know there's like a Swagger

170
00:11:39,960 --> 00:11:45,440
integration. And then you can also
use nests to do stuff that's not just

171
00:11:45,600 --> 00:11:50,879
like straight up HTTP. Slash rest
APIs like you could do graph you well

172
00:11:50,080 --> 00:11:54,159
with nests. You can do web
sockets in real time communication with nests as

173
00:11:54,200 --> 00:11:58,039
well. And so those are some
additional plugins out there, Brooks, Are

174
00:11:58,039 --> 00:12:01,519
there are do you in compass the
plugins that you've used before? Are there

175
00:12:01,519 --> 00:12:05,759
others that I must want to enough
to use the guel one? I haven't

176
00:12:05,840 --> 00:12:07,200
used it yet, That's what I
was curious. Yeah, looked at them

177
00:12:07,360 --> 00:12:13,000
longingly a couple of times and have
an excuse to start to play with it,

178
00:12:13,080 --> 00:12:16,000
right Yeah, Yeah, graph Fuel
is one of those things that has

179
00:12:16,080 --> 00:12:18,679
definitely intrigued me over the past few
years. Especially Sin's gotten more popular,

180
00:12:18,879 --> 00:12:22,360
especially in the in the reacting world, and when out dive into it,

181
00:12:22,399 --> 00:12:28,559
I'm planning on utilizing Nest to do
so. I just quite back up a

182
00:12:28,559 --> 00:12:35,919
little bit when you were saying about
how Nest basically like encapsulates express. Is

183
00:12:35,960 --> 00:12:39,879
it the like you know with if
you've got like a vanilla JavaScript application,

184
00:12:41,120 --> 00:12:46,039
you can you can migrate the type
script literally by just renaming your files from

185
00:12:46,120 --> 00:12:48,000
dot jas to dot t s and
just make sure you compile them. Can

186
00:12:48,039 --> 00:12:50,639
you do the same? Can you? If I have an existing Express app,

187
00:12:50,759 --> 00:12:54,799
can I just like load Nest into
it and be like, technically,

188
00:12:54,840 --> 00:12:58,200
now I'm using Nest and then i
can start building Nest bits on top of

189
00:12:58,200 --> 00:13:01,960
what I've got. Technically you probably
could, because when you go into the

190
00:13:03,000 --> 00:13:07,080
main startup file for Nest, the
main dot ts file, what you do

191
00:13:07,200 --> 00:13:13,919
is you boot up a version of
the application for Nest, and that application

192
00:13:13,600 --> 00:13:18,200
comes from an interface called like I
don't remember the exact name of it,

193
00:13:18,240 --> 00:13:20,799
but it's like I Nest Express application
or something like that, and so that

194
00:13:20,960 --> 00:13:26,919
application object has the same interface that
an Express application has and so if like

195
00:13:26,960 --> 00:13:31,960
you were wanting to like cook up
like any Nest middleware, any existing like

196
00:13:31,080 --> 00:13:35,559
a sorry that Nest middleware Express middleware, it's completely compatible and that's where you

197
00:13:35,600 --> 00:13:39,000
do it. And so I would
assume that, like, if you have

198
00:13:39,399 --> 00:13:43,360
existing route handlers and stuff that you
want to use that are Express route handlers,

199
00:13:43,360 --> 00:13:46,600
you could register them the exact same
way there, and then for like

200
00:13:46,679 --> 00:13:50,519
anything additional, you just like let
the Nest portion of the application take control.

201
00:13:50,720 --> 00:13:54,360
So it's something I haven't tried,
but from what I know everything about

202
00:13:54,360 --> 00:14:00,600
it, it's probably possible why our
sisters so integrated if anyone from the same

203
00:14:00,679 --> 00:14:03,080
team worked on it, or do
you guys know who created it? Yeah,

204
00:14:03,159 --> 00:14:07,080
so it was created by Camille,
and I would Butcher his last name

205
00:14:07,080 --> 00:14:11,600
if I speck too if I tried
to say it. So I'm not going

206
00:14:11,639 --> 00:14:16,840
to but include a link down there. And so Camille runs a company called

207
00:14:16,919 --> 00:14:20,480
a Trillion I think is what it's
called. And so it's kind of they

208
00:14:20,480 --> 00:14:28,360
do a bunch of consulting and education
around Nest applications and just kind of application

209
00:14:28,399 --> 00:14:33,039
development in general. But yeah,
it's an open source project. It's I

210
00:14:33,039 --> 00:14:35,279
believe in it license free, free
to use, so you can get started

211
00:14:35,279 --> 00:14:39,440
with it. But you know,
just kind of a small team. But

212
00:14:39,480 --> 00:14:41,879
it's been just exploding in the past
couple of years in popularity. I think

213
00:14:41,919 --> 00:14:48,440
it's the fastest growing HTTP library on
the note ecosystem for probably a couple of

214
00:14:48,480 --> 00:14:50,960
years in a row. Now it's
not monetized in any way. Is it

215
00:14:52,080 --> 00:14:54,279
just purely based on like sponsors and
I say, they've got like a sponsor

216
00:14:54,360 --> 00:14:58,279
ust link on the website on the
dogs. Yeah, yeah, they just

217
00:14:58,320 --> 00:15:03,399
started selling course. Yeah, I
think that just came today is a Wednesday.

218
00:15:03,399 --> 00:15:05,480
I think that just came out a
couple days ago. Actually, oh

219
00:15:05,480 --> 00:15:09,799
wow, yeah, yeah, coming
from I converted the app, the cruse

220
00:15:09,879 --> 00:15:13,720
I from Express to nests and it
was mostly I mean I probably could have

221
00:15:13,919 --> 00:15:16,480
still used the express app and then
done ness things to it, but it

222
00:15:16,559 --> 00:15:22,000
was pretty easy just to take my
routes and copy and paste and like neestify

223
00:15:22,080 --> 00:15:24,840
them or whatever, put them in
the right you know type script. So

224
00:15:24,960 --> 00:15:28,600
take like your handlers and put them
into controllers and whatnot. Yeah, yeah,

225
00:15:28,679 --> 00:15:31,720
yeah, it's probably yeah, probably
a fairly easy easy upgrade. So

226
00:15:33,440 --> 00:15:37,639
as a completely front end of the
front end person asking this question right under

227
00:15:37,639 --> 00:15:39,360
the front end. Yeah, like
what's the front end of the front end?

228
00:15:39,720 --> 00:15:43,639
Literally you're just you're just the one
using it's a monitor. Like when

229
00:15:43,679 --> 00:15:46,639
I say I'm a front end,
webe I mean it. I don't touch

230
00:15:46,759 --> 00:15:50,320
the notes, That's what I mean. Like, I'm like, hey,

231
00:15:50,480 --> 00:15:54,600
I can totally make Like for instance, in my last job, I was

232
00:15:54,639 --> 00:16:00,200
tasked with building a gradient color picker
from scratch, like in matching out it

233
00:16:00,279 --> 00:16:04,399
was awesome, it was well,
and then matching those colors and making them

234
00:16:04,440 --> 00:16:08,240
as true to form with the print
colors because I worked for a print company

235
00:16:08,639 --> 00:16:14,320
and so I've freaking had a blast. I love building custom components and CSS

236
00:16:14,440 --> 00:16:17,799
is my jam and that's where I
live. So whenever I talk about things

237
00:16:17,840 --> 00:16:21,000
like this, it's a little intimidating. And so Brooks, you're talking about,

238
00:16:21,039 --> 00:16:25,200
Okay, I'm converting this express app
to testify it. Do you find

239
00:16:25,240 --> 00:16:27,200
it's a bunch? Did you or
Eli find it was a bunch of overhead

240
00:16:27,200 --> 00:16:30,799
to like all this extra syntax,
all these extra files, all of this

241
00:16:30,919 --> 00:16:33,559
ex Like, yes, it's more
structure, but in my mind, it's

242
00:16:33,600 --> 00:16:37,320
also like all this extra stuff you
have to do to get the same functionality

243
00:16:37,360 --> 00:16:42,200
so can you talk about to that
for a sec? Now? I like

244
00:16:42,360 --> 00:16:47,600
that because I had lived through my
spaghetti code for about a month ahead of

245
00:16:47,639 --> 00:16:51,000
time, right, so I had
banged my head against the keyboard enough where

246
00:16:51,039 --> 00:16:53,320
my head's still hurt. So it
was a relief to have all this structure.

247
00:16:53,519 --> 00:16:56,799
I don't know, you lives,
yeah, and for me like probably

248
00:16:56,840 --> 00:17:00,919
like really depends on the situation,
but like most of the time, like

249
00:17:00,960 --> 00:17:03,679
I'll give this situation. I just
popped up a couple of days ago where

250
00:17:03,799 --> 00:17:07,680
I was going to go write a
Lambda function on a WS and I wanted

251
00:17:07,680 --> 00:17:11,119
to like prototype it and stuff locally
before I actually started to put it put

252
00:17:11,119 --> 00:17:17,920
it into Lambda. And I happily
started up a Nest application and started to

253
00:17:18,279 --> 00:17:22,799
prototype it up up there. And
then what I ended up doing was basically,

254
00:17:23,200 --> 00:17:26,759
once I got done, it was
a super simple method to like switch

255
00:17:26,759 --> 00:17:30,400
out like headers on HP requests and
stuff like that. And so once I

256
00:17:30,400 --> 00:17:33,759
got it done, like I just
took the job ascript out of the Nest

257
00:17:33,759 --> 00:17:38,000
application and copied it into aws's Lambda's
editor and got it up and running there.

258
00:17:38,160 --> 00:17:41,960
But what I why did that as
opposed to like trying to fire up

259
00:17:42,039 --> 00:17:48,880
a Express application is that the Nest
CLI makes it so easy to like fire

260
00:17:48,000 --> 00:17:56,119
up a new app and to get
stuff like debugging. And you know Angular

261
00:17:56,160 --> 00:17:59,759
Cli for granted, So you're saying
to do that stuff an express it's by

262
00:17:59,799 --> 00:18:03,880
hand. There's no Express cli.
I imagine somebody's probably written one out there.

263
00:18:03,920 --> 00:18:07,160
I'm not I'm not aware of any, and I don't think there's any

264
00:18:07,240 --> 00:18:12,799
like de facto standard that people flock
to for generating express apps. But yeah,

265
00:18:12,799 --> 00:18:17,039
the next CLI is is very similar
to the Angular Cli. I think

266
00:18:17,039 --> 00:18:19,000
it's based off the same code base, and they use like Angular schematics and

267
00:18:19,039 --> 00:18:23,279
whatnot so that you can easily generate
like new controllers and modules and all the

268
00:18:23,279 --> 00:18:27,200
different various pieces that you can for
a next application. But yeah, it

269
00:18:27,240 --> 00:18:30,559
was just so easy to get them
running. Like I was like, I'm

270
00:18:30,599 --> 00:18:34,359
not even going to try to like
fire up a Nest application and whatnot on

271
00:18:34,400 --> 00:18:37,079
my own, Like I could have, but I would have just taken longer.

272
00:18:37,480 --> 00:18:44,079
Okay, So because of the CLI
and also your like love and need

273
00:18:44,079 --> 00:18:47,839
for structure, it's not a hassle
or it's not tedious to do things in

274
00:18:47,920 --> 00:18:51,359
Nest. Great. I think the
CLIs are great for that because I do

275
00:18:51,400 --> 00:18:52,640
the same thing. If I want
to just test something out in an angular

276
00:18:52,680 --> 00:18:57,319
thing. I know, allow your
technically good like stack blitz. But if

277
00:18:57,359 --> 00:19:00,759
I'm not going to stack blitz,
of the fact that I can just drop

278
00:19:02,240 --> 00:19:04,920
a fresh anger application, you know, on my desktop with the cl I

279
00:19:06,039 --> 00:19:08,839
just with a simple command, you
know, and all ten million node modules

280
00:19:08,880 --> 00:19:15,160
that comes with it. I have
so many test apps. I actually recently

281
00:19:15,240 --> 00:19:19,039
just went through and cleaned it up. It was very cathartic. I recommend

282
00:19:19,079 --> 00:19:25,319
it. I was going to say
I changed jobs when my father test apps.

283
00:19:25,400 --> 00:19:30,319
You know. Yeah, sorry,
I have to now there's too much

284
00:19:30,400 --> 00:19:36,400
your I don't really know anymore.
There's nothing I can do. I'm not

285
00:19:36,599 --> 00:19:40,200
interesting about the what you were saying
about the serverist stuff. Is there any

286
00:19:40,319 --> 00:19:45,279
do any of the servilest function places
have support for nest because I know that

287
00:19:45,359 --> 00:19:48,559
you can like write. I mean, I don't do serverals stuff. I'll

288
00:19:48,559 --> 00:19:51,200
be honest. There's something I've been
interested in, but I've never been brave

289
00:19:51,279 --> 00:19:53,359
enough. I know, like with
Microsoft, I never now to pronounce this

290
00:19:53,559 --> 00:19:57,480
Azure right, yes, over here, that's that word is pronounced asure,

291
00:19:57,839 --> 00:20:02,519
so I never know what to call
it. So with the Azure functions,

292
00:20:02,720 --> 00:20:06,240
I'm fairly confident in saying that you
can. You can write them in node,

293
00:20:06,319 --> 00:20:08,240
right, So is there Nest support
for that if you wanted to.

294
00:20:08,799 --> 00:20:14,519
Yes, there is, And I
am quickly almost as if i'd planned that,

295
00:20:14,599 --> 00:20:17,640
Quiff, I didn't. There is
a fan, and I want to

296
00:20:17,680 --> 00:20:19,880
find the name of it so I
can actually talk about it here. I

297
00:20:19,920 --> 00:20:25,240
feel so bad, Chris, because
I have a heated blanket on my lap

298
00:20:25,319 --> 00:20:27,200
right now. But you can see, you can see how I'm just dying

299
00:20:27,240 --> 00:20:32,720
here. Yeah, so sorry,
darling, I've actually I have actually opened

300
00:20:32,759 --> 00:20:36,519
my window now tell me if the
traffic noise gets too bad. I haven't

301
00:20:36,559 --> 00:20:41,559
heard actually anything, so it's good
open them all. What have only got

302
00:20:41,599 --> 00:20:47,599
two don't go very far either.
So we were asking if there's a way

303
00:20:47,759 --> 00:20:52,839
to use Azure with Nest in Yeah, and probably like Servilus in general.

304
00:20:52,920 --> 00:20:56,799
So I know, I know there
was a team of the Azure de'v advocates

305
00:20:56,839 --> 00:21:02,240
out there, probably six to nine
ago, put together a small project to

306
00:21:02,240 --> 00:21:07,000
make it super simple. I pushing
Nest applications up to as your functions,

307
00:21:07,440 --> 00:21:11,079
and I know there's a similar project
that you can use to do it tows

308
00:21:11,160 --> 00:21:15,960
Lambda as well, and I played
I have played around with the lambda one

309
00:21:15,960 --> 00:21:18,440
before, and I wanted you to
get into the your one and check it

310
00:21:18,440 --> 00:21:22,079
out. Yeah, I'm looking at
this post right now. It's nest ad

311
00:21:22,400 --> 00:21:30,640
nest js slash azure function h GDP. Yeah. So it looks like yeah,

312
00:21:30,119 --> 00:21:33,160
yeah, and so basically what it's
kind of like a little piece of

313
00:21:33,160 --> 00:21:40,599
metalware library that will because generally functions
are agnostic to what type of trigger triggers

314
00:21:40,599 --> 00:21:44,359
them, if it's like an HTTP
trigger or or something like that. And

315
00:21:44,440 --> 00:21:48,160
so what the libraries do is they
listen for their trigger request to come in

316
00:21:48,279 --> 00:21:52,119
and then see if it's an HTTP
trigger, they kind of reconstitute all the

317
00:21:52,200 --> 00:21:56,599
objects, the request objects and the
context and all that kind of stuff,

318
00:21:56,599 --> 00:22:00,240
and so when it actually gets to
your nest application, it feels like it

319
00:22:00,279 --> 00:22:03,720
actually came in from an HTP request
instead of a trigger. And so like

320
00:22:03,799 --> 00:22:07,240
you can do it surrouting with the
u r L and get access to the

321
00:22:07,279 --> 00:22:11,839
headers and all that fun stuff.
I thought I had a cool name,

322
00:22:11,880 --> 00:22:14,559
but I'm looking at the blood Puss
now and it kind of looks like it's

323
00:22:14,599 --> 00:22:18,480
just called as. You're we can
make one up, Yeah, just name

324
00:22:18,519 --> 00:22:30,559
it now and then nest as your
coolness. I'm a Missouri developer, yeah,

325
00:22:30,799 --> 00:22:37,839
specialized miss certification. Yeah, so
your experience. I've written a load

326
00:22:37,920 --> 00:22:45,400
of Azure functions in next specifically.
Yeah. So, so sometimes it might

327
00:22:45,400 --> 00:22:48,960
be a little bit of overkill to
do something like a servilest function and nest.

328
00:22:49,160 --> 00:22:52,519
But if you're planning on you know, probably taking a little bit too

329
00:22:52,559 --> 00:22:56,599
much of an advantage of a servilest
platform and trying to put like a whole

330
00:22:56,640 --> 00:23:00,480
application into a servilist function like something
like nests will probably make a bit more

331
00:23:00,519 --> 00:23:03,400
sense. I'm pretty sure there's people
out there who would tell you that is

332
00:23:03,440 --> 00:23:07,119
exactly how you should be building your
back end of your applications, right,

333
00:23:07,319 --> 00:23:11,319
Yeah, I mean I don't I
don't think that that's what it was meant

334
00:23:11,400 --> 00:23:15,839
for. But when you think about
like the terms of scalability and low cost

335
00:23:15,960 --> 00:23:18,720
and whatnot a service infrastructure gives you, it makes a lot of sense to

336
00:23:18,759 --> 00:23:22,839
do so, all right, And
so with that, I maybe you can

337
00:23:22,920 --> 00:23:26,079
talk a little bit about like some
of the things that NEST does. When

338
00:23:26,079 --> 00:23:30,039
I talk about like the guidance that
it gives you I want to do and

339
00:23:30,400 --> 00:23:33,799
how like it's influenced by Angular.
Yeah, the building blocks as you call

340
00:23:34,319 --> 00:23:38,759
the building blocks, and so it
kind of starts off with modules. And

341
00:23:40,160 --> 00:23:45,000
as Angular devs, you're pretty familiar
with modules and the Nest application modules look

342
00:23:45,240 --> 00:23:48,920
very similar and they kind of provide
the same concept and capability that modules do

343
00:23:48,920 --> 00:23:53,920
in the Angular role and being able
to break down your application into smaller pieces

344
00:23:53,960 --> 00:23:59,359
and then combine them back together into
a larger application. Now, I'll kind

345
00:23:59,359 --> 00:24:03,200
of be honest, like in my
nestwork, like I don't think i've ever

346
00:24:03,319 --> 00:24:07,240
like actually separated out a module.
And if the COLI didn't do it for

347
00:24:07,279 --> 00:24:12,319
me in Angular, I probably like
i've done it in Angular either, so

348
00:24:12,400 --> 00:24:18,680
offensive all things. Yeah, well
the module per file, that's me.

349
00:24:18,160 --> 00:24:21,480
Yeah, well the CLI does it
for me now, so I don't have

350
00:24:21,559 --> 00:24:25,200
to I don't have to worry about
making anywhere. Right though, I do

351
00:24:25,279 --> 00:24:27,359
feel very at home looking at these
docks because, like, for instance,

352
00:24:27,400 --> 00:24:32,000
you're talking about modules and it says
import module from ne STGs slash common.

353
00:24:32,720 --> 00:24:36,480
It's very it's a very Angular esque
all of it. It looks just like

354
00:24:36,559 --> 00:24:38,759
Angler, doesn't it. Like literally, the only thing that lets me know

355
00:24:38,799 --> 00:24:42,400
I'm not looking at Angular code in
the docks here is that it's just at

356
00:24:42,480 --> 00:24:47,519
module and not at energy module.
It's literally the only difference, right,

357
00:24:47,759 --> 00:24:51,000
And so then with that, and
you also have your services and providers,

358
00:24:51,279 --> 00:24:56,359
and so in a typical back in
NVC style architecture, your services and providers

359
00:24:56,359 --> 00:25:00,039
are kind of what's responsible for like
communicating with the data base, some type

360
00:25:00,079 --> 00:25:04,799
of third party storage system, other
APIs, other back end services and whatnot,

361
00:25:04,920 --> 00:25:08,799
and so that's their responsibility. And
then you have controllers. And we

362
00:25:08,839 --> 00:25:14,599
don't have controllers in Angular anymore,
but we did in anglar js because when

363
00:25:14,640 --> 00:25:19,720
angler js first launched, they called
it like the MVV star framework or or

364
00:25:19,759 --> 00:25:23,319
something like that, but it was
kind of like like you lived to earlier

365
00:25:23,440 --> 00:25:27,319
that Angular JS was kind of modeled
after your back in development, so it

366
00:25:27,359 --> 00:25:32,559
was kind of like an MVC framework
but on the front end, and controllers

367
00:25:32,559 --> 00:25:37,480
and an NBC application are what's responsible
for communicating with your client and relaying those

368
00:25:37,519 --> 00:25:42,200
messages back to your services and then
responding to the client with the output of

369
00:25:42,240 --> 00:25:47,279
the services. And so got the
controllers that do that, and the controllers

370
00:25:47,400 --> 00:25:52,079
and web API are what listened to
the HTPU request coming in. And so

371
00:25:52,359 --> 00:25:55,920
a controller in Nest is pretty simple
to set up. It's just the basic

372
00:25:56,200 --> 00:26:00,400
ESX class that has a controller attribute
attached to it. The controller attribute takes

373
00:26:00,400 --> 00:26:03,880
in a string which defines the route
that it's going to listen for. And

374
00:26:03,920 --> 00:26:07,279
so let's say you have like a
people API, and so the controller attribute

375
00:26:07,279 --> 00:26:11,039
would taken forward slash people, and
that lets NEST know that this controller is

376
00:26:11,079 --> 00:26:15,319
going to listen to all those requests
that come into forward slash people. And

377
00:26:15,359 --> 00:26:18,480
inside of the controller, you're going
to have methods. And if you want

378
00:26:18,519 --> 00:26:22,440
to have your controller listen to a
particular HTTP verb that comes in, you

379
00:26:22,440 --> 00:26:26,079
would decorate that method with that particular
attribute. And so you have like a

380
00:26:26,079 --> 00:26:30,640
get attribute to respond to get requests, and they put a tribute to respond

381
00:26:30,720 --> 00:26:33,440
to put requests and post and de
lead and so on and so on,

382
00:26:33,599 --> 00:26:37,079
and so you put those attributes on
those individual methods. And so if you

383
00:26:37,119 --> 00:26:41,519
have like a get list or get
people to return back a list of people,

384
00:26:41,559 --> 00:26:45,960
you put a good attribute on that. And then if you have like

385
00:26:45,039 --> 00:26:49,640
another get request that's only going to
return back an individual inside of that get

386
00:26:49,640 --> 00:26:52,880
it. I keep calling them attributes, but I also mean like decorators because

387
00:26:52,920 --> 00:26:57,400
I come from dot net world originally. But you have the get decorator,

388
00:26:57,799 --> 00:27:03,680
and you can specify dynamic parameters instead
of that get decorator as well, and

389
00:27:03,720 --> 00:27:07,720
so you can specify an ID.
So if somebody goes to forward slash people

390
00:27:07,839 --> 00:27:12,599
slash one, the GIT decorator that
has the dynamic parameter attached to it knows

391
00:27:12,640 --> 00:27:15,839
that this is the method that's going
to respond to that to return back a

392
00:27:17,240 --> 00:27:21,720
individual person. So can we back
up a step and look at what we've

393
00:27:21,759 --> 00:27:26,839
just So we've covered modules and controllers
so far, and basically you have this

394
00:27:26,000 --> 00:27:30,160
module which is going to point the
way at like in their docks they have

395
00:27:30,279 --> 00:27:34,039
like cats controller and CAT service.
So it's like pointing out both of these

396
00:27:34,079 --> 00:27:38,279
pieces. So for every is it
true to say, like for every controller

397
00:27:38,279 --> 00:27:44,079
that I need, I have a
module? Is that the Yeah, that's

398
00:27:44,160 --> 00:27:48,119
not so you could put them all
on one module and just like keep yep,

399
00:27:48,240 --> 00:27:51,599
you could put them on one module. And by default, I believe

400
00:27:51,599 --> 00:27:53,839
that's what the SCLI does for you. So if you use then SCLI de

401
00:27:53,880 --> 00:28:00,640
generated controller, it's going to update
the app module okay, unless it unless

402
00:28:00,640 --> 00:28:03,400
it's a little bit more smarter and
if like you have a module already in

403
00:28:03,400 --> 00:28:06,279
that folder or something that might update
that module, but by default it's going

404
00:28:06,279 --> 00:28:08,160
to update the module. I was
going to say, like with with the

405
00:28:08,200 --> 00:28:12,960
ANGLICI, it actually just looks for
the nearest module, doesn't it to where

406
00:28:14,000 --> 00:28:17,799
you're putting your suit? Yeah?
Yeah. So if you have, like

407
00:28:17,880 --> 00:28:19,559
if you have two modules in the
same folder, like if you have like

408
00:28:19,559 --> 00:28:23,599
your material module and you're apt module, obviously is a good place to put

409
00:28:23,599 --> 00:28:26,920
them. If you do, just
like n GGC my new component, it

410
00:28:26,960 --> 00:28:30,200
will actually flag up and say you
need to specify which module you want to

411
00:28:30,200 --> 00:28:34,240
put it in because there's two in
the two are the closest ones. So

412
00:28:34,279 --> 00:28:37,039
if you then had a like a
subfolder, like you know, cheese,

413
00:28:37,240 --> 00:28:40,599
and you had a cheese module in
there, Yeah, yeah, I'm going

414
00:28:40,640 --> 00:28:44,480
with this. If you have the
cheese and then you do like n GGC

415
00:28:44,880 --> 00:28:49,359
cheese slash and crackers component, then
it will actually import your crackers component into

416
00:28:49,359 --> 00:28:53,640
your cheese module because it's the nearest
local module to the component. I love

417
00:28:53,759 --> 00:28:59,319
it. So what Eli was saying
is by default, when you just I'm

418
00:28:59,359 --> 00:29:02,359
going to I'm going to use nests
today and you use it, and it's

419
00:29:02,400 --> 00:29:04,880
going to use your app module.
It's not going to create its own module.

420
00:29:04,880 --> 00:29:10,759
Dot ts file for all the bits
to be configured in correction Mark okay,

421
00:29:11,160 --> 00:29:14,400
and then controllers. As you were
saying, there were sounds like all

422
00:29:14,440 --> 00:29:17,839
of your methods for like you know, get and find all and all these

423
00:29:17,839 --> 00:29:21,960
things are defined. But then I
feel like we're missing Are we missing a

424
00:29:21,960 --> 00:29:25,559
piece? If we're missing a piece, and so inside of our controller,

425
00:29:25,599 --> 00:29:27,039
if we're if we're calling, if
we want to return back a list of

426
00:29:27,039 --> 00:29:30,640
people, like where where do we
get that data? Right? And so

427
00:29:30,640 --> 00:29:33,319
that's where the services and providers slash
providers come in. And so just like

428
00:29:33,359 --> 00:29:41,240
an angler, we inject our services
via the constructor into our controller and now

429
00:29:41,279 --> 00:29:45,279
we have access to that service.
And all that wiring up of the dependency

430
00:29:45,319 --> 00:29:48,359
injection system is done in the module, very similar to how it's done in

431
00:29:48,400 --> 00:29:52,119
Angular. You have your provider section
and you just listed the provider section.

432
00:29:52,240 --> 00:29:55,680
That way it knows about it real. They don't like I feel like the

433
00:29:55,720 --> 00:29:59,359
word provider and service are interchangeable.
Is that true? Yeah? I would

434
00:29:59,400 --> 00:30:03,480
say like all services or providers and
providers can be other things as well doing

435
00:30:03,599 --> 00:30:07,359
it. Yeah, if you think
think about it, right, you This

436
00:30:07,519 --> 00:30:11,799
is not me talking from actually knowing. This is my assumption like in your

437
00:30:11,839 --> 00:30:15,400
angler app, right, your services
go in your provider's array, right in

438
00:30:15,440 --> 00:30:18,039
your module that you have to provide
your service. So oh, I thought

439
00:30:18,079 --> 00:30:22,680
you just put them in one of
those arrays until it work. That's how

440
00:30:22,759 --> 00:30:27,079
much Brooks. I know you're probably
being facetious, but like, well that's

441
00:30:27,079 --> 00:30:33,079
how you start. At least people
really do that again, but my services

442
00:30:33,079 --> 00:30:37,200
are all in my entry components.
Why is it not working? So one

443
00:30:37,240 --> 00:30:40,519
of the cool things that Nessa does
that you would normally have to wire up

444
00:30:40,519 --> 00:30:45,319
yourself in an express application is that
in order to get like an HTTP request

445
00:30:45,480 --> 00:30:49,720
that returns back like a bit adjacent
an express application, there's various pieces of

446
00:30:49,799 --> 00:30:53,599
like middleware and stuff that you have
to like hook up, like you have

447
00:30:53,680 --> 00:30:57,000
to like hook up like a.
I think it's a middlewhere called body parser.

448
00:30:57,119 --> 00:31:00,920
Like if you're ticking in, like
if you say yeah, Jason requests

449
00:31:00,920 --> 00:31:03,440
and stuff like that, Nest handles
all that stuff for you. And so

450
00:31:03,519 --> 00:31:07,039
if you're doing a like a post
request, then your body has a bit

451
00:31:07,079 --> 00:31:12,720
of JSON and the content type is
application slash Jason. Nest is automatically going

452
00:31:12,799 --> 00:31:18,680
to take that Jason and inject it
into a parameter in one of your controller

453
00:31:18,720 --> 00:31:21,880
methods. And so if like you're
accepting a person in a post request,

454
00:31:22,240 --> 00:31:26,200
all you need inside of your controller
is like a create person method that takes

455
00:31:26,200 --> 00:31:30,839
in a person object and this will
automatically map that Jason response into that personal

456
00:31:30,880 --> 00:31:33,680
object for you. That's aluesome.
Yeah, So, like, no need

457
00:31:33,759 --> 00:31:37,720
to do no need to start yourself
off with learning express is what you're you're

458
00:31:37,720 --> 00:31:41,000
saying, Just go straight to Nest, like you never never learn express?

459
00:31:41,319 --> 00:31:47,160
Is I think the key Wait it
sounds like it. I I'm really I

460
00:31:47,200 --> 00:31:48,759
know, we're almost to the top
of the hour. We've got probably ten

461
00:31:48,799 --> 00:31:52,440
more minutes to dive into any more
of the building blocks. But I feel

462
00:31:52,440 --> 00:31:55,400
like I've got a really good handle
on at least the basics. Are Are

463
00:31:55,400 --> 00:31:57,880
there any other like this one?
Like? Yeah, yeah, so there's

464
00:31:57,920 --> 00:32:04,799
other pieces of So now we're getting
into specialized pieces of middleware. And in

465
00:32:04,839 --> 00:32:10,119
an express application, middleware can sits
in between the client and the back end

466
00:32:10,119 --> 00:32:15,920
of the system the response, and
you can do various things. Nest has

467
00:32:15,000 --> 00:32:19,279
middleware as well, but they're very
specialized in what you do. And as

468
00:32:19,319 --> 00:32:22,200
Anger developers, when you hear the
names of these you're going to be kind

469
00:32:22,240 --> 00:32:24,559
of familiar with what they do,
and so we have pipes, and so

470
00:32:24,759 --> 00:32:30,480
pipes and nests are kind of the
same purpose. There's often used to convert

471
00:32:30,759 --> 00:32:34,519
various pieces of data as they're coming
into your system into a particular format,

472
00:32:34,839 --> 00:32:38,759
where like a pipe and angler is
used to like convert something for display purposes,

473
00:32:39,000 --> 00:32:43,599
and so pipes are often used to
convert data. So like if you

474
00:32:43,599 --> 00:32:45,000
have a string, but you want
it to be a number or something like

475
00:32:45,039 --> 00:32:49,119
that, or a particular object that
needs to be morphed a little bit before

476
00:32:49,160 --> 00:32:52,960
it actually hits your controller. You
can also use pipes for validation, and

477
00:32:52,000 --> 00:32:55,319
so pipe is a good place for
you to be able to look at the

478
00:32:55,359 --> 00:33:00,759
request coming in and validate the input
before you actually say to your control.

479
00:33:00,720 --> 00:33:06,720
And then you have interceptors, and
interceptors listen to both ends of the requests,

480
00:33:06,720 --> 00:33:08,400
and so I can listen to the
beginning of it, take a look

481
00:33:08,400 --> 00:33:12,400
at the data, and then pass
it, pass it through the rest of

482
00:33:12,440 --> 00:33:15,680
the pipeline, let it go through
your control, and then it gets access

483
00:33:15,799 --> 00:33:19,799
to the data again at the end, where you're now free to modify that

484
00:33:19,880 --> 00:33:22,559
data as it goes out. And
so like what you can do there is

485
00:33:22,559 --> 00:33:28,480
like if you have a specific schema
that you like your your responses to adhere

486
00:33:28,559 --> 00:33:31,799
to, like that now's your time
to like put the data into a data

487
00:33:31,799 --> 00:33:36,759
field and the metadata into a metadata
field and whatnot. And then you also

488
00:33:36,839 --> 00:33:40,039
have guards, and guards are very
similar to angular guards that kind of like

489
00:33:40,119 --> 00:33:45,599
provide authentication for your app. And
so a guard can intercept the request as

490
00:33:45,640 --> 00:33:50,039
that's coming in and you can do
all your authentication checks on it to make

491
00:33:50,039 --> 00:33:53,039
sure that the users allowed to access
this resource and pretty much like return too

492
00:33:53,039 --> 00:33:58,680
to them through or return falls to
give them a forbidden request status go back.

493
00:33:58,960 --> 00:34:01,880
But what a like about these is
kind of the express world alls you

494
00:34:02,079 --> 00:34:06,519
the only building block that you have
is a piece of middleware and you kind

495
00:34:06,519 --> 00:34:08,000
of have to figure out how it's
going to fit into it all, where

496
00:34:08,039 --> 00:34:12,719
these are like very specialized and so
like when you think like okay, I'm

497
00:34:12,719 --> 00:34:15,480
doing authentication, I know to put
that into a guard. Or if you're

498
00:34:16,239 --> 00:34:21,440
a developer who knows Nest but you're
going to another Nest application, you kind

499
00:34:21,440 --> 00:34:23,440
of know that like, Okay,
if I'm going to look at authentication code

500
00:34:23,599 --> 00:34:27,760
code, I'm going to the authentication
guard for that versus like you know,

501
00:34:27,800 --> 00:34:30,159
half an asked somebody like, hey, where's the authentication code for the appen

502
00:34:30,280 --> 00:34:35,840
in this and whatnot. It's just
that, you know, pretty opinionated guidance

503
00:34:35,960 --> 00:34:40,400
that an enterprise grade framework like Nest
gives you that something like Express doesn't you

504
00:34:40,400 --> 00:34:45,920
have one sold me on SJS today. So to back up just real quick,

505
00:34:46,039 --> 00:34:50,440
I saw that when you're talking about
pipes, there is like six different

506
00:34:50,440 --> 00:34:53,000
built in pipes with Nests like validation
pipe, parcent pipe. Do you know

507
00:34:53,039 --> 00:34:57,000
if there's a way to build custom
pipes? Yeah? Yeah, So all

508
00:34:57,079 --> 00:35:00,440
these you're you're able to build custom
versions of them, and the built in

509
00:35:00,519 --> 00:35:05,159
ones are like scenarios that the Nest
team knew were going to happen so often

510
00:35:05,199 --> 00:35:07,920
they just included them out of the
box, especially like validation and then like

511
00:35:07,960 --> 00:35:12,039
the parcent pipes, because it's very
common for you to take in like a

512
00:35:12,079 --> 00:35:17,000
parameter from a dynamic parameter from like
a URL and inject it into your controller.

513
00:35:17,199 --> 00:35:21,000
But anything that comes from the URL
is going to be a string where

514
00:35:21,000 --> 00:35:24,599
a lot of times if you're using
integers or numbers for your IDs, that's

515
00:35:24,639 --> 00:35:28,639
going to come into a string and
you normally have to convert that yourself into

516
00:35:28,639 --> 00:35:31,119
a number before you pass it into
your back end. The parsit and pipe

517
00:35:31,159 --> 00:35:36,400
just automatically says, like when you
decorate a parameter in your controller method with

518
00:35:36,480 --> 00:35:37,480
Parson, it's going to be like, okay, if it's going to be

519
00:35:37,480 --> 00:35:40,719
a string, come again, automatically
convert it to an energer, and then

520
00:35:40,719 --> 00:35:44,639
when it arrives into your controller,
it's going to be an integer. What

521
00:35:45,000 --> 00:35:49,360
happens out of interest if you try
to navigate to like slash cats slash b,

522
00:35:49,760 --> 00:35:52,639
Like, what would your pass pipe
do if you actually passed it a

523
00:35:52,519 --> 00:35:57,159
letter? Would it just like four
or four? It would probably give you.

524
00:35:57,639 --> 00:36:00,440
I think that would be a four
hundred bad request exception to let you

525
00:36:00,480 --> 00:36:04,960
know that you probably did something.
I'm not exactly sure that's what would happen,

526
00:36:05,000 --> 00:36:08,719
but that's what I would I would
want it to happen. There's always

527
00:36:08,719 --> 00:36:13,440
one, isn't it trying to think
of these? Yeah, because scenarios,

528
00:36:13,599 --> 00:36:16,320
because the bad request is to say
like, hey, you, as a

529
00:36:16,519 --> 00:36:21,880
caller of the API, did something
wrong? True, blame the user?

530
00:36:22,239 --> 00:36:25,159
Yeah, exactly, I agree?
Always is all I ever do? Well?

531
00:36:25,239 --> 00:36:30,039
Actually, is this exactly what the
docs say? Because it says that

532
00:36:30,119 --> 00:36:34,760
it would throw. Nest will throw
an exception like this validation failed numeric string

533
00:36:34,880 --> 00:36:39,000
is expected status code four hundred.
Yeah, we've definitely established out of the

534
00:36:39,239 --> 00:36:46,559
vice who knows their status codes because
it's not this guy. Oh my goodness.

535
00:36:46,639 --> 00:36:50,519
So yeah, I am very impressed
that. Honestly, Eli, I

536
00:36:50,519 --> 00:36:52,480
don't know, like how you know
so much. I feel like you have

537
00:36:52,559 --> 00:36:58,159
a secret in with the Nest team
because your your knowledge is very you know,

538
00:36:58,559 --> 00:37:02,159
honestly, it all comes from the
docks. Their docks are amazing and

539
00:37:02,480 --> 00:37:06,960
you can go through and read those
and whatnot. But besides that, like,

540
00:37:06,960 --> 00:37:09,519
I've just been a huge fandom Nest
ever since it's a released, and

541
00:37:09,559 --> 00:37:13,639
I've done you know, toxic user
groups about it and whatnot, and I'm

542
00:37:13,639 --> 00:37:16,360
putting together a course for it.
Nice. Yeah, I talked to ANNGI

543
00:37:16,440 --> 00:37:22,079
confluence on it. So is that
Do you think your course will be ready

544
00:37:22,079 --> 00:37:24,360
when this episode drops? I hope. So I've been working on for quite

545
00:37:24,400 --> 00:37:28,280
a while now. Where can people
find it? What platform is it on?

546
00:37:28,440 --> 00:37:30,920
It's going to be on Thinkster,
So yeah, I've been working on

547
00:37:30,960 --> 00:37:35,599
that for a while. So hopefully
by the time this podcast airs that it

548
00:37:35,639 --> 00:37:38,039
will be up and ready to go
and if you're interested in learning some Nest,

549
00:37:38,239 --> 00:37:43,199
go over to thinkster. And also
I'd like to promote the Nest team's

550
00:37:43,239 --> 00:37:45,760
official course as well, because the
more learning there is out there, the

551
00:37:46,239 --> 00:37:50,719
better it is for the community.
Awesome, That's wonderful. So yeah,

552
00:37:50,920 --> 00:37:54,960
check out Eli Lucas's Thankster course.
I think it's thinkster dot io on n

553
00:37:55,039 --> 00:38:00,960
s JS. And before we get
to any more of Eli's picks or actually

554
00:38:00,960 --> 00:38:05,039
picks in general, is there anything
else about Nest or Express or anything else

555
00:38:05,039 --> 00:38:07,880
you want to add on before we
get to picks. No, nothing at

556
00:38:07,880 --> 00:38:09,960
the top of my mind. Just
like it's it's a framework, and what

557
00:38:09,960 --> 00:38:13,519
I would say is like it's it
kind of brings back some of the joy

558
00:38:13,679 --> 00:38:16,440
of, like you know, developing
back in applications again that kind of missed

559
00:38:16,480 --> 00:38:21,400
for a while, especially coming from
the sp dot NBC world. And so

560
00:38:21,519 --> 00:38:24,920
it's like you're if you're used to
like enterprise type systems that you'd find in

561
00:38:24,960 --> 00:38:28,440
other frameworks, give it a try. If you're an Angler developer, give

562
00:38:28,440 --> 00:38:30,800
it a try. If you're not
an Angular developer, It's still a great

563
00:38:30,840 --> 00:38:35,000
platform for building back in applications on
notes, so give it a try.

564
00:38:35,000 --> 00:38:40,960
As well all right, well panelists
Brooks or Chris, do every one of

565
00:38:42,000 --> 00:38:44,840
you have some picks to go over
to it? I have one pick.

566
00:38:45,079 --> 00:38:46,480
It's unlike me. I actually have
a whole bunch of them. But I'm

567
00:38:46,519 --> 00:38:50,079
only going to pick one thing,
and them too. I need to move

568
00:38:50,079 --> 00:38:54,400
out this room. I'm going to
pick a TV show called What We Do

569
00:38:54,440 --> 00:38:58,800
in the Shadows. Just finished watching
the second season a bit. I think

570
00:38:58,840 --> 00:39:04,559
it's might enjoy collabor between BBC and
FX, so in the UK it's on

571
00:39:04,639 --> 00:39:07,800
BBC. I have no concept of
how you would possibly watch it in the

572
00:39:07,800 --> 00:39:10,880
States, but it's like a mockumentary
kind of in the vein of the office,

573
00:39:12,000 --> 00:39:15,000
where you've got a TV crew following, But it's following these four vampires

574
00:39:15,079 --> 00:39:20,039
who live together in Staten Island,
and they're completely in One of them isn't

575
00:39:20,079 --> 00:39:22,559
even a proper vampire. He's just
like he's what he calls an energy vampire,

576
00:39:22,559 --> 00:39:27,920
which basically just means he just bores
people and then like feeds off of

577
00:39:27,960 --> 00:39:30,679
their life force and so they just
are passing out from sheer boredom. Is

578
00:39:30,960 --> 00:39:36,079
absolutely hilarious. It's very very wittily
written, and I would you can watch

579
00:39:36,119 --> 00:39:39,800
it FX on Hulu is what this
is saying in the States. So excellent.

580
00:39:39,840 --> 00:39:43,920
I mean I would, I would. If you like witty comedy,

581
00:39:44,039 --> 00:39:46,760
I would absolutely recommend it. It's
very very like Chris, You're like,

582
00:39:46,880 --> 00:39:52,239
you know, if you're at all
cool person, Yeah, watch it like

583
00:39:53,000 --> 00:39:57,079
it's it's so well written. I
can't even I mean, the concept of

584
00:39:57,079 --> 00:40:00,760
it is is insane, but it's
very well done and I would recommend it

585
00:40:00,000 --> 00:40:05,199
me. Yes, second, yeah, I go a second. Yes.

586
00:40:05,440 --> 00:40:10,400
My my pick is neural Cam and
it turns your smartphone into a webcam.

587
00:40:10,440 --> 00:40:14,079
And I was playing with it before. I was going to use it on

588
00:40:14,119 --> 00:40:15,760
this, but it didn't it didn't
happen. I'll put it in the chat

589
00:40:16,199 --> 00:40:21,840
and yeah, you know, makes
you look better in general. And also

590
00:40:21,920 --> 00:40:24,280
if you pick your nose while it's
on, it'll blur your face out,

591
00:40:24,360 --> 00:40:30,159
so that's good if you're in sticking
your nose. I think it also blurs

592
00:40:30,159 --> 00:40:34,119
out nudity as well, so if
you accidentally get naked, it'll blur you

593
00:40:34,159 --> 00:40:38,079
out. Happened on the zoom calls
all the time. There goes the sure,

594
00:40:38,880 --> 00:40:43,719
yeah, everything happens. It's just
beltcrow down the side, that's right.

595
00:40:44,239 --> 00:40:46,079
Sometimes you gets snagged on my chair
something, and I like get up

596
00:40:46,079 --> 00:40:50,039
to go, you know, close
the door, and I'm just butt naked.

597
00:40:51,000 --> 00:40:53,480
Yah. Imagine you and like one
of those tracksuits that you just like

598
00:40:53,559 --> 00:40:59,079
rip off with the velcrow. Yeah, exactly. Neural Cam okay, cool,

599
00:40:59,159 --> 00:41:00,960
Yeah, it was cool. I
was playing with it. Check it

600
00:41:00,960 --> 00:41:05,239
out. I've played around with epopcam, which is kind of kind of similar,

601
00:41:05,280 --> 00:41:07,280
except it doesn't have some of those
cool blurring effect features. But I

602
00:41:07,320 --> 00:41:09,599
had the same problem with him,
like it didn't work with him, but

603
00:41:09,760 --> 00:41:13,519
like I could use it and other
applications. That is kind of word.

604
00:41:14,000 --> 00:41:16,840
My pick is super Quick. It
is on twitch code it Live. I

605
00:41:17,000 --> 00:41:22,480
streamed there very often with my cohorts. But every Wednesday afternoon from two to

606
00:41:22,559 --> 00:41:28,280
four I do a UI show where
we tackle complex CSS problems. So yeah,

607
00:41:28,480 --> 00:41:30,519
come join me. That's two to
four Central. I'm really bad at

608
00:41:30,559 --> 00:41:34,880
converting, so I'm not even going
to try. So there you go.

609
00:41:34,960 --> 00:41:37,039
But Eli, other than your thanks
to your course, which everyone should go

610
00:41:37,239 --> 00:41:40,239
check out, do you have any
picks for it? I mean, I'll

611
00:41:40,239 --> 00:41:44,159
pick a TV show too, And
it's not exactly new, but I'm just

612
00:41:44,199 --> 00:41:46,199
starting to get into it and which
is kind of late for me because I've

613
00:41:46,239 --> 00:41:50,719
been a treky all my life.
But I recently started watching Star Trek Discovery

614
00:41:50,880 --> 00:41:53,760
after I watched a Star Trek with
Card and I'm really enjoying it. It's

615
00:41:54,000 --> 00:41:58,159
it's kind of hard to call it
Star Trek because it's so different, but

616
00:41:58,320 --> 00:42:00,360
yeah, it's really good. It's
a little bit a little bit darker and

617
00:42:00,440 --> 00:42:04,639
more mature than Star Trek that you
might be used to, but liking it.

618
00:42:05,760 --> 00:42:09,119
And next thing I'd like to throw
out there is at Ionic we just

619
00:42:09,159 --> 00:42:15,119
recently got done doing our Ionic comp
which was a virtual conference celebrating web development

620
00:42:15,199 --> 00:42:20,360
and technology and hybrid mobile development and
all that fun stuff. And we just

621
00:42:20,440 --> 00:42:23,360
put up all of our sessions on
YouTube, and so if you go to

622
00:42:23,519 --> 00:42:28,599
YouTube dot com slash Ionic Framework,
you can view all of our sessions for

623
00:42:28,719 --> 00:42:31,960
Ionic Comp. I actually I watched
some of it live. I watched the

624
00:42:32,079 --> 00:42:37,000
WebVR one. Yeah that one.
Well, Eli, thank you so much

625
00:42:37,079 --> 00:42:40,199
for coming on the show and teaching
us all about the wonders of Nest and

626
00:42:40,199 --> 00:42:44,559
man, you are a wonderful,
wonderful guest to have on, so seriously,

627
00:42:44,639 --> 00:42:45,960
thank you for taking time to join
us. Yes, thank you.

628
00:42:46,039 --> 00:42:49,360
I had a great time all right, well, that is a wrap.

629
00:42:49,400 --> 00:42:50,280
We'll see you next time.
