2014年Phonegap Vs原生iOS/Android开发
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24219573/
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
Phonegap Vs native iOS/Android development in 2014
提问by KevInSol
I'm a web developer that is new to mobile app development and need to start a project asap. Despite researching for the last few weeks, (I have listed what I've done so far at the bottom of this post) I still have not decided between Phonegap or native (for iOS/Android only). Googling “Phonegap vs native” and the like seems to give results with a fairly even split, but there seems no doubt that native will give a faster / better end result, but at the expense of having to learn so many new things in a short timeframe.
我是一名 Web 开发人员,对移动应用程序开发不熟悉,需要尽快开始一个项目。尽管在过去几周进行了研究,(我已经在这篇文章的底部列出了到目前为止我所做的事情)我仍然没有在 Phonegap 或 native 之间做出决定(仅适用于 iOS/Android)。谷歌搜索“Phonegap vs native”等似乎给出了相当均匀的结果,但似乎毫无疑问,native 会给出更快/更好的最终结果,但代价是必须在短时间内学习这么多新东西大体时间。
One common thing cited about Phonegap is that is runs slowly – but I have also read that since V3 it now runs much faster – is this the case?
关于 Phonegap 的一个常见问题是它运行缓慢——但我也读到过,自从 V3 以来,它现在运行得更快——是这种情况吗?
The app I need to build is really pretty much like a mobile static site (but the customer insists it must be an app) – just text and a few images and some PDFs. There will be new content added like news, so I was thinking rather than release a new app version for each new item, the app will fetch new data from a web API (JSON or XML) and finally a requirement for push notifications.
我需要构建的应用程序实际上非常像一个移动静态站点(但客户坚持认为它必须是一个应用程序)——只是文本和一些图像以及一些 PDF。将添加像新闻这样的新内容,所以我想与其为每个新项目发布一个新的应用程序版本,不如说该应用程序将从 Web API(JSON 或 XML)获取新数据,并最终要求推送通知。
There will be no need to access the camera, GPS or any other hardware (bar the file system to cache images/PDFs).
无需访问相机、GPS 或任何其他硬件(禁止文件系统缓存图像/PDF)。
I've looked at similar apps (the competition) and they all appear to make extensive use of web views, which might suggest they were made with Phonegap (or would it?).
我看过类似的应用程序(竞争对手),它们似乎都广泛使用了网络视图,这可能表明它们是用 Phonegap 制作的(或者会吗?)。
So my question is, given the simple type of app I need to do, would there be a big benefit in going native for this, or would Phonegap (latest version) work just as well. Or on the other hand, since it is a simple app, would it be easy to do (i.e. from zero to both app stores in 10 weeks) in native?
所以我的问题是,考虑到我需要做的简单类型的应用程序,为此使用本机是否会有很大的好处,或者 Phonegap(最新版本)是否也能正常工作。或者另一方面,既然它是一个简单的应用程序,那么在本机中是否容易(即在 10 周内从零到两个应用程序商店)?
I do have a mac with ADT/Xcode installed so that is not a factor in the choice.
我确实有一台安装了 ADT/Xcode 的 mac,所以这不是选择的一个因素。
My research so far.
我的研究到目前为止。
Followed the Android getting started to here http://developer.android.com/training/basics/actionbar/styling.htmlbut got lost with the tabs
跟随 Android 入门到这里http://developer.android.com/training/basics/actionbar/styling.html但迷失了标签
Then got a book, SAMS teach yourself android in 24 hours, on about hour 6
然后拿了一本书,SAMS在24小时内自学android,大约6小时
Followed iOS to here https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/ThirdTutorial.html#//apple_ref/doc/uid/TP40011343-CH10-SW1
Several Phonegap tutorials such as http://coenraets.org/blog/phonegap-tutorial/but all seemed to have issues getting them to work as is.
一些 Phonegap 教程,例如http://coenraets.org/blog/phonegap-tutorial/,但似乎都无法让它们按原样工作。
回答by AtanuCSE
Clearly native has some benefits over the web frameworks like phonegap. But the thing is what you want & need? If you want a quick solution then phonegap is best for cross platform. You can do it in easy way for all common platforms. But if you want your app to be fast & efficient, of course native has it's benefits.
很明显,与 phonegap 等 Web 框架相比,本机具有一些优势。但事情是你想要和需要的吗?如果你想要一个快速的解决方案,那么 phonegap 最适合跨平台。您可以在所有常见平台上轻松完成。但是,如果您希望您的应用程序快速高效,那么本机当然有它的好处。
Given your requirements, phonegap could be better to serve your purpose. You can continue with same code, and exact same design for all platforms. Not only for ios and android, but also with windows phone, amazon fireos etc.
根据您的要求,phonegap 可以更好地满足您的目的。您可以继续对所有平台使用相同的代码和完全相同的设计。不仅适用于 ios 和 android,还适用于 windows phone、amazon fireos 等。
One of the thing is that there are thousands of app building in phonegap these days, so it can be told that it meets with the expectation to a certain extent. Phonegap is efficient enough to fill these apps' terms. With proper use of frameworks like sencha, jquery mobile, kendo UI and many more phonegap can be highly efficient.
一方面是最近在phonegap上搭建了上千个app,可以说在一定程度上符合预期。Phonegap 的效率足以满足这些应用程序的要求。正确使用 sencha、jquery mobile、kendo UI 和更多 phonegap 等框架可以非常高效。
I don't think it's possible for anyone to tell you that if the app could be completed in 10 weeks in native apps or not. I would go for phonegap to continue with same design and same code. It would be easy to make change in the app if needed in future. But decision have to be yours based on the issues and requirements :)
我认为任何人都无法告诉您该应用程序是否可以在 10 周内在本机应用程序中完成。我会选择 phonegap 继续使用相同的设计和相同的代码。如果将来需要,可以很容易地在应用程序中进行更改。但是必须根据问题和要求做出决定:)