简体   繁体   English

数据库记录不会显示在我的移动应用程序上

[英]Database record wont show on my mobile application

I use html5 + css3 + jquery mobile to built my mobile application. 我使用html5 + css3 + jquery mobile来构建我的移动应用程序。 Actually I've already desktop version, and i want to make mobile application. 实际上,我已经有了台式机版本,并且想要制作移动应用程序。

  1. Is that true php wont work on html5 for mobile application? 那是真正的php不适用于移动应用程序的html5吗?
  2. If that true, i use ajax for call my JSON (that place create on jsontext.php). 如果是这样,我将使用ajax调用JSON(将create放在jsontext.php上)。
  3. I tried HTML5 on desktop browser and it worked. 我在桌面浏览器上尝试了HTML5,它起作用了。
  4. I built it to apk using build.phonegap.com and install the apk to my device. 我使用build.phonegap.com将其构建为apk,然后将apk安装到我的设备上。
  5. After that, my database record not showing. 之后,我的数据库记录不显示。 Maybe it didn't execute. 也许它没有执行。

Other user in stackoverflow said we can use backbone.js. stackoverflow中的其他用户说我们可以使用骨干.js。 how-to-access-a-remote-database-from-jquery-mobile-application 如何从jquery移动应用程序访问远程数据库

are my steps right? 我的步骤对吗? or I have to use backbone.js. 或我必须使用骨干.js。 THX. 谢谢。

Here's some answers: 这里有一些答案:

  1. Yes, php won't work in a mobile native/hibrid mobile application, because php needs to be interpreted by a php server before generating output. 是的,php在移动本机/混合移动应用程序中将不起作用,因为在生成输出之前,php服务器需要解释php。

  2. Its easy and simple to both generate and parse JSON, it's widely used in apps. 它既易于生成,又易于解析JSON,已在应用程序中广泛使用。

  3. That is good. 那很好。 If you want an 'online-only' kind of app, you can use a webview and point it the url of your app - its basically a browser without navigation buttons and user interface - but something's don't work that well, you should test before. 如果您要使用“仅在线”类型的应用程序,则可以使用Webview并为其指定应用程序的url(基本上是没有导航按钮和用户界面的浏览器),但某些方法不能正常运行,则应进行测试之前。 It may also display your app as sluggish and unpolished. 它还可能会将您的应用程序显示为缓慢且粗暴的。

  4. No problem with that, Cordova/Phonegap is actually becoming a very good mobile framework. 没问题,Cordova / Phonegap实际上正在成为一个很好的移动框架。 You should also install ADB ( http://developer.android.com/tools/help/adb.html ), ADT ( http://developer.android.com/tools/help/adt.html ) and the Android device emulator ( http://developer.android.com/tools/help/emulator.html ). 您还应该安装ADB( http://developer.android.com/tools/help/adb.html ),ADT( http://developer.android.com/tools/help/adt.html )和Android设备模拟器( http://developer.android.com/tools/help/emulator.html )。

  5. You must be sure on how to insert and retrieve dabatase records. 您必须确定如何插入和检索dabatase记录。 This depends on how you programmed it. 这取决于您如何编程。 Be sure to have the database available publicly (accessible only from the apps, though). 确保使数据库公开可用(不过只能从应用程序访问)。

Hope I've answered your questions, and that it helped. 希望我已经回答了您的问题,并且对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM