PROJECTENGRAM

[REV] CCAPDEV COMPREHENSIVE FINALS REVIEWER

Tags: #◇Computer Science #◇CCAPDEV #◇Web Development #◇NodeJS #◇MongoDB #◇Reviewer #◇Finals


CCAPDEV Comprehensive Finals Reviewer

◇Overview

This reviewer consolidates Web Application Development (CCAPDEV). Subjects span semantic HTML5, modern CSS (Flexbox, CSS Grid, specificity hierarchy), client-side JavaScript (DOM manipulation, asynchronous fetch, event loop), Node.js server architecture, Express middleware pipelines, RESTful API design, template engines (Handlebars), MongoDB NoSQL database modeling via Mongoose, and session authentication and security practices (cookies, express-session, bcrypt password hashing, input sanitization).


◇1. Full-Stack Architecture & Express Middleware Pipeline


◇2. Core Web Technologies Comparison Matrix

Technology / ComponentRole / LayerKey APIs / SyntaxBest Practices
CSS SpecificityStyling LayerInline (1000) > ID (100) > Class (10) > Element (1)Prefer reusable classes; avoid !important
JavaScript AsynchronyClient/Server LogicPromises, async/await, fetch()Always wrap await calls in try...catch blocks
Express MiddlewareServer Pipelineapp.use((req, res, next) => { ... next(); })Call next() to pass control; return on res.send()
Mongoose ModelsDatabase ODMnew mongoose.Schema({...}), Model.find(), create()Enforce validation, indexes, and schema constraints
Authentication & HashSecurity Layerbcrypt.hash(password, saltRounds), bcrypt.compare()Never store plaintext passwords; use 10+ salt rounds

◇3. High-Yield Exam Checklist

  • Does bcrypt.hash() automatically generate and store the salt within the resulting hash string? YES ($2b$10$... contains algorithm, cost, salt, and hash).
  • In Express, what happens if a middleware does NOT call next() or send a response (res.json)? The client request hangs indefinitely until timeout!
  • Is localStorage safe for storing sensitive session tokens against XSS attacks? NO, prefer HttpOnly secure cookies.
  • What is the difference between MongoDB find() and findOne()? find() returns an array/cursor of matching documents; findOne() returns a single document object (or null).
  • Does CSS display: flex align items along the cross axis using align-items and main axis using justify-content? YES.

◇References & Navigation

CONFIRMATION // 理解度の確認

ACTIVE RECALL VERIFICATION

Select an answer to verify conceptual comprehension and reveal the technical rationale.

Q1

In CSS specificity calculation, which of the following selectors has the highest specificity?

Q2

In an Express.js middleware function, what must be invoked to pass control to the subsequent middleware handler in the stack?

Q3

Why should session identifier cookies always be configured with the httpOnly: true attribute?

Q4

What is the return value of await bcrypt.compare(submittedPassword, storedHash) when the submitted password matches?

Q5

In Mongoose, which method atomically updates an existing document and returns the newly modified document when { new: true } is passed?