1
00:00:00,430 --> 00:00:07,120
All right, at this point, we're familiar with two types of modules, our own, as well as the nodes

2
00:00:07,120 --> 00:00:15,840
built in ones, but just like in any good infomercial, I'll say, but wait, there's more.

3
00:00:16,390 --> 00:00:19,920
We also have access to the world's biggest code store.

4
00:00:20,650 --> 00:00:26,290
And before you seriously start questioning my mental state, imagine the scenario.

5
00:00:26,860 --> 00:00:27,940
You're building an app.

6
00:00:28,600 --> 00:00:33,630
And of course, as any good app, it needs to have a slider just for fun.

7
00:00:34,540 --> 00:00:37,320
Now, of this point, you generally have two options.

8
00:00:38,140 --> 00:00:43,570
Build it from the scratch yourself or search on Google and copy paste.

9
00:00:43,870 --> 00:00:49,400
Someone else's solution will have no issues with either of these options.

10
00:00:49,870 --> 00:00:55,060
Keep in mind that someone, somewhere has struggled with the same issue.

11
00:00:56,020 --> 00:01:04,629
The need for the slider and there's a good chance that that person was kind enough to build it and share

12
00:01:04,840 --> 00:01:13,540
the whole project with us, so our only job is to go through the docks and with the help of one command,

13
00:01:13,960 --> 00:01:15,360
just add it to our project.

14
00:01:16,440 --> 00:01:26,040
We can do that because when we install node, we automatically also install LPM or node package manager

15
00:01:26,580 --> 00:01:36,480
and NPM enables us to do three things reuse our own code in other projects, use code written by other

16
00:01:36,480 --> 00:01:42,500
developers, and lastly, share our own solutions with other developers as well.

17
00:01:43,020 --> 00:01:48,690
The NBN project is hosted at NPM J.S. Dotcom.

18
00:01:48,690 --> 00:01:52,440
Again, the site is and PM Jass dot com.

19
00:01:52,770 --> 00:02:00,750
And here you can find everything, starting with useful utility functions to full blown frameworks and

20
00:02:00,750 --> 00:02:01,290
libraries.

21
00:02:01,620 --> 00:02:08,400
And as an example, if you're familiar with Riak, you know that react as the create, react and package.

22
00:02:08,740 --> 00:02:12,720
And of course it is hosted on the AMPM.

23
00:02:13,200 --> 00:02:20,940
A typical node project will have more than unopened packages installed as dependencies.

24
00:02:21,480 --> 00:02:28,980
And before we install some cool packages, let's talk about naming and B.M. calls the reusable code

25
00:02:29,160 --> 00:02:34,550
a package and a package essentially is a folder that contains a JavaScript code.

26
00:02:35,280 --> 00:02:43,680
Now another names, you hear our modules and dependencies and are honestly at this point, all three

27
00:02:43,680 --> 00:02:48,350
are used interchangeably when talking about shareable JavaScript code.

28
00:02:48,660 --> 00:02:54,510
So don't be surprised if during the course I call them any of these names, package, dependency or

29
00:02:54,510 --> 00:02:57,360
module, then they all mean the same thing.

30
00:02:57,850 --> 00:02:59,940
Lastly, let me just mention two things.

31
00:02:59,950 --> 00:03:04,170
First, there is no quality control in NPM registry.

32
00:03:04,950 --> 00:03:06,930
Anyone can publish anything.

33
00:03:07,530 --> 00:03:11,490
So it's up to you to sniff out the empty and useless packages.

34
00:03:11,700 --> 00:03:15,360
And yes, there are quite a few of those ones out there as well.

35
00:03:15,900 --> 00:03:23,180
A good indication of the security and usefulness of package is the amount of weekly download.

36
00:03:23,640 --> 00:03:29,700
If the numbers are high, meaning if it's popular, it's a good chance that it's a battle tested and

37
00:03:29,700 --> 00:03:30,330
ready to go.

38
00:03:30,750 --> 00:03:33,240
And that brings me to my second point.

39
00:03:33,570 --> 00:03:36,930
Remember the slider example we discussed in the beginning of the video?

40
00:03:37,350 --> 00:03:44,730
When it comes to NPM packages, there's is a good chance that if there is a bug, someone else has already

41
00:03:44,730 --> 00:03:51,860
fixed it and as a result, it's already fixed in the package or there's a working solution.

42
00:03:52,560 --> 00:03:52,970
All right.

43
00:03:53,460 --> 00:04:00,150
So what you did for entra, let's start using node package manager in our own project.

44
00:04:00,480 --> 00:04:05,950
And as a side note, if you want to search for some packages, just visit AMPM.

45
00:04:06,420 --> 00:04:08,900
Jay has not come and line.

46
00:04:08,910 --> 00:04:13,440
For example, if you're looking for a bootstrap, you'll find a package.

47
00:04:13,770 --> 00:04:16,260
And of course, you can click on any of them.

48
00:04:16,510 --> 00:04:22,650
This will bring you to the docs as well as weekly downloads and rest of the stuff.

