Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]Web and mobile via same backend
#1

(This post was last modified: 10-19-2015, 02:39 AM by PureTryOut.)

EDIT: Solution found thanks to rtorralba and mwhitney. Going to make use of a REST api which I'm going to build in seperate controllers.


I'm not sure how to start with this, maybe one of you has a suggestion.

Basically I'm going to create a website, and a mobile application (Android, iOS, doesn't matter), which both have to talk via the same PHP backend. This backend interacts with the database.
So I want the frontend (so the website + mobile application) to send some sort of "command" to the backend. The backend then does something depending on the command it gets, and returns a value (I guess JSON would be the easiest here).

Should I create a seperate project for the backend, and call it from the frontend via a CURL call, or something like that? Or should I create the backend in the same project as the frontend, but seperate the controllers in different folders, and call the backend directly? I would think the latter is better for performance and security, but I don't know how to call one controller from the other, if that is even possible.

Not sure if I'm really clear so an image to describe what I mean:
[Image: 5NSTNC.svg]
Reply


Messages In This Thread
[SOLVED]Web and mobile via same backend - by PureTryOut - 10-16-2015, 04:57 AM
RE: Web and mobile via same backend - by mwhitney - 10-16-2015, 09:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB