1/103
Looks like no tags are added yet.
what is TCP?
transmission control protocol, used for reliable packet sending, point 2 point
what is IP?
internet protocol, used for addressing computers and routing packets to them
what is an IP address?
a 32 bit number that addresses a device
how is an IP address organised?
divided into octets, IPv4 has 4 octets, IPv6 has 8 octets of hexadecimal digits
what is a local IP address?
an IP address assigned to a computer for use within a local network
what is a public IP address?
an IP address that people outside an internal network can use to send packets (data) to a computer
what is a socket address?
an IP address with a port number added to the end, to create an endpoint for network communication
what is a port?
a 16 bit number, (65k) services can run on a single IP address
what is DNS?
domain name system, acts as a contact book for IP addresses
what does the DNS do?
converts human-readable domain names (from URL) into an IP address
who can change the IP of a domain?
only the domain owner
who sells and assigns the domain to the domain owner?
registrar
what is HTTP?
hypertext transfer protocol (the main protocol of the web)
what are the main qualities of HTTP?
client-server
stateless
request-respond
what does it mean for HTTP to be stateless?
each request is independent, the server forgets old requests
what does the command “curl http://knowt.com” do?
shows the html content of the page
what are the main methods that can be used on HTTP?
GET
POST
PUT
DELETE
what is a header for HTTP?
conveys metadata about the request or response
what is a status code?
tells you what happened to the request
why is HTTPS generally used by default?
HTTP is insecure
what is HTTP also used for?
to implement REST APIs
GET /doc/text.html HTTP/1.1
HOST: www.example.com
User-Agent: Mozilla/4.0
Content-Length: 28
userid=shahs&search=Anh+Dinhwhat would a response look like to this request?
HTTP/1.1 200 OK
Date: Sun, 08 Feb 2022 01:11:12 GMT
Server: Apache/1.3.29
Content-Length: 21
Content-Type: text/html
<h1> My HomePgae </h1> what is HTTPS?
hypertext transfer protocol secure
how is HTTPS different from HTTP?
relies on public key cryptography to encrypt all data between the web browser and web server
what is a web server certificate?
certificate issued and assigned by an authority, only provided to domain owners, so that web clients can check the certificate provided is issues by a trusted authority and check against a standardised list of trusted authorities
what is HTML?
hyptertext markup language, allows you to write structure of a web page and link to other pages
what is CSS?
cascading style sheets, allows you to add style, markup, and design to webpages
what does JavaScript allow for?
allows actions to be completed on a page
what does FTP stand for?
file transfer protocol
what does SSH stand for?
secure shell
what does IMAP stand for?
internet message access protocol
what does SMTP stand for?
simple mail transfer protocol
what is ifconfig?
network interface (if) configuration (config), a legacy protocol that allows you to search the network interface configurations to manage IP addresses and route of current device
what is nslookup used for?
to query DNS server to get domain names and IP addresses, answers why you cannot reach a website by checking if the domain name resolves to the correct IP address
what is ping used for?
check if website, server, or device is online and reachable
what is an issue with using ping?
not fully reliable
what does traceroute do?
shows the route (sequence of routers) of packets from the machine to a target web server, to reveal network bottlenecks/failures and visualise the network hops across the internet
what does curl do?
transfer data to and from a server, for testing HTTP(S), FTP, REST APIs
what is telenet?
an insecure protocol for remote login, tests TCP connections to any service & port by sending raw commands
what is ssh?
a secure remote terminal, running on port 22, to a control a server
what are SSH key pairs for?
access server without manual password entry
what is the main requirement for using ssh key pairs?
keep private key secure
what is a web client?
things that will allow you to go to a webserver and download information, such as curl, firefox, safari, chrome
what is a web server?
any computer that has a public IP address and an open port
what do web servers allow you to do?
run web application server and respond to requests (essentially runs websites)
what was the process for the early dynamic web?
client web browsers display HTML <form>, <input> for search boxes, login fields, feedback forms
user clicks [Submit]
web server runs a script using CGI
CGI executes an external program to get back with dynamic HTML content
what is the issue with the early dynamic web?
it is rarely used now because of its lack of scalability, only one process per request
how does the dynamic web work via MVC?
use of model view control
model is data/business logic
view is the HTML template with dynamic placeholders
controller links the model and view by calling code executed on server
hardcoded dependency frontend to backend
what is the issue with MVC frameworks?
it is difficult to add or change front ends
how does the dynamic web work via REST frameworks?
REST is used to send JSON data, implement entire application as one REST API and use it for multiple types of clients
what are the benefits of using REST frameworks for the dynamic web?
strongly separates data and presentation (backend is used for data and logic only)
allows you to use CRUD applications using HTTP methods
allows for microservices, as each entity or resource can have a separate server
why are REST frameworks standard practice for the dynamic web?
scalable architecture, easier for teamwork as responsibilities and code can be shared
what is a tech stack?
a combination of technologies that are used to implement web application
what are the three main parts of a tech stack?
front end
back end
database
what is an API?
application programming interface, a standard library of classes, interfaces, methods, and fields
what is REST?
representational state transfer, an architectural style for web applications and creating APIs
what does a REST API entail?
an API with
a base URI
standard HTTP methods
a media type that defines data elements
REST API and documentations
what are the 6 constraints for REST API?
uniform interface
stateless
cacheable
client-server
layered system
(optional) code on demand
what are the CRUD equivalences for HTTP methods?
Create → POST
Read → GET
Update (replace) → PUT
Delete → DELETE
Update (modify) → PATCH
what are the main design conventions for REST APIs?
be as minimal as possible
for endpoints, use nouns (entities)
do not include verbs (actions)
use plural
GET is stateless
specify the format
object relations
use sub-resources to get related resources
make API version mandatory and use whole numbers
allow clients to flexibly deal with large results sets by parsing
move useful/commonly used tasks into more accessed paths
use status codes in HTTP method to inform clients of request’s execution
what does the 1xx status code mean?
informational, protocol-level info
what does the 2xx status code mean?
success, request was adapted successfully
what does the 3xx status code mean?
redirection, some additional action specified in the code for the client to complete the request
what does the 4xx status code mean?
client error, these error status cods point to a client issue
what does the 5xx status code mean?
server error, the server takes responsibility for the error status
what does the 200 status code mean?
OK
what does the 201 status code mean?
created
what does the 204 status code mean?
no content
what does the 304 status code mean?
not modified
what does the 400 status code mean?
bad request
what does the 403 status code mean?
forbidden
what does the 409 status code mean?
conflict
what does the 401 status code mean?
unauthorised
what does the 404 status code mean?
not found
what does the 500 status code mean?
internal server error
what is JHipster?
a text-stack generator
what is token forgery?
impersonating users
why must the jwtSecretKey be kept private and unique?
to avoid token forgery, elevation of privileges, session hijacking
what are the 4 layers of Springboot?
presentation
business
persistence
database
what function does the presentation layer serve in Springboot?
authentication and JSON translation
what function does the business layer serve in Springboot?
business logic, validation, and authorisation checks
usually optional
deals with sending a request to a different API
what function does the persistence layer serve?
connects to database and gets data out of it, usually a JPA repo, converts Java objects into things that a database can understand
what function does the database layer serve in Springboot?
the actual database, runs on the machine
what is the backend tech for JHipster?
Java/Springboot
Hibernate/JPA
liquibase
fakerJS
Swagger
CI/CD
Docker
what is Java/Springboot for?
has classes, program logic, responds to requests via REST
what is Hibernate/JPA for?
object relational mapping to create/evolve the database schema
what is FakerJS for?
database changesets to create/evolve the databse schema
what is Swagger for?
interface and documenting the REST API
what is CI/CD used for?
for continued integration and deployment to a cloud/VM
what is Docker used for?
to package the app to easily run anywhere and deploy
what is JDL?
JHipster Domain Language
what does JDL do?
creates human-readable, visuals, separate from code for entities, field+ types, and relationships between entities, to generate skeleton app template