Performance: HTTP methods for CRUD operations
MEDIUM IMPACT
This concept affects the server response time and client-side rendering speed by how efficiently HTTP methods handle data operations.
app.post('/items', (req, res) => { /* create */ }); app.get('/items/:id', (req, res) => { /* read */ }); app.put('/items/:id', (req, res) => { /* update */ }); app.delete('/items/:id', (req, res) => { /* delete */ });
app.post('/items', (req, res) => { /* create */ }); app.post('/items/read', (req, res) => { /* read */ }); app.post('/items/update', (req, res) => { /* update */ }); app.post('/items/delete', (req, res) => { /* delete */ });
| Pattern | Server Processing | Network Efficiency | Caching | Verdict |
|---|---|---|---|---|
| Using POST for all CRUD | High (all requests treated same) | Low (no caching benefits) | None | [X] Bad |
| Using correct HTTP methods | Low (clear routing) | High (GET can be cached) | Enabled | [OK] Good |