You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is Node.JS Node.js is an open-source, cross-platform, JavaScript-based runtime environment which enables server-side scripting. It is used to develop networking and server-side applications.
What is NPM? NPM (Node Package Manager) is a package manager for JavaScript and Node.js that allows developers to install and manage packages of reusable code.
What problem does Node.JS solve (Is there any problem that can be solved with Node.JS 🤔)? Node.js solves the challenge of building fast and scalable network applications. It allows developers to use JavaScript, a language they are already familiar with, to build back-end services like web applications, mobile APIs, microservices and real-time applications. Node.js also allows developers to share code between the server and the client, enabling code reusability and faster development cycles.
What is the V8 Javascript Engine? The V8 Javascript Engine is an open source high-performance Javascript engine developed by Google and used in their Chrome web browser. It is used to convert code written in Javascript language into fast machine code, so that webpages might work faster.
Is Node.JS really necessary in the Development ecosystem? Yes, Node.js is necessary in the development ecosystem due to its maintainability, scalability, and the ability to use JavaScript for both the front and back end. Additionally, it provides modules which are organized into JavaScript files and reusable throughout the Node.js application.
Why not use PHP or Golang? PHP is not suitable for web development due to its lack of restrictions and security issues, while Golang is not an object-oriented language and does not provide classes to use. Additionally, Node.js has better server-side I/O performance than both PHP and Golang.
What is the difference between Node.JS and any other browser? Node.js is a JavaScript runtime environment that allows you to run JavaScript code on the server, outside of a browser. Other browsers are used to run JavaScript code inside of a browser.
Are Node.JS and a browser the same? No. Node.js is a JavaScript runtime environment for running server-side code and handling server-side tasks, while a browser is used for viewing and interacting with webpages and applications.
What is NVM and Why is it useful for Node.JS developers? Node Version Manager (NVM) is a tool used to manage multiple active Node.js versions, allowing developers to quickly install and use different versions of Node.js via the command line. It also helps keep developers away from errors and switch between different versions of Node on a per-shell basis.
Node.JS Module System Core Understanding
What is a Javascript Module?A Javascript Module is a piece of pre-written code that can be reused in other programs.
Why are Javascript Modules necessary?Javascript Modules are necessary for code organization and for preventing dependencies from conflicting.
What module standards are available in Node.JS?The module standards available in Node.JS are ESModules and CommonJS modules.
What are the differences between ESModules and CommonJS modules?The main difference between ESModules and CommonJS modules is that ESModules use static imports and exports, while CommonJS modules use require and module.exports.
Which types of modules exist in Node.JS?The types of modules that exist in Node.JS are ESModules, CommonJS modules, and JSON modules.
Why do we run the npm init command and not node init to create a new Node.JS project? Npm init is used to create a package.json file for a Node.JS project, which is used for configuration. Node init is not a valid command.
When you entered the npm init command and answered the questions you saw in the terminal, a new file called packacke.json was generated.
What does this file do?The package.json file is a manifest file that describes the attributes and dependencies of the project.
Why is this file generated?This file is generated to provide a consistent way to manage and track all the information associated with a project, including its dependencies and versions.
What is a Server? A server is a computer or program that distributes resources or supplies services to other computers or programs (known as clients) that are connected across a network.
What is a Client? A client is a computer or program that requests services or resources from a server over a network.
Is a server just another physical computer? Yes, a server is just another physical computer.
Why do we refer to a certain class of applications as Servers? We refer to a certain class of applications as servers because they provide services to other computers on a network.
What is the difference? The main difference between a server and a client is that a server provides services or resources to clients, while a client requests services or resources from a server.
Is there any similarity between human communication and the client-server model? Yes, there is a similarity between human communication and the client-server model. Both are based on exchanging information in a two-way communication system, where one party ("the client") requests information or a service from another ("the server") and the server provides it.
List some examples A person ordering food at a restaurant (client) and the waiter delivering the food (server), or a person making a phone call (client) and the other person answering the call (server).
Is the client-server model applicable only to the Web? No, the client-server model can be applied to many different types of applications. It is most commonly used in applications like web services, web applications, email, file sharing, and remote computer access.
Do desktop applications use the client-server model? Yes, desktop applications can use the client-server model, such as a messaging application that connects to a messaging server to send and receive messages.
Can you mention any other example of this model outside the Web? Other instances of the client-server model that are not limited to the Web, such as servers for email, files, and databases.
HTTP Core Understanding
What is HTTP? HTTP (Hypertext Transfer Protocol) is a protocol used for communications between servers and web clients. It is the foundation for data communication for the World Wide Web. HTTP allows clients (e.g. web browsers) to communicate with servers that host websites and sends and receives information in the form of messages.
What is a Communication Protocol? A communication protocol is a set of rules that govern how two or more entities communicate with each other. These rules define how data is transmitted and include message types, transmission sequences, error handling, and more.
Do humans use communication protocols? Yes, humans use communication protocols.
What is a Request in HTTP? A request in HTTP is a message sent from a client to a server asking for some sort of information or resource.
What is a Response in HTTP? In HTTP, a response is a message sent from a server in response to a client's request. It typically consists of a status line, headers, and a message body.
What is an HTTP method? HTTP methods are the actions most commonly used by clients to interact with a web server. Common methods are GET, POST, PUT, and DELETE.
What are HTTP request headers? HTTP request headers are fields of information sent by a user agent (such as a web browser) to a server to provide context and additional information about the request. They contain metadata associated with the request, such as the requested resource, the user agent submitting the request, authentication details, and other information.
APIs Core Understanding
What is an API? An API (Application Programming Interface) is a set of functions, protocols, and tools that developers can use to build software applications. APIs allow developers to access data and functionality from other applications, services, and databases, making it easier to combine and mash up data from multiple sources.
What is a Protocol? A protocol is a set of rules and standards that define how information is exchanged between two or more devices across a network.
Is the term API only applicable to the communication of programs over the Internet? No, the term API is not only applicable to the communication of programs over the internet. An API is a type of software interface that enables two or more computer programs to communicate with each other.
Why is structured communication between two programs important? Structured communication between two programs is important because it enables efficient and reliable data exchange between the two systems. Structured communication also helps to ensure data integrity, security and consistency.
Do we humans use APIs when communicating without technology? No, humans do not use APIs when communicating without technology. APIs are used to enable communication between two systems or applications, and are not necessary for human-to-human communication.
Is an API just another program or a standard? A API is neither a program nor a standard. APIs are an interface that allow separate applications and systems to communicate with each other, regardless of the platform or language.
Do you know any API? Can you list at least 5 examples of APIs?1. Google Maps API2. Amazon Web Services (AWS) API3. Twitter API4. Facebook API5. Stripe API
From JSON to REST
What is JSON? JSON (JavaScript Object Notation) is a text-based, human-readable data interchange format used primarily to transmit data between a server and web application, as an alternative to XML. It is based on a subset of the JavaScript programming language and is used as a data format for many web services and APIs.
Is JSON the same as a plain Javascript object? No, JSON (JavaScript Object Notation) is a lightweight data-interchange format, but is it not the same as a plain JavaScript object. JSON is based on structural conventions from JavaScript objects and has a syntax that is recognizable to JavaScript, but is not exactly the same.
What is REST? REST (Representational State Transfer) is a type of software architecture that allows different applications to communicate with each other over the web using existing web standards such as HTTP. It is a popular way to access and modify data, and is a powerful alternative to SOAP.
Is REST a programming language, framework, technology, or architecture pattern? REST is a software architectural style because it provides a set of design rules to create stateless services that are scalable, extensible, and modifiable.
What is a Resource in REST? A resource in REST is an entity or object that can be accessed by an HTTP request, typically through a RESTful API. A resource typically represents a single data object, such as a customer, product, or order.
What is a resource identifier? A resource identifier is a unique identifier for a resource, such as web pages, digital images, web services, and databases. It can be used as a reference to quickly locate the specified resource.
How are HTTP and REST related? HTTP and REST are related in that REST is an architectural style that can be implemented using HTTP, but it is not necessarily tied to HTTP. REST is a simple way to organize interactions between independent systems, inspiring the design of web services, such as those using HTTP.
What HTTP methods does REST use within its architecture rules? REST uses the HTTP methods GET, POST, PUT, DELETE, HEAD, and OPTIONS to perform operations on resources. HTTP is a connectionless protocol that is stateless and can transmit any data.
Why do we use HTTP methods in REST and how do they relate to resources? They are used to create a uniform interface for distributed systems that rely on predefined methods
Is REST the same as HTTP? No, REST and HTTP are not the same thing. HTTP stands for HyperText Transfer Protocol and is a way to transfer files, while REST is an architectural style that doesn't care about the building materials per say.
REST API Clients
Postman only works with REST APIs? No, Postman can work with any type of API, including SOAP, GraphQL, and gRPC.
Is there an alternative to Postman? Yes, there are many alternatives to Postman, such as Insomnia, cURL, REST Client (for VS Code), Paw, SoapUI, HTTPRequester, OkHttp, and Advanced REST Client.