DEV Community

loading...

Discussion on: A Simple Approach to Managing API Calls

Collapse
wulymammoth profile image
David

An endpoint usually encompasses the entire URL. If you're up for a suggestion, mine would be resource in the canonical API and RESTful nomenclature sense. The resource that you're using as an example appears to be tasks resources.

Fair enough. If I added or created a new provider, rather than swapping/modifying existing code and possibly introducing a regression -- I'm typically for keeping legacy things around, doing a partial release to end users for something new, address any bugs, then switch over and remove the old. I like your emphasis on clean architecture which alludes me to the ideas surrounding "Clean Code" by "Uncle Bob" who is often attributed for the SOLID acronym. You may enjoy this repository: github.com/ryanmcdermott/clean-cod...

Thread Thread
mmcshinsky profile image
Michael McShinsky Author

I like resource better, thanks. Especially since this abstraction directly address the resource in question in addition to any custom endpoints related to the resource. Good catch.

Thanks for the article! Looks like a really good read. 😄

Thread Thread
wulymammoth profile image
David

Happy coding, Michael! And thanks for sharing. These sorts of pieces keep me in the loop in JS land that I haven't worked in for about two years :)