Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

JSON - what am I missing

Enthusiast ,
Jul 10, 2013 Jul 10, 2013

I am trying to understand how to create dynamic content for HTML5 apps. I think I am right in understanding that when you phonegap an app and submit it to the apple store, it can't have php code, so therefore you need to create a JSON file to hold the dynamic content which your HTML5 page then use to populate the page.

Am I right so far?

If so, I assume that I have to have a php page sitting on a remote server that connects to a mysql DB, and this php then spits out the requested databasse content as JSON which is loaded into an HTML5 template as and when it is required.

If I am still right, then I am missing a part of the puzzle. I don't understand how to get the content from a php page to a JSON file/array without having to have some form of php code in the app. So, how do I get the JSON array into the app without using php in it?

I can create a JSON array in a php page and have successfully returned results, but I am concerned that I will spend a lot time making an HTML5 app with dynamic content only to have it rejected by Apple because it has php in it! What is it I am missing or don't fully understand?

Basically, I am hoping to create an app that will load the latest content when connected to wifi, but also hold the last loaded content in the device memory/database should wifi not be available. Simply put, saved content for off-line reading later.

Thanks in advance.

TOPICS
Server side applications
703
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 10, 2013 Jul 10, 2013
LATEST

use ajax

best,

Shocker

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines