We are working on providing services to mobile devices(Android, iOS and Windows). These services mostly return data and nothing OS or any programming language specific. We are currently planning on providing the service as a REST API since the clients can leverage the HTTP API provided by the OS but a co worker of mine is suggesting an rpc interface to get the data required. I am not sure if that is a good idea because it would need a lot more code than making simple calls to RESTful service. How can I convince him that using RPC is not a good idea?
1
Yes, Rest API is very powerful for your scenario
Expose all of your services through API endpoints. Always consider doing following when building Apis
Authentication – have an strong authentication system in your API, like token based authentication ( Json web token)
Authorization – every single API need to be access controlled, have the user privileges in your database and cross verify it every time
Also one thing I suggest is never ask user specific information and process on it after authentication , always take all the logged in user specific information from database using provided authentication token