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.
Express-style, because it's very easy to work with my response asynchronously (before returning from my handler function) - e.g. respond with 200 immediately and then process the received data, or stream my response during processing.
I would vastly prefer controller endpoints to have actual objects and url params passed in rather than having to deal with a request or response object
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.
Express-style, because it's very easy to work with my response asynchronously (before returning from my handler function) - e.g. respond with 200 immediately and then process the received data, or stream my response during processing.
I would vastly prefer controller endpoints to have actual objects and url params passed in rather than having to deal with a request or response object