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

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

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

4
00:00:15,395 --> 00:00:20,760
Node.js has played a significant
role in this 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,526
Let's now learn a little bit about what
Node.js is and what role does NPM,

7
00:00:31,526 --> 00:00:36,138
the Node Package Manager,
play in the context of Node.js.

8
00:00:38,042 --> 00:00:40,786
Node.js, as I mentioned earlier,

9
00:00:40,786 --> 00:00:45,930
allows us to bring the power
of JavaScript to the desktop.

10
00:00:45,930 --> 00:00:50,170
Node js is based on the JavaScript runtime

11
00:00:50,170 --> 00:00:54,070
engine 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:07,447
Node.js is built around an event-driven,

15
00:01:07,447 --> 00:01:13,275
non-blocking I/O model which makes
it very efficient to run JavaScript

16
00:01:13,275 --> 00:01:18,737
programs on the desktop,
asynchronous JavaScript on the desktop.

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

18
00:01:23,850 --> 00:01:31,380
Right now we will examine Node.js in the
context its use as a JavaScript runtime.

19
00:01:31,380 --> 00:01:36,958
We will look at the server
side application of Node.js

20
00:01:36,958 --> 00:01:42,425
in detail in the last course
of this specialization.

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

22
00:01:47,438 --> 00:01:52,635
So in this, the Chrome V8 engine
is the bottom layer together with

23
00:01:52,635 --> 00:01:57,690
libuv, forms the layer that interacts with

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

25
00:02:03,060 --> 00:02:06,375
On top of it we have Node Bindings
which is also implemented in C++.

26
00:02:06,375 --> 00:02:11,005
At the top layer you have the Node.js and

27
00:02:11,005 --> 00:02:15,125
Standard Library, which are all
implemented in JavaScript and this is what

28
00:02:15,125 --> 00:02:19,865
enables us to write JavaScript
programs and run them on the desktop.

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

30
00:02:26,035 --> 00:02:30,910
energize the web development
community to explore using

31
00:02:30,910 --> 00:02:36,180
JavaScript to develop a significant
number of web development tools.

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

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

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

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

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

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

38
00:02:57,330 --> 00:03:02,520
all implemented in JavaScript
on the server side.

39
00:03:02,520 --> 00:03:06,490
Together with Node you often
hear people talking about

40
00:03:06,490 --> 00:03:09,460
the Node package manager or NPM.

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

42
00:03:14,060 --> 00:03:20,265
The Node package manager is
the manager for the Node ecosystem.

43
00:03:20,265 --> 00:03:22,540
It manages all the Node modules and

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

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

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

47
00:03:41,580 --> 00:03:46,384
We will look at how we can
use the package.json file

48
00:03:46,384 --> 00:03:50,642
in more detail in
the subsequent exercises.

49
00:03:50,642 --> 00:03:56,659
>> [MUSIC]