8

I am pretty new to stuff related to server and backend services and I want to develop a mobile app with a backend part. I want this backend to serve an ios app, an android app as well as a website. My concerns today are how does the frontend part communicate with the backend part :

  • does it work the same way a website works ? (Http request to the server ?)
  • how does happen the exchange of datas between the frontend and the backend ?
  • which are the common solutions to my problem ?
  • is there an efficient way to desing this backend to serve mobile apps as well as a website ?
  • is parse (https://parse.com/) a good starting point ?

Thanks

Ali Baba
  • 350
  • 1
  • 4
  • 12

2 Answers2

14

Looking at your questions in turn:

  • does it work the same way a website works ? (Http request to the server ?)

There are many options, but probably the most common, or fashionable, at the moment is to use a RESTFUL interface: http://en.wikipedia.org/wiki/Representational_state_transfer

Previously, a SOAP based web service might have been the most common choice: http://en.wikipedia.org/wiki/SOAP

See here for some discussion on why you might use REST rather than the SOAP now: Why would one use REST instead of SOAP based services?

  • how does happen the exchange of datas between the frontend and the backend ?

Assuming REST, HTTP is used to transport messages and application data is typically included in XML or JSON forms

  • which are the common solutions to my problem ?

I think this is covered by the other parts of the question/answer.

  • is there an efficient way to desing this backend to serve mobile apps as well as a website ?

Thats very dependent on your particular server application, especially its size and architecture. If the server application is broken down into components or parts, and the parts that generate the 'views' or the 'HTML' pages for the web app are distinct and well separated from the 'backend' parts of your server application, AND your application is of a type that the functionality is largely the same whether the end user is using a web site or a mobile and it is just the way the view are generated for the different devices that differs, then an efficient design would be one that keeps as much of the backend common as possible. If the use of the application is very different when used by a mobile client this may not make sense. More generally, an efficient design would keep as much functionality as possible common between the Mobile and Web applications.

It would definitely be worth becoming familiar with the 'Model View Controller' architectural pattern as most of the server side frameworks, as well as many of the Javascript Web client frameworks and even the iOS and (to a lesser extent) Android frameworks use these concepts:

http://en.wikipedia.org/wiki/Model–view–controller

One important considerations whether you need 'push' or notification like functionality on your mobile app. If so you may want to look at some of the common solutions to understand if they meet your needs - probably easiest to start with Apple and Google's offerings to get an understanding, but there are lots of other solutions available also:

https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html

http://developer.android.com/google/gcm/index.html

I am not familiar with this service but you might be better looking at a simple REST based approach first and see if it meets your needs.

Community
  • 1
  • 1
Mick
  • 24,231
  • 1
  • 54
  • 120
2

To answer your question

is parse (https://parse.com/) a good starting point ?

Yes it is.

But I would recommend you to read well on topics such as

Services such as parse are called Mobile Backend as a Service (MBaaS).They are ideal to quickly create web services for mobile developers who have little experience with backend development.

A quick search on google on 'MBaaS' will return many services similar to parse and most offer free developer accounts. (With a certain Number of free API calls per second/app) I have used Apigee similarly & the open source equivalent is Usergrid.

These services will provide a GUI for the developer to create & deploy services and the services are immediately available. Separate test & production end points will be available. In addition to basic CRUD operations, these services will also enable easy social network integration, caching & analytics (Depends on service provider)

Features such as security, scalability are built in by the MBaaS provider(Like Parse).

HMK
  • 383
  • 1
  • 5
  • 18