Performance: HTTP methods and CRUD mapping
MEDIUM IMPACT
This concept affects how efficiently the server handles requests and how quickly the client receives responses, impacting interaction speed and server load.
app.post('/items', createItem); app.get('/items/:id', getItem); app.put('/items/:id', updateItem); app.delete('/items/:id', deleteItem);
app.post('/items', (req, res) => { /* handles create, read, update, delete all here */ });
| Pattern | Server Processing | Network Efficiency | Caching | Verdict |
|---|---|---|---|---|
| Using POST for all CRUD | High (complex routing) | Low (no caching) | Poor | [X] Bad |
| Using correct HTTP methods | Low (simple routing) | High (cacheable GET) | Good | [OK] Good |