0

I have a website which uses REST Api for communication. All data retrieval and save happen through Rest Api calls(polyglot environment). Now I am planning to create an Android and iOS app .

I have this plan of using the app and web page as the presentation layer only and all other operations(data related) to be API driven.

My question is, Is it a suggested practice to use Rest Apis for Android and iOS applications ? By doing so, will I face any complications when I have to scale up ?

I am aware it is possible to do, but would like to know if it is the right way to do it.

4
  • I would say that's the way to go, yes. Commented Sep 3, 2018 at 5:58
  • Thanks. Other than what @Daniel had mentioned in his answer, what are the possible challenges I would end up having to solve/find a work around, if I go with this approach. Commented Sep 3, 2018 at 6:30
  • I will create an answer to contain the discussion. Commented Sep 3, 2018 at 8:44
  • if you can i’d use something better than rest, like grpc.io
    – Edoardo
    Commented Sep 3, 2018 at 21:38

2 Answers 2

1

Absolutely! There are only two caveats.

  1. User's have an expectation that Android and iOS apps will have much better performance than their web counterpart.

  2. The app must be prepared to work when when the network connection is spotty or non-existent.

This means the app should have as much data as possible pre-loaded in the app package so that startup time is as short as possible. Also, it's best if the app is able to keep a local store of changes the user makes that it can upload in a background thread so the user isn't constantly subjected to a "please wait" spinner.

0

I think that's the best option you have. The main challenge that comes to my mind is to offer common services to the web page and to the native apps without ending up with separated services doing slightly similar things in very different ways.

You have to decouple the services from the client effectively to be able to reuse them with very different clients like in this case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.