哪个框架最适合使用数据库连接开发移动应用程序? [英] Which framework is the best to develop a mobile application using database connection?

查看:24
本文介绍了哪个框架最适合使用数据库连接开发移动应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 PHP5 开发了一个网站.现在,我想总结一下我的网站在跨平台移动应用程序中的主要功能.

I developed a website using PHP5. Now, I want to sum up the main features of my website in a cross-platform mobile application.

我对可以做到这一点的框架进行了一些研究.我找到了最受欢迎的jQuery Mobile"、SenchaTouch"和Cordova".但我想开发一个需要连接到数据库并且在 iOS 和 Android 上可移植的应用程序(至少).

I did some research about frameworks which can do this. I found 'jQuery Mobile', 'SenchaTouch' and 'Cordova' which are the most popular. But I want to develop an application which needs to have a connection to a database and which is portable on iOS and Android (at least).

我尝试过jQuery Mobile",但需要在 Web 浏览器中打开该应用程序才能显示该应用程序(就像一个简单的网站).例如,我想像当前的电话应用程序一样打开我的应用程序,而不通过使用数据库连接的网络浏览器(与当前网站具有相同的行为并显示 MySQL 请求的内容,但没有网络浏览器).

I tried 'jQuery Mobile' but the application needs to be open in a web browser to display the application (like a simple website). For example, I would like to open my application like a current phone application without passing by a web browser using a database connection (to have the same behaviour than a current web site and display the content of MySQL request but without web browser).

是否可以使用 jQuery Mobile 或其他?或者我必须通过网络浏览器?有谁能帮帮我吗?

Is it possible with jQuery Mobile or another one? Or do I have to pass by a web browser? Can anyone help me, please?

推荐答案

当今存在 3 种不同类型的移动应用程序:本机应用程序、混合应用程序和 Web 应用程序.本机应用程序是用 Java(适用于 Android)或 Objective-C(适用于 iOS)编写的应用程序.本机应用程序可以完全访问手机上的低级硬件功能,并且可以从应用程序商店下载.Web 应用程序是使用特殊 JavaScript 工具包(如 jQuery Mobile 和 Sencha Touch)和自定义 CSS 使网站看起来和功能类似于本机应用程序的网站.但是,网络应用程序只能通过浏览器访问 - 虽然您可以将网站书签"到手机的主屏幕上以使其更容易访问,但它们仍然无法从应用程序商店下载并且无法访问到手机上的硬件功能.混合应用程序是这两者之间的交叉.混合应用程序基本上是用本机代码包装"的网站.这允许您创建一个本质上只是一个网站的本机应用程序,但是,包装允许您像本机应用程序一样访问低级硬件,并允许您将应用程序发布到应用程序商店.混合应用程序的另一个主要好处是,您只需了解 HTML/JavaScript 即可创建可在所有移动操作系统上运行的多平台应用程序.这就是科尔多瓦所做的.

There are 3 different types of mobile applications that exist today: native apps, hybrid apps, and web apps. A native app is one that is written in Java (for Android) or Objective-C (for iOS). Native apps have full access to low level hardware features on the phone and can be downloaded from app stores. Web apps are websites that use special JavaScript toolkits (like jQuery Mobile and Sencha Touch) and custom CSS to make websites appear to look and function like native apps. However, Web Apps can only be accessed through a browser - while you can "bookmark" websites to the Home screen on your phone to make it easier to access, they still can't be downloaded from an app store and don't have access to the hardware functions on the phone. Hybrid apps are a cross between these two. Hybrid apps are basically websites that are "wrapped" in native code. This allows you to create a native app that at its core is just a website, however, the wrapping allows you to access low level hardware like a native app and allows you to publish the app to app stores. Another major benefit of hybrid apps is that you only need to know HTML/JavaScript to create a multi-platform app that will run on all of the mobile operating systems. This is what Cordova does.

听起来您想要做的是使用 jQuery mobile(或 Dojo Mobile、Sencha Touch 或其他数百个 JavaScript 工具包之一)创建一个混合应用程序.这样您就可以利用您的 Web 开发技能并建立一个连接到您的数据库的网站.然而,当最终使用 Cordova编译"你的 HTML/CSS移动网站"时,它会为 iOS、Android 和其他平台吐出看起来原生的应用程序,然后你可以将这些应用程序发布到应用程序商店.当用户从应用商店下载你的应用并点击启动图标时,他们会看到你的网站,但他们不会看到浏览器工具栏或类似的东西——大多数用户不知道他们正在查看 HTML/CSS网站."这听起来像是您的目标,即拥有一个功能类似于网站但看起来不像网站的应用程序.

It sounds like what you want to do is create a hybrid application using jQuery mobile (or Dojo Mobile, or Sencha Touch, or one of the hundreds of other JavaScript toolkits out there.) This way you can utilize your web development skills and build a website that connects to your database. However, when end up "compiling" your HTML/CSS "mobile website" using Cordova, it will spit out native-looking apps for iOS, Android, and other platforms that you can then publish to the app store. When a user downloads your app from the app store and clicks on the launch icon, they will see your website but they will not see a browser toolbar or anything like that - most users will have no idea that they are looking at an HTML/CSS "website." This sounds like your goal, to have an app that functions like a website but will not look like a website.

这篇关于哪个框架最适合使用数据库连接开发移动应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