DEV Community

Discussion on: BUILD THE REST API USING PYTHON DJANGO - PART 4 🐍

aminmansuri profile image
hidden_dude • Edited on

What I do is I have denormalized abstractions at the REST/Json level.

I model the API based on how the webpages/users want to use them rather than on DB normalization concepts. So that I minimize roundtrips.

Then the backend takes care of parsing the JSON and pumping it all into the correct tables.

This way the client does everything in a single transaction by sending all the form data in one single JSON (no matter how many entities may be affected).