php - Hybrid Single Page Application Architecture (over-engineered?) -


please excuse length of post!

i'm building complex product consists of following:

  1. a web application
  2. a web server w/ php mvc backend
  3. mobile apps (ios, android, windows)
  4. a rest api server (php)
  5. a db server (mysql)

*note, there no frameworks in use , on occassion jquery used simplicity.

my issue lies web app. out of entire application there maybe dozen pages served web server data prepopulated. pages have tabbed navigation content/data displayed. tab sections load dynamically if/when user selects tab. performance reasons cannot preload of data , populate when requested.

currently requests api web app routing through webserver user session stored.

this request cycle like.

  1. web app user requests page
  2. web server calls api , populates data api response
  3. web server serves requested page
  4. web app user clicks on tab on page, data must loaded
  5. web app sends ajax http request web server
  6. web server calls api requesting/receiving data
  7. web server sends json ajax call
  8. web app populates data on tab

my question if over-engineered. know skip webserver , call api, being api has no session management, doesn't seem make sense. each call api need know if user logged in allow post, put, or delete calls, doesn't seem right skip web server.

am going off track here or recommended approach?


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -