intermediate
Backend Frameworks
Use Express, NestJS, Fastify, and framework conventions to turn Node runtime primitives into reliable HTTP services.
Backend framework interviews compare how Express, NestJS, and Fastify turn Node primitives into HTTP services—with different opinions on structure, validation, and test seams.
Child sections: Express (minimal middleware stack), NestJS (modules, DI, guards, pipes), and Fastify (plugins, schema validation, performance defaults).
On interviews: pick a framework you have used and explain routing, middleware/hooks order, error flow, validation placement, and how you test HTTP boundaries.
Common pitfalls: business logic in controllers/routes, wrong middleware order, and choosing NestJS ceremony when Express or Fastify would be simpler.
The trade-off is balancing simplicity, performance, safety, and operability — name which axis you optimized and what cost you accepted.
Checklist:
- Match framework opinion to team and domain complexity.
- Keep transport thin; domain logic in services.
- Control middleware/hook order and error mapping.
- Test with real HTTP semantics (e.g. Supertest).