Backend Flashcards

1
Q

What is the MVC architecture?

A

MVC (Model-View-Controller) separates an application into:

  • Model: Handles data and business logic.
  • View: Displays data to users.
  • Controller: Handles user input and updates the model or view.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does statelessness mean in backend development?

A

Statelessness ensures that the server doesn’t retain client data between requests. Each request contains all necessary information, as seen in REST APIs.

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

What are CRUD operations?

A

CRUD stands for Create, Read, Update, Delete—basic operations for interacting with data in a database.

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

What is middleware in backend contexts?

A

Middleware is a function that intercepts and processes requests or responses. Examples: request logging, authentication, or validating request data.

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

What is dependency injection in backend development?

A

Dependency injection is a design pattern where dependencies (e.g., database connections) are provided to components by an external system, improving testability and modularity.

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

What is rate limiting, and why is it important?

A

Rate limiting restricts the number of API calls a client can make in a given timeframe to prevent abuse and ensure resource availability.

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

What is session management in backend systems?

A

Session management involves maintaining a user’s state (e.g., login) across multiple requests, often using server-stored sessions or tokens (e.g., JWT).

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

Why are logging and monitoring important in backend development?

A

Logging tracks system events for debugging and auditing, while monitoring tracks metrics (e.g., CPU usage) to identify performance issues or failures.

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

What are data migrations?

A

Data migrations involve modifying a database schema or data structure, often performed when introducing new features or updating the database schema.

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

What is error handling in backend systems?

A

Error handling involves detecting, responding to, and logging errors to prevent crashes and provide useful feedback to clients.

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

What is connection pooling in backend systems?

A

Connection pooling maintains a pool of reusable database connections to reduce the overhead of opening and closing connections for every request.

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

What is RESTful routing?

A

RESTful routing maps HTTP methods to CRUD operations:

  • GET → Read.
  • POST → Create.
  • PUT/PATCH → Update.
  • DELETE → Delete.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is database indexing?

A

Indexing improves query performance by creating a data structure that allows faster lookups for specific columns in a database.

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

What is Gzip compression, and why is it used?

A

Gzip compresses HTTP responses, reducing payload size and improving client load times.

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

What is a health check endpoint in backend systems?

A

A health check endpoint provides information about the system’s status (e.g., /health returning service availability), useful for monitoring and auto-scaling.

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

What are idempotent operations in backend systems?

A

Idempotent operations produce the same result when performed multiple times. For example, DELETE requests are idempotent because deleting a resource twice has the same outcome.

17
Q

What are background jobs in backend systems?

A

Background jobs run time-intensive tasks (e.g., email sending, data processing) asynchronously, offloading them from the main request-response cycle. Example: Job queues like Bull or Celery.

18
Q

What are security headers in backend responses?

A

Security headers like Content-Security-Policy, Strict-Transport-Security, and X-Frame-Options mitigate security vulnerabilities like XSS, clickjacking, and MITM attacks.

19
Q

Why are environment variables used in backend systems?

A

Environment variables store sensitive configuration (e.g., database credentials, API keys) outside the codebase, improving security and configurability.

20
Q

What is pagination in backend development?

A

Pagination divides large datasets into smaller, manageable chunks for efficient retrieval and display. Common techniques include offset-based and cursor-based pagination.