Concepts Flashcards

1
Q

SDLC

A

Planning
Analysis
Design
Implementation
Testing
Deployment
Maintenance and Support

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

MVC

A

Model
-data and business logic
-data validation, database interactions
-retrieve and store information

View
-user interface of the application
-the View receives data from the Model and renders it in a suitable display format, such as HTML

Controller
-intermediary between the Model and View. It receives user input and invokes the appropriate actions on the Model to process the input and update the data
-receives HTTP requests from client’s browser, processes them, and returns an HTTP response

Benefits
-modularity, reusability, testability, scalability

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

DOM

A

The document object model is a programming interface for web documents. It represents the structure of an HTML or XML document as a hierarchal tree of objects.

DOM components
1. Document
- At the top of the DOM tree, represents entire web page

Nodes of the DOM

  1. Elements
    - building blocks of HTML, represent components of a web page, such as headings, paragraphs, images, buttons, etc.
  2. Attributes
    - associated additional properties for HTML elements (id, class, src)
  3. Text Nodes
    - represent the textual content within HTML elements
  4. DOM API
    - provides a rich set of APIs that allow web document manipulation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Docker

A

A platform and tool designed to make it easier to create, deploy and run applications using containers

Dockerfile
-text file that contains instructions for building a Docker image using docker build

Docker Image
-standalone, executable package that contains all the dependencies and configuration needed to run a specific application

Container
-running a Docker image using the Docker engine
-can be pulled from a Docker registry or built locally using a Dockerfile

Docker containers rely on the host OS kernel for execution

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

Pass by Reference vs Pass by Value

A

Pass by Value
- a copy of the actual value of the argument is passed to the function. any changes made to the parameter inside the function do not affect the original variable passed as an argument

Pass by Reference
- a reference or pointer to the memory location of the argument is passed to the function. Any changes made to the parameter inside the function directly affect the original variable passed as an argument

Java is always pass by value
Python is pass by object reference
-immutable objects are not modified outside of scope of functions (ints)
-mutable objects are modified (lists)

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

Benefits of interfaces in Java

A

Abstraction and encapsulation

Multiple inheritance
- a class cannot extend multiple classes, but can implement multiple interfaces

Polymorphism
- objects of different classes can be treated uniformly based on their common interface
- enables more flexible and modular code, as classes can be used interchangeably as long as they implement the required interface

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

ERP

A

Enterprise resource planning solutions are software systems designed to integrate and manage core business processes across an entire organization.

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

REST vs SOAP APIs

A

SOAP is stateful, it maintains the state of each client server interaction, often requires session management
- typically uses XML

REST is stateless, each request from the client to the server contains all the information necessary to process the request
- typically uses JSON

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

Secondary keys in SQL

A

An index that is created in a column or set of columns other than the primary key of a table.

  • improves query performance
  • non unique
  • index structure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Normalization vs denormalization

A

Normalization
- the process of organizing data in a relational database to minimize redundancy and dependency
- favored for maintaining data integrity, consistency, and reducing the risk of anomalies
- supports the principle of a single source of truth, where each piece of data is stored in only one place

Denormalization
- process of adding redundant data to one or more tables in a database to improve query performance by reducing the need for joins or aggregation operations

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

Machine learning

A

A subset of artificial intelligence that focuses on the development of algorithms and statistical models that enable computers to learn from and make predictions or decisions based on data, without being explicitly programmed to do so.

Supervised learning
- algorithm is trained on a labeled dataset, each input data point is associated with a corresponding target or label. The algorithm learns to map inputs to outputs by observing examples of input-output pairs
- e.g. classification

Unsupervised learning
- the algorithm is trained in an unlabeled dataset, where the algorithm tries to find patterns or structure in the data without explicit guidance.
- e.g. clustering (grouping similar data points) and dimensionality reduction (reducing the number of features in the dataset)

Reinforcement learning
- an agent learns to interact with an environment by taking actions and receiving feedback or rewards based on those actions. The goal of the agent is to maximize the cumulative reward over time.
- e.g. trial and error learning, robotics, autonomous systems

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

CAP Theorem

A

Consistency
- all nodes in the system have the same data at the same time

Availability
- every request made to a non failing node in the system receives a response, the system remains operational in the face of failures

Partition tolerance
- system’s ability to continue functioning despite network partitions or communication failure between nodes

Sql dbs prioritize consistency over availability and partition tolerance

noSql dbs prioritize availability and partition tolerance over strong consistency. Utilize eventual consistency

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

ACID

A

Atomicity
- each transaction is treated as a single unit of work that either completes successfully or fails entirely

Consistency
- database remains in a valid state before and after the execution of transactions
- enforces integrity constraints, business rules, and referential integrity to ensure that only valid data is written to the database

Isolation
- ensures that the concurrent execution of multiple transactions does not interfere with each other

Durability
- once a transaction is committed, its changes are permanent and will not be lost, in the event of a system failure or crash

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

Database sharding

A

