1
00:00:07,810 --> 00:00:15,700
Let's understand to the question, why use experts if we have no chance?

2
00:00:16,120 --> 00:00:16,660
All right.

3
00:00:16,660 --> 00:00:18,490
So let's get rocking.

4
00:00:19,150 --> 00:00:25,270
The first point is that experts handle all low level details for us.

5
00:00:25,360 --> 00:00:33,550
Like I said in the previous video, that if we are using core or vanilla Node.js even to pass a simple

6
00:00:33,550 --> 00:00:41,320
data into the server, we need to write a lot of code to get it done, but express take away all these

7
00:00:41,320 --> 00:00:43,240
low level details for us.

8
00:00:43,510 --> 00:00:48,640
And the next point is that it has a huge developer community.

9
00:00:48,850 --> 00:00:55,810
Before you use a framework or library, make sure that it has a large developer community, meaning

10
00:00:55,810 --> 00:01:02,710
that in case you face a back problem, definitely there is someone who has that problem before.

11
00:01:02,710 --> 00:01:07,270
And the way finding solution to that won't be a problem at all.

12
00:01:07,870 --> 00:01:16,160
The next point is that express handle what is called data validation and Node.js server.

13
00:01:16,180 --> 00:01:24,250
You saw that when we are trying to send data into the server, we can send any payload or data into

14
00:01:24,250 --> 00:01:31,690
the server and to handle validation in Node.js only, it's going to be a little bit difficult, but

15
00:01:31,690 --> 00:01:33,760
experts make it pretty easy.

16
00:01:33,760 --> 00:01:36,310
And I will show you as we move on.

17
00:01:36,760 --> 00:01:40,310
The next point is what we call templating.

18
00:01:40,330 --> 00:01:47,680
Well, with Xpress we can use template engine like JS to display dynamic data.

19
00:01:48,400 --> 00:01:55,450
If we are using Node.js, you're going to be a little bit difficult to parse dynamic data into a HTML

20
00:01:55,450 --> 00:01:56,170
template.

21
00:01:56,170 --> 00:01:58,070
So what is template engine?

22
00:01:58,090 --> 00:02:03,430
Well, for this one, we have dedicated video to talk about template engine.

23
00:02:03,790 --> 00:02:11,950
A template engine is a combination of HTML with JavaScript, meaning that we can write JavaScript inside

24
00:02:11,950 --> 00:02:16,540
a HTML and we have a video talking about template engine.

25
00:02:16,540 --> 00:02:19,990
And apart from that, we have what is called routing.

26
00:02:20,020 --> 00:02:23,480
Well, do you remember on that web server in Node.js?

27
00:02:23,500 --> 00:02:27,280
Well, let me show you the code we wrote for Node.js server.

28
00:02:27,460 --> 00:02:35,290
And if you see how we are doing the routing inside Node.js, assuming that inside this particular route

29
00:02:35,290 --> 00:02:42,010
here or endpoint, you could have millions of code or hundreds of code inside this.

30
00:02:42,010 --> 00:02:47,440
So if you are using code on JS, routing is going to be difficult for us.

31
00:02:47,440 --> 00:02:54,760
But with EXPRESS, you're going to take away all this complexity from us to make it really easy for

32
00:02:54,760 --> 00:02:55,420
routing.

33
00:02:56,170 --> 00:03:02,290
The next point is what we call session management, and we have a section for this one to talk about

34
00:03:02,290 --> 00:03:08,770
authentication and authorization, where we talk about session management, talking about cookies and

35
00:03:08,770 --> 00:03:09,670
many more.

36
00:03:10,090 --> 00:03:18,100
And the next point is what you call error handling, which express handling error is pretty easy as

37
00:03:18,100 --> 00:03:20,740
compared to vanilla Node.js.

38
00:03:20,920 --> 00:03:29,860
So with this one in mind, the next video, let's have a look at the map of Learning Express JS.

