I'm not sure whether I should make my 3rd party network calls from the frontend or the backend. Both seems to have their advantages. I will like to know what limitaions you have experienced using either approach.
Well, I think I would do this on the backend. For one reason - maintainability. I'm not quite sure what your business is about, but if it's a web app right now and you plan to have mobile apps as well in the future, do it in the backend.
On recent projects I did, main reason for moving it to backend was security. If you put it into client side that usually means you also need to give api keys of the 3rd party service to the client and that means acess to 3rd party service publicaly. If api key permissions cannot be configured to match your needs then it's not an option at all
It is all about what your need is at the moment. If you access a public API, and you do not need to keep any records about user interaction with that API, you can just dump it on the client side and save up on server load. For example, if you want to put some Twitter feed in your UI, I see no reason to route this on your server, unless you want to filter that feed in some way.
If the API you call requires tinkering with the response or a special kind of request, then it belongs on the server.
Full Stack Developer
Brandon
Frontend Developer
Depending on the complexity of the problem I prefer to use the backend based on the following pattern:
That way you can: