3 ms·
care to explain?
by tbarbugli 10y ago
care to explain?
- dozzie 10y agoData structures used internally for processing are something totally different than data structures used for communication with outside world. Usually you don't want to expose internals with public API, and even when you do, you want to be very selective about what is shown and how. When you publish internals, you only cement your implementation so you can't change that easily later (e.g. when you realize how crappy it was at first), and you even need to pay for that drawback with ease of use of your API (API's user would need to understand the system he talks with). It's a lose-lose deal.
- tbarbugli 10y agoI agree, I find doing this with DRF very easy and had the opposite with TastyPie doing stuff I did not want or need. Having some ORM integration is nice; there are a number of situations where it's easy to use your ORM safely and get stuff done very quickly (eg. basic CRUD stuff for instance)
- dozzie 10y ago"Basic CRUD" is basic only in most trivial situations, which by themselves are rare. Much more often you need to create a set of related objects. With this "basic CRUD" you have many points where network can break, and network programming has one very important principle: network always breaks, so the program has to survive in such case.