S.D
S.D

Reputation: 305

Using web service for cross platform mobile app

I'm writing a mobile app which at high level does:

My current approach is to create a web service which handles communication with the third party vendor and also takes care of filtering logic, which contains a fair amount of calculation.

The downside of this approach is the extra hop from client's perspective since there will now be two web service calls (client -> custom service, custom service -> 3rd party vendor)

On the plus side, the filtering logic and future enhancements will be completely agnostic of operating system and I don't need to write custom code for Android & iOS.

Is this the right approach?

Upvotes: 1

Views: 79

Answers (1)

Cahit
Cahit

Reputation: 2534

It is, under the following scenarios:

  1. Third party site requires an API key (or another form of authentication) which needs to be kept secret and can't be distributed to clients,
  2. Third party charges for each API call or throttles the calls, and you want to cache results on your site to limit the number of calls,
  3. Third party API is likely to change, and you don't want to release a new version of client with every change,
  4. There is a likelihood of switching to a different third party vendor,
  5. Your site is more reliable with better uptime than the third party site.

Otherwise, calling directly from the client will be less of a headache, in spite of the extra amount of coding you mentioned.

Upvotes: 1

Related Questions