Back-End Development An Intro to Full-Stack Development 3 — Questions and Answers
Question 1: What is the main difference between SQL and NoSQL databases in full-stack development?
- SQL databases are always faster than NoSQL
- SQL uses structured schemas while NoSQL offers flexible, schema-less storage (Correct answer)
- NoSQL databases cannot store numeric data
- SQL databases do not support indexing
Correct answer: SQL uses structured schemas while NoSQL offers flexible, schema-less storage
SQL databases enforce a rigid table schema, while NoSQL databases like MongoDB allow flexible document structures.
Question 2: In full-stack development, what is 'server-side rendering' (SSR)?
- The client's browser compiles JavaScript before executing it
- The server generates the complete HTML for a page before sending it to the browser (Correct answer)
- A CDN caches static HTML files globally
- JavaScript runs inside a Web Worker thread
Correct answer: The server generates the complete HTML for a page before sending it to the browser
SSR means the server builds the full HTML document and sends it to the browser, rather than relying on client-side JavaScript to render content.
Question 3: Which of the following best describes a microservices architecture?
- A single large application that handles all business logic
- An application split into small, independently deployable services (Correct answer)
- A pattern where the database is embedded inside the web server
- A front-end framework for building component-based UIs
Correct answer: An application split into small, independently deployable services
Microservices break an application into small services that communicate over APIs and can be deployed independently.
Question 4: What is the purpose of a load balancer in a full-stack deployment?
- To minify JavaScript files before serving them
- To distribute incoming traffic across multiple server instances (Correct answer)
- To encrypt database connections using TLS
- To cache database query results in memory
Correct answer: To distribute incoming traffic across multiple server instances
A load balancer routes requests across multiple servers to prevent any single instance from being overwhelmed.
Question 5: Which of the following is an example of a back-end framework?
- React
- Vue.js
- Express.js (Correct answer)
- Tailwind CSS
Correct answer: Express.js
Express.js is a Node.js back-end framework; React, Vue, and Tailwind are front-end tools.
Question 6: What does CORS stand for and why does it matter in full-stack development?
- Client Object Routing System — controls how clients cache requests
- Cross-Origin Resource Sharing — controls which domains can call your API (Correct answer)
- Centralized Output Rendering Service — manages SSR pipelines
- Content Optimization and Response Speed — measures API latency
Correct answer: Cross-Origin Resource Sharing — controls which domains can call your API
CORS is a browser security mechanism that restricts cross-origin HTTP requests unless the server explicitly allows them.
Question 7: In the context of full-stack development, what is a 'middleware' function?
- A database stored procedure that transforms query results
- A function that executes between receiving a request and sending a response (Correct answer)
- A CSS preprocessor that compiles Sass to plain CSS
- A type of WebSocket message handler
Correct answer: A function that executes between receiving a request and sending a response
Middleware sits in the request-response cycle and can inspect, modify, or terminate requests before they reach route handlers.
What is the main difference between SQL and NoSQL databases in full-stack development?