4 ms·
I like parameter objects a lot these days, they are more verbose to set up initially but they make function calls descriptive and the parameter order irrelevant
by benoau 2y ago
I like parameter objects a lot these days, they are more verbose to set up initially but they make function calls descriptive and the parameter order irrelevant, I think this is really good for developer usability.
I dislike parameters within the URL now, when you consider the usability of Swagger and browser debug consoles a URL like `/api/update-thing?id=foo` is much nicer for non-developers, whereas `PATCH /api/thing/:id` is built on understanding REST conventions and generates ambiguous requests in browser tools.