PhoneGap、Bootstrap 还是 JQuery Mobile?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17530051/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 19:15:19  来源:igfitidea点击:

PhoneGap, Bootstrap or JQuery Mobile?

jqueryhtmljquery-mobiletwitter-bootstrapcordova

提问by Jon

I have a web app that's coded in HTML, CSS and JavaScript. My goal with this app is to eventually have it working on all manners of mobile devices, and keep the web app for desktop use.

我有一个用 HTML、CSS 和 JavaScript 编码的网络应用程序。我对这个应用程序的目标是最终让它在各种移动设备上运行,并保持 Web 应用程序供桌面使用。

The app is essentially a Google Maps, SQL, point of interest type application, that allows tracking of particular devices.

该应用程序本质上是一个谷歌地图、SQL、兴趣点类型的应用程序,允许跟踪特定设备。

I'm currently in the process of researching PhoneGap, Bootstrap and JQuery Mobile and was looking for some expert advice as to which direction to take it.

我目前正在研究 PhoneGap、Bootstrap 和 JQuery Mobile,并正在寻找一些关于采取哪个方向的专家建议。

Ideally, one app to rule them all, that would simply optimize to the device it's being displayed on would be the most convenient.

理想情况下,一个应用程序来统治所有这些,只需优化显示它的设备将是最方便的。

I would really appreciate a concise pros and cons list to using each of these technologies, and I am open to other suggestions.

我非常感谢使用这些技术中的每一种的简明利弊列表,并且我愿意接受其他建议。

回答by Jon

Bootstrap, jQuery Mobile and PhoneGap all solve different problems.

Bootstrap、jQuery Mobile 和 PhoneGap 都解决了不同的问题。

Bootstrap is a responsive web framework. Its goal, like all responsive web frameworks is to adapt your view layer to the device doing the viewing. Giving you different presentations for mobile phones, tablets, PCs, etc.

Bootstrap 是一个响应式 Web 框架。与所有响应式 Web 框架一样,它的目标是使您的视图层适应执行查看的设备。为您提供适用于手机、平板电脑、PC 等的不同演示。

jQueryMobile is a mobile web application framework that aims to provide a cross-platform mobile application written entirely using JavaScript/HTML/CSS.

jQueryMobile 是一个移动 Web 应用程序框架,旨在提供完全使用 JavaScript/HTML/CSS 编写的跨平台移动应用程序。

PhoneGap is essentially a wrapper (browser) around an existing web application that lets you access native device APIs (like camera, bluetooth, etc.) using JavaScript.

PhoneGap 本质上是一个围绕现有 Web 应用程序的包装器(浏览器),它允许您使用 JavaScript 访问本机设备 API(如相机、蓝牙等)。

From my own personal experience, which is by no means a comprehensive guide:

从我个人的经验来看,这绝不是一个全面的指南:

Bootstrap

引导程序

  • Pro: Easy to work with, easy to customize.
  • Pro: Lots of people use it.
  • Con: Lots of people use it, so your application may look like all the rest.
  • 优点:易于使用,易于定制。
  • 优点:很多人使用它。
  • 缺点:很多人都在使用它,所以你的应用程序可能看起来像其他的一样。

jQuery Mobile

jQuery 移动版

  • Pro: A nice mobile-friendly UI.
  • Pro: Easy to get started, especially if you're familiar with jQuery.
  • Con: The more data injection you need to do, the more complex your app becomes.
  • Con: When I last used it, 1.0, it was fairly buggy across devices.
  • 优点:一个不错的移动友好的用户界面。
  • 优点:易于上手,特别是如果您熟悉 jQuery。
  • 缺点:你需要做的数据注入越多,你的应用就越复杂。
  • 缺点:当我上次使用它时,1.0,它在跨设备上相当多。

PhoneGap

电话鸿沟

  • Pro: Easily lets you build cross-platform web apps with JavaScript/HTML/CSS and have access to device APIs
  • Con: When I last used it, this is mostly for Android, the webview it used was brutally slow.
  • 优点:让您可以轻松地使用 JavaScript/HTML/CSS 构建跨平台 Web 应用程序并访问设备 API
  • 缺点:当我上次使用它时,这主要用于 Android,它使用的 webview 非常缓慢。

For trivial applications, my recommendation is to definitely go with cross-platform development. It'll be relatively quick and easy to deploy. Having said that, once you start increasing application complexity, my experience has been to alwaysgo native, or at the very least some hybrid solution. Native applications just have a better "feel" at this point in time and more importantly, going native lets you build applications within the design of the platform. Cross-platform is nice, but most Android users don't want their apps to look like iOS apps and vice versa. While it may take longer to build native applications for multiple platforms, I think you ultimately deliver a better experience to your users.

对于琐碎的应用程序,我的建议绝对是跨平台开发。它将相对快速且易于部署。话虽如此,一旦您开始增加应用程序的复杂性,我的经验是始终采用原生解决方案,或者至少是某种混合解决方案。原生应用程序此时只是有更好的“感觉”,更重要的是,原生应用程序可以让您在平台设计内构建应用程序。跨平台很好,但大多数 Android 用户不希望他们的应用程序看起来像 iOS 应用程序,反之亦然。虽然为多个平台构建本机应用程序可能需要更长的时间,但我认为您最终会为您的用户提供更好的体验。

Just my two cents.

只有我的两分钱。

回答by Apollo SOFTWARE

It depends on how many target systems you have and the abundance of resources?

这取决于您拥有多少个目标系统和丰富的资源?

If you're targeting iOS only type devices, I'd say go the native route, or native with UIWebView mixed together. If you however have multiple devices such as iOS/Android/Windows, Blackberry, I'd go with Cordova/PhoneGap. The seamless integration with these systems are nice, and plus you maintain a single codebase.

如果您只针对 iOS 类型的设备,我会说走本机路线,或者将本机与 UIWebView 混合在一起。但是,如果您有多个设备,例如 iOS/Android/Windows、Blackberry,我会选择 Cordova/PhoneGap。与这些系统的无缝集成很好,而且您可以维护一个单一的代码库。

However when you use the Cordova/PhoneGap route, the native devices functions aren't directly channeled, and there is a lag between various transitions, not to mention overhead with the codebases.

但是,当您使用 Cordova/PhoneGap 路由时,本机设备功能不会被直接引导,并且各种转换之间存在延迟,更不用说代码库的开销了。

If you have unlimited resources and time constraints, and employee resources, develop native iOS, and native Android, with their WebKit as the primary interface control, and utilize each respective operating system's features available.

如果您有无限的资源和时间限制以及员工资源,请开发原生 iOS 和原生 Android,以它们的 WebKit 作为主要界面控件,并利用每个相应操作系统的可用功能。

I do have to say Cordova, in terms of utlizing Android, and iOS's builtin function has gotten drastically better. They've tapped into the Multimedia Components, the gyroscope, the MAP Kits, Accelerometers, and GPS's of the respective devices to say the list. And as I understand they are continuing to expand. Single code base is nice! But that's if you have tight resources. If you have a big company with numerous programmers with numerous disciplines, go Native 100%.

我不得不说 Cordova,在使用 Android 方面,iOS 的内置功能已经大大改进。他们利用了相应设备的多媒体组件、陀螺仪、MAP 套件、加速度计和 GPS 来列出清单。据我所知,他们正在继续扩张。单一代码库很好!但前提是你的资源紧张。如果您有一家拥有众多程序员的大公司,那么请 100% 使用 Native。

回答by Viper

It really depends on what you are targeting.

这真的取决于你的目标是什么。

Personally, I like PhoneGap as it provides developers a way to create native iOS and Android apps. But JQuery mobile is also quite impressive. Developers have created impressive products with both these technologies.

就我个人而言,我喜欢 PhoneGap,因为它为开发人员提供了一种创建原生 iOS 和 Android 应用程序的方法。但 JQuery 移动版也令人印象深刻。开发人员利用这两种技术创造了令人印象深刻的产品。

Nevertheless, JQuery Mobile creates a webpage which is designed for mobile devices. PhoneGap creates an app (Nearly for six platforms like IOS, Android, BlackBerry, etc.,).

尽管如此,JQuery Mobile 创建了一个专为移动设备设计的网页。PhoneGap 创建了一个应用程序(几乎适用于 IOS、Android、BlackBerry 等六个平台)。