-1

I'm a Web Developer(PHP Developer) by profession. So, I'm asking this question from web developer's point of view and expecting the answer with the same perspective.

There is one running social website developed in PHPfox(a social networking platform created in php)

Now I've received a requirement from the client to develop Android and iOS apps just like Facebook mobile app based on this website means the app should also resemble the website's functionality. So, in turn these projected apps will be going to access the same MySQL database which the website is currently using. The main objective is the website and these apps should work in sync just like Facebook website and Facebook mobile app.

So, my question is what should be the step-by-step, right, the best and optimum approach in this kind of scenario?

On website they have used MVC pattern of development and they have used Twig as a template engine to display the webpages which should not be the case in mobile apps.

The mobile teams(iOS and Android) teams are working on the UI design of the app. But what should be my role I'm not clear about it. Please explain me the correct step-by-step approach from web developer's perspective.

Thanks.

PHPLover
  • 1
  • 51
  • 158
  • 311

1 Answers1

4

Well the best way to do this is to have native mobile apps, one version for Android and one version for IOS. Your role would be to create a webservice that can access your database and enable the mobile app developers to call on certain urls (which would be functions in that webservice) that would reply with data presented in JSON.

So start out by thinking of the functions that they would need, how would they call it, what arguments would they pass and how would they receive the data.

Naguib Ihab
  • 4,259
  • 7
  • 44
  • 80
  • Thanks for your answer but what PHP framework(the Best PHP framework for building web services) should I use for building the prospective web services, what should be the URL pattern, how should be the user authentication process, how the session and cookies will be handled and so many. There are too many questions which are still unclear to me. Could you please put more focus on it and clear my doubts? – PHPLover Jun 15 '15 at 05:16
  • There's no "best" framework to use, you can build a pure php webservice application or you can use the current framework that you're working on. Do not use session or cookies when it comes to http requests because there's no session, the application would be calling a function and getting the reply and that would be the end of its relationship with the session, so instead let the app pass store and values to you such as the logged in user's id. – Naguib Ihab Jun 15 '15 at 05:19
  • 1
    For the rest of your questions you can find all the answers and a kick start tutorial in here: http://code.tutsplus.com/tutorials/a-beginners-guide-to-http-and-rest--net-16340 – Naguib Ihab Jun 15 '15 at 05:21
  • Also there's a chrome extension called postman that'll help you debug these kind of functions. – Naguib Ihab Jun 15 '15 at 05:24