3 ms·
i'm running out of ways to say that a CRUD endpoint should not have dynamism in the sense that you mean /users/:id should map to 1 endpoint that's parameterize
by preseinger 3y ago
i'm running out of ways to say that a CRUD endpoint should not have dynamism in the sense that you mean
/users/:id should map to 1 endpoint that's parameterized on userid
/search?userid=:userid&tag=:tag should map to 1 endpoint that's parameterized on userid and tag(s)
endpoints should be simple to write
- kaba0 3y agoYeah and programs should also be simple, but there would be no value to them that way.
- ehutch79 3y agoYou’ve never actually implemented a real world implementation, have you? You’re going to have parameters that are compound. You’re going to end up filtering on objects 3 relations removed, or deal with nasty syncing of normalization. You’ll have endpoints with generic relations, like file uploads, where the parent isnt a foreign key. It’s going to be a mess. They will NOT always be simple to write.