Used to horizontally partition large databases across multiple servers or nodes. Each shard contains a subset of the data, and collectively, the shards hold the entire dataset. Improved scalability and performance for handling massive volumes of data and high query loads.

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

What happens when URL is entered in a browser

A
  1. URL Parsing
    * Step: The browser first parses the entered URL.
    * Explanation: The URL is broken down into its components (e.g., protocol, domain name, path, query parameters). For example, in https://www.example.com/path/page?query=1, the protocol is https, the domain is www.example.com, the path is /path/page, and the query parameter is ?query=1.
  2. DNS Resolution
    * Step: The browser checks the domain name to find its corresponding IP address using DNS (Domain Name System).
    * Explanation:
    • The browser looks in its cache to see if it has the IP address for the domain already stored. If not, it sends a request to the DNS server.
    • The DNS server translates the human-readable domain name (e.g., www.example.com) into an IP address (e.g., 192.168.1.1), which represents the server where the website is hosted.
  3. TCP Connection
    * Step: The browser establishes a connection with the server hosting the website.
    * Explanation:
    • The browser initiates a TCP (Transmission Control Protocol) handshake with the server to establish a stable connection.
    • The handshake involves three steps: the client sends a SYN (synchronize) request, the server responds with a SYN-ACK (synchronize-acknowledge), and the client sends an ACK (acknowledge) back to the server.
  4. SSL/TLS Handshake (if HTTPS)
    * Step: If the connection is over HTTPS, the browser and server perform an SSL/TLS handshake.
    * Explanation:
    • The browser and server exchange cryptographic keys and agree on encryption methods to secure the communication.
    • The server sends its SSL certificate, which is verified by the browser to ensure the site is trusted and authentic.
  5. HTTP Request
    * Step: The browser sends an HTTP request to the server.
    * Explanation:
    • The browser constructs an HTTP request for the specific resource (e.g., the web page or a particular file) using the path and query parameters from the URL.
    • The request might include additional data like cookies, headers, or authentication tokens depending on the website’s requirements.
  6. Server Processing
    * Step: The server processes the HTTP request.
    * Explanation:
    • The server receives the request and processes it, potentially interacting with a backend, databases, or other services.
    • If the requested page requires dynamic content (e.g., from a database), the server may execute server-side scripts (e.g., in PHP, Node.js, Python) to generate the page.
  7. HTTP Response
    * Step: The server sends an HTTP response back to the browser.
    * Explanation:
    • The server responds with an HTTP status code (e.g., 200 OK for a successful request, 404 Not Found if the page doesn’t exist).
    • Along with the status code, the server sends the HTML, CSS, JavaScript, images, or other resources required to render the page.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What happens when URL is entered in a browser

A
  1. URL Parsing
    * Step: The browser first parses the entered URL.
    * Explanation: The URL is broken down into its components (e.g., protocol, domain name, path, query parameters). For example, in https://www.example.com/path/page?query=1, the protocol is https, the domain is www.example.com, the path is /path/page, and the query parameter is ?query=1.
  2. DNS Resolution
    * Step: The browser checks the domain name to find its corresponding IP address using DNS (Domain Name System).
    * Explanation:
    • The browser looks in its cache to see if it has the IP address for the domain already stored. If not, it sends a request to the DNS server.
    • The DNS server translates the human-readable domain name (e.g., www.example.com) into an IP address (e.g., 192.168.1.1), which represents the server where the website is hosted.
  3. TCP Connection
    * Step: The browser establishes a connection with the server hosting the website.
    * Explanation:
    • The browser initiates a TCP (Transmission Control Protocol) handshake with the server to establish a stable connection.
    • The handshake involves three steps: the client sends a SYN (synchronize) request, the server responds with a SYN-ACK (synchronize-acknowledge), and the client sends an ACK (acknowledge) back to the server.
  4. SSL/TLS Handshake (if HTTPS)
    * Step: If the connection is over HTTPS, the browser and server perform an SSL/TLS handshake.
    * Explanation:
    • The browser and server exchange cryptographic keys and agree on encryption methods to secure the communication.
    • The server sends its SSL certificate, which is verified by the browser to ensure the site is trusted and authentic.
  5. HTTP Request
    * Step: The browser sends an HTTP request to the server.
    * Explanation:
    • The browser constructs an HTTP request for the specific resource (e.g., the web page or a particular file) using the path and query parameters from the URL.
    • The request might include additional data like cookies, headers, or authentication tokens depending on the website’s requirements.
  6. Server Processing
    * Step: The server processes the HTTP request.
    * Explanation:
    • The server receives the request and processes it, potentially interacting with a backend, databases, or other services.
    • If the requested page requires dynamic content (e.g., from a database), the server may execute server-side scripts (e.g., in PHP, Node.js, Python) to generate the page.
  7. HTTP Response
    * Step: The server sends an HTTP response back to the browser.
    * Explanation:
    • The server responds with an HTTP status code (e.g., 200 OK for a successful request, 404 Not Found if the page doesn’t exist).
    • Along with the status code, the server sends the HTML, CSS, JavaScript, images, or other resources required to render the page.