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

(This post was last modified: 10-16-2015, 08:12 AM by rtorralba.)

(10-16-2015, 07:49 AM)PureTryOut Wrote: Sorry you misunderstood, the backend is in this case not an administration panel of some sorts, but more like a server, a daemon. The user can't access it, it will not load any views. It gets a command from the mobile app or website, and returns a value. Not any more then that.

I just have it so the mobile app won't directly access the database, and I don't have to write the same database code twice (for web and app).

The backend is more like the API you described I guess.


Yes, backend is a database adminstration application. If you don't need it you can extract it from your structure.

You want retrieve web data across api? You will go to use angularjs or some other ajax framework to your public web layer? If not the frontend controllers can manage data across models directly.

Structure with php frontend:
- controllers
  - frontend
  - api (rest api for mobile data manage)
- models
- views

Structure with rich client frontend:

- controllers
  - api (rest api for mobile and web javascript data manage)
- models
- views (at views you can put your rich client framework)

Of course you should to have a public assets folder for js, css, images...
Greetings.
Reply


Messages In This Thread
RE: Web and mobile via same backend - by rtorralba - 10-16-2015, 08:12 AM
RE: Web and mobile via same backend - by mwhitney - 10-16-2015, 09:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB