0

Like everyone else and their neighbour too, we're developing an app (ipad/android) for one of our websites that has functionality that people rather access in an app, for reasons passing understanding.

Well, my question regards how to think when it comes to backend for the apps.

We have a site with an accessible structure like so:

http://site/
http://site/profile/[user-name]
http://site/stuff
etc etc.

Is it wise or unwise of us to simply add a base for our apps like so

http://site/app

So the apps would access their model data and their controllers from this base, for example

http://site/app/profile/[user_id] 

to get/set the data for the user (could be any object but in this example we focus on users) or is it better to separate the app backend from our site completely and go either subdomain

http://app.site/

or

http://anothersite_as_backend

or doesn't this matter at all to you?

I'm just interested in how you are going about combining your web backend with your app backend.

Thanks.

Adergaard
  • 760
  • 10
  • 24

1 Answers1

0

Well, no matter the choice of domain structure, it is rather popular to expose a REST interface these days.

The ideas you sketch seem to lean towards that and think all the options are valid. I would though suggest (using the first option as an example) that you incorporate some versioning into the url, like http://site/app/v1/profile/[user_id]. Then you can increment the version at any point in the future if you were to make major changes in the API without breaking non-updated apps.

Not knowing anything about your app and the current state of your backend, I will just mention parse.com as I think they have done a great job at making it easy to store and retrieve data from many platforms. You can see my answer to this question for a bit more info: A relational database shared by an android app and a website - the easy way. This is of course not relevant if you already implemented the backend and have a lot of data at this point.

Community
  • 1
  • 1
cYrixmorten
  • 7,110
  • 3
  • 25
  • 33