我正在开发一个网络应用程序,该应用程序的一个部分用于从外部API(例如usgs和google-maps)获取一些数据,并将其显示给用户,另一个部分用于从用户获取输入(例如几个输入)字段)并将其发布到其他API。
我可以使用Django / Flask在服务器端进行操作,而使用Reactjs(或香草js,引导程序等)在客户端进行操作。
在 在速度,安全性和用户友好性方面,我应该在哪里进行这些API调用?服务器端还是客户端? 我是否想将某些数据保存到服务器上,这有什么区别?
答案 0 :(得分:2)
Security
In terms of security, if you are doing API calls on server which requires API key then it's not good practice to reveal it in client side. Hence, if that's the case then doing API call in server side will be better option. Apart from that and as per my knowledge there is no security issue in making API calls.
Speed
In terms of speed,
User Friendliness
As per the user friendliness, i don't think it matters either way, coz speed is covered. So, apart from that it won't make any difference to client as per my knowledge
Thanks,
This is just from my point of view and knowledge, if there is more or i am wrong in some point, please correct me