Topic 2 Flashcards

1
Q

What are some examples of JS frameworks?

A

Ember, Angular, and React

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

______ forces developers to adopt a known and well-regarded approach to structuring and implementing a web application. Uses MVC pattern

A

Ember

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

_______ has similarities with Ember, and is maintained by google

A

Angular

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

_____ is a newer framework developed by Facebook. Not completely MVC though, it focuses more in view

A

React

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

_______ is a development framework based in Google’s V8 JS engine

A

Node.js

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Node.js code is written in JS and then compiled by what?

A

by V8 into machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does MEAN stand for in MEAN stack?

A

MongoDB-Express_Angular_Node.js

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Node.js was developed when and by who?

A

2009 by Ryan Dahl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why was Node.js created?

A

It was an answer to the frustration caused by concurrency issues, especially when dealing with web services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Node.js is a ______ -side environment that matches the ______-side environment in the browser.

A

server, client

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are some advantages to using Node.js?

A

Server/client share the same syntax, non-blocking frameworks, open community got libraries, and easy to set up.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does Node.js work?

A

Apache- Each user has their own thread, which handles requests from that user.
Each request is passed to the “kernal mode” where the thread will wait for the instruction to be handled (a blocking web server)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does it mean when a web server is non-blocking?

A

It is able to have multiple requests in progress at the same time by the same process (or thread)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the global object?

A

A preloaded library of objects in Node.js (like a namespace)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the most widely used objects in global?

A

The console object (typically used for debugging/ outputting)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The process object, another object found in the global namespace, gives us what information about the current process?

A
  • environment info
  • environment variables
  • communication between standard input and output
  • give is the ability to kill the current process
  • etc
17
Q

Give some examples of the process object

A
  • process.argv -> an array of the arguments that started the process
  • process.stdout.write -> console.log
  • process.stdin.on -> creates listener
  • process.exit
18
Q

_______ functions in the global object allow us to control the process asynchronously

A

Timing

19
Q

What does the “require” function allow us to do?

A

Import other node.js modules

20
Q

____ ________ are libraries that provide extra functionality

A

Node Modules

import them with require (module)

21
Q

The _____ module provides methods for working with files and directories.

A

path. Some examples include dirname, basename, format, join, etc

22
Q

How would you export a custom module?

A

global.module.export

23
Q

The ______ module allows us to create, emit, and listen for our own created events.

A

events

24
Q

The _____________ module provides the ability to spawn child processes.

A

child_process.

ex child_process.exec(command [ ,options][ ,callback[) for quick stuff, child_process.spawn for long stuff