1
00:00:00,000 --> 00:00:05,131
[MUSIC]

2
00:00:05,131 --> 00:00:10,299
JavaScript which was designed
as a scripting language for

3
00:00:10,299 --> 00:00:15,420
the browser has seen deployment
far beyond the browser.

4
00:00:15,420 --> 00:00:20,760
Node.js has played
a significant role in the shift

5
00:00:20,760 --> 00:00:25,840
of JavaScript from
the browser to the desktop.

6
00:00:25,840 --> 00:00:31,360
Let's now learn a little bit about what
node.js is and what role does NPM,

7
00:00:31,360 --> 00:00:37,406
the node package manager,
play in the context of node.js.

8
00:00:37,406 --> 00:00:40,570
Node.js as I mentioned earlier

9
00:00:41,830 --> 00:00:45,155
allows us to bring the power
of JavaScript to the desktop.

10
00:00:45,155 --> 00:00:49,790
Node.js is based on
the JavaScript run time engine

11
00:00:49,790 --> 00:00:54,070
that has been built for
the Chrome browser.

12
00:00:54,070 --> 00:00:59,380
So the Chrome V8 JavaScript Engine has
been ported from the browser to run

13
00:00:59,380 --> 00:01:03,875
on the desktop and support the execution
of JavaScript programs on the desktop.

14
00:01:03,875 --> 00:01:10,520
Node.js is built around it event-driven,
non-blocking I/O model.

15
00:01:10,520 --> 00:01:15,025
Which makes it very efficient to run
JavaScript programs on the desktop,

16
00:01:15,025 --> 00:01:18,610
asynchronous JavaScript on the desktop.

17
00:01:18,610 --> 00:01:22,580
Now this is where Node
finds its true polish.

18
00:01:23,850 --> 00:01:27,460
Right now,
we will examine Node.js in the context of

19
00:01:28,580 --> 00:01:31,380
its use as a JavaScript runtime.

20
00:01:31,380 --> 00:01:37,078
We will look at the server-side
application of Node.js

21
00:01:37,078 --> 00:01:42,425
in detail in the last course
of this specialization.

22
00:01:43,575 --> 00:01:47,115
This is the typical
architecture of Node.js.

23
00:01:47,115 --> 00:01:51,845
So in this, the Chrome V8
engine is at the bottom layer,

24
00:01:51,845 --> 00:01:57,690
together with libuv forms,
the layer that interacts with

25
00:01:57,690 --> 00:02:03,060
the underlying computer system to support
the execution of JavaScript programs.

26
00:02:03,060 --> 00:02:07,662
On top of it, we have Node Bindings,
which are also implemented in C++.

27
00:02:07,662 --> 00:02:11,283
At the top layer you have the Node.js and
Standard Library,

28
00:02:11,283 --> 00:02:14,315
which are all implemented in JavaScript.

29
00:02:14,315 --> 00:02:18,325
And this is what enables us to
write JavaScript programs and

30
00:02:18,325 --> 00:02:19,865
run them on the desktop.

31
00:02:21,335 --> 00:02:26,035
Naturally, the ability to run
JavaScript programs on the desktop

32
00:02:26,035 --> 00:02:28,930
energized the web development community.

33
00:02:28,930 --> 00:02:33,440
To explore using JavaScript
to develop a significant

34
00:02:33,440 --> 00:02:36,180
number of web development tools.

35
00:02:36,180 --> 00:02:40,850
Tools such as Bower, Grunt,
Gulp, Yeoman and many others.

36
00:02:40,850 --> 00:02:45,280
We will explore some of these in
the later part of this course and

37
00:02:45,280 --> 00:02:47,600
in subsequent courses.

38
00:02:47,600 --> 00:02:50,320
The last course in the specialization,
as I mentioned,

39
00:02:50,320 --> 00:02:54,090
looks at the use of Node.js
on the server side.

40
00:02:54,090 --> 00:02:57,330
How we can develop Web
server business logic,

41
00:02:57,330 --> 00:03:01,440
all implemented in JavaScript
on the server side.

42
00:03:02,520 --> 00:03:04,240
Together with Node,

43
00:03:04,240 --> 00:03:09,460
you often hear people talking about
the Node Package Manager, or NPM.

44
00:03:09,460 --> 00:03:14,060
When you install Node on your computer,
NPM automatically gets installed.

45
00:03:14,060 --> 00:03:18,470
The Node Package Manager,
is the manager for

46
00:03:18,470 --> 00:03:22,540
the Node ecosystem,
that manages all the Node modules and

47
00:03:22,540 --> 00:03:28,350
packages that have been made publicly
available by many different users.

48
00:03:28,350 --> 00:03:34,110
A typical Node package consists of,
JavaScript files together with

49
00:03:34,110 --> 00:03:41,565
a file called package.json which is
the manifest file for this Node module.

50
00:03:41,565 --> 00:03:46,474
We will look at how we can
use the package.json file

51
00:03:46,474 --> 00:03:50,825
in more detail in
the subsequent exercises.

52
00:03:50,825 --> 00:03:56,659
[MUSIC]