Technical (Networking) Flashcards

1
Q

What does JSON stand for, and what is its primary purpose in web development?

A

JSON (JavaScript Object Notation) is a text-based file format that uses human-readable text to store and transmit data objects. JSON is a lightweight, language-independent, and self-describing data interchange format. It is based on a subset of the JavaScript programming language and is easy to understand and generate.
JSON is used to exchange data between web clients and web servers. It is also used to store temporary data, such as user-generated data from a submitted form on a website. JSON can be used as a data format for any programming language to provide a high level of interoperability.

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

Describe the basic structure of a JSON object

A

A JSON object is an unordered collection of name/value pairs. The name is a string, and the value can be a string, number, boolean, null, array, or object. The syntax is:
{
“name1”: “value1”,
“name2”: 2,
“name3”: true,
“name4”: [1,2,3],
“name5”: {
“name6”: null,
“name7”:34
}
}

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

How does JSON differ from XML in terms of data representation and usage?

A

JSON supports only text and number data type. XML support various data types such as number, text, images, charts, graphs, etc. It also provides options for transferring the structure or format of the data with actual data.
JSON (JavaScript Object Notation) is a format for storing and transmitting data. XML (eXtensible Markup Language) is a language for representing data in a machine-readable way. JSON is a good choice for data storage, APIs, and mobile apps. XML is better suited for complex document structures that require data exchange.

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

Can you give an example of a valid JSON object? Explain the purpose of each key-value pair.

A

{
“name”: “Name”, //provide person’s name
“lastName”: “LastName”, //provide person’s last name
“age”: 65, //provide person’s age
“work”: null, //provide person’s workplace
“email”: { //provide person’s emails (work email + personal email)
“workEmail”: “worl@dfd.com”,
“personal”:”pers@sff.com”
}
}

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

What does HTTP stand for, and what is its fundamental purpose in web communication?

A

HTTP (HyperText Transfer Protocol) is used for exchanging information over the internet. Main protocol to exchange information between client and server; any info can be transferred through it

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

Explain the difference between HTTP and HTTPS

A

HTTPS is secured (use TLS/SSL to encrypt normal HTTP requests), HTTP is not secured

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

What are the main components of an HTTP request?

A

Request line (method, request-uri, protocol version), headers, message-body

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

What are HTTP methods (verbs)?

A

GET - to request data from a resource,
POST - to send data to a server,
PUT - to update data on the server,
HEAD - to ask for a response identical to that of a GET request, but without a response body,
DELETE - to delete some data from the server,
PATCH - provides entity containing a list of changes to be added,
OPTIONS - to request information about communication options available

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

Describe the purpose and differences between GET and POST methods in HTTP

A

GET is used to request data from a resource; harmless for the data, can be bookmarked, can be cached, parameters remain in browser history, have restrictions of data length, only ASCII characters allowed, a bit less secure, data is visible to everyone in URL.
POST is used to send data to a server to create/update resource; data is completely re-submitted, can’t be bookmarked, parameters are not saved in browser history, no data length or data type restrictions, a bit safer that GET, data is not visible in URL

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

Describe the purpose and differences between PUT and PATCH methods in HTTP

A

Both sends data to the server, but PUT changes all data, PATCH can modify only some specified parts

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

What is the status codes in HTTP responses?

A

100-199 - Informational
200-299 - Successful
300-399 - Redirects
400-499 - Client side errors
500-599 - Server side errors
200 - OK
201 - created
204 - no content
304 - not modified
400 - bad request
401 - unauthorized
403 - forbidden
404 - not found
409 - conflict
500 - internal server error

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

Describe the concept of cookies in HTTP. How are they used for maintaining state?

A

HTTP cookies are small pieces of data that a web server sends to a user’s web browser. The browser stores the cookies and sends them back to the server with each request. Cookies are used to identify a client and maintain information about the client’s state. They are built specifically for Internet web browsers to track, personalize, and save information about each user’s session. Cookies are created to identify you when you visit a new website. There are three types of computer cookies: session, persistent, and third-party. Session cookies are temporary and only last for the duration of the user’s visit to the website. Persistent cookies are stored on the user’s computer for a longer period of time.

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

Explain differences between a LAN (Local Area Network) and a WAN (Wide Area Network)

A

A LAN (Local Area Network) is a network that covers a small geographical area, such as a home, office, or group of buildings. A WAN (Wide Area Network) is a network that covers larger geographical areas that can span the globe

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

What is an IP address, and how is it used in networking?

A

IP (Internet Protocol) is a unique numerical identifier for every device or network that connects to the internet; used for identifying and locating network devices

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

Explain the difference between IPv4 and IPv6

A

IPv4 have smaller length (4 octets of 8 bits, 32 bits overall), IPv6 (4 octets of 32 bits, 128 bits overall).

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

Differentiate between TCP and UDP. When would you use each?

A

TCP send and receive package in the order of sending; UDP in random order. TCP doesn’t allow file lost, UDP does => TCP is secured, UDP is not

17
Q

Explain the purpose of DNS (Domain Name System) in networking.

A

DNS is used to convert ip addresses to names and vise-versa.

18
Q

What does URL stand for, and what is its purpose in web browsing?

A

URL (Uniform Resource Locator) is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it

19
Q

Explain the components of a URL and their respective roles in identifying a web resource.

A

Protocol, hostname, domain, top level domain, resource, parameters
http://www.google.com/forms/googleforms/api?form_name=my_form

20
Q

What is the difference between absolute URLs and relative URLs? Provide examples of each.

A

An absolute URL is a complete address that leads to a file or resource, while a relative URL points to a file relative to the current directory or file.
An absolute URL includes the full protocol, domain name, domain extension, path, query parameter, query string, and fragment. For example, an absolute URL might be “http://www.yourserver.example/images/myimage.jpg”.
A relative URL uses only a certain section of the URL to make the web browser resolve the address of the resource or the web document. For example, if you are in the root web directory, your image is in “images/myimage.jpg”.
Relative URLs are shorter and more portable than absolute URLs, but you can only use them to reference links on the same server as the page that contains them.

21
Q

What is XML?

A

XML stands for EXtensible Markup Language;
XML was designed to carry data, not to display data;
XML tags are not predefined. You must define your own tags.

22
Q

What is API?

A

Application Programming Language is the interface implemented by app which allows other apps to communicate with it