使用PhoneGap的对本地应用开发 [英] Using Phonegap for Native Application development

查看:151
本文介绍了使用PhoneGap的对本地应用开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近碰到 PhoneGap的。有你没有人尝试过​​。它的一个令人难以置信的工具,它声称,开发者可以在同一时间使用像煎茶触摸和jQuery HTML 5的框架 有机会获得本机功能的手机。另外,code是便携的机器人到iPhone的一些努力。在我投身到它,我想知道什么是与PhoneGap的论坛的经验。什么是痛点,是不是真的可扩展的企业级应用的开发。

I recently came across Phonegap. Have anyone of you tried it. Its an incredible tool which claims that developers can use HTML 5 based framework like Sencha touch and Jquery at the same time having access to native features on phone. Also the code is portable from Android to Iphone with some effort. Before I plunge into it I want to know what is forum's experience with Phonegap. What are the pain points and is it really scalable for enterprise level application development.

推荐答案

我已经建立了几个使用PhoneGap的应用程序,以及它所提供的,它的伟大。有一对夫妇的快速笔记,我想指出,这可能会帮助你。

I've built a couple of applications using PhoneGap, and for what it provides, it's great. There are a couple of quick notes I would like to point out, which might help you.

你不使用禁用基于设备的功能 加速度计,地理定位功能在默认情况下开启。如果你不使用它们,我就会将其关闭,因为您的应用程序的加载速度更快(初始化)和运行更顺畅。

Disable device-based features you're not using The accelerometer, geolocation features are by default turned on. If you're not using them, I would turn them off, as your app will load faster (initialize) and run smoother.

onDeviceReady - 这是一个被称为一次的PhoneGap加载并准备好方法。 $(文件)。就绪或任何你已经习惯了,并不真正适用在这里 - 除非你只是做接口/硬codeD的HTML的东西。如果你与iPhone的功能交互,如地理位置,你需要做的一切的 onDeviceReady被调用。

onDeviceReady - This is the method that's called once phonegap has loaded and is ready. $(document).ready or whatever you're used to, doesn't really apply here - unless you're only doing interface/hard-coded HTML stuff. If you're interacting with iPhone features, like GeoLocation, you will need to do everything after onDeviceReady has been called.

选择一个UI /库 有一吨的选项界面/库,jQuery的移动,煎茶触摸,jqtouch等。这些均提供了独特的方法和功能集。做一些调查研究,并使用一个,但要避免的完美组合。你可以阅读一些更多的选择,这里的工具: http://www.phonegap.com/tool​​ (链接更新)

Pick a UI/library There are a ton of options for the interface/libraries, jquery-mobile, sencha touch, jqtouch, etc.. These each offer a unique approach, and feature-set. Do some research and use one, but avoid combining. You can read about some more options, tools here: http://www.phonegap.com/tool (link updated)

此外,更多的只是移动开发一般,与PhoneGap的 如果您正在寻找构建应用程序,通过Android分发的市场与iPhone应用程序商店,我会读通过他们的详尽的列出了关于如何开发你的应用程序的指导方针。例如,在上面的工具链接,有一个工具/插件之称易APNS - 而这是非常有用的为Android - 和在iPhone上技术上是可行的,它违反了开发协议,因为它规定你必须使用苹果的通知,网络,等等。这只是一个例子,但这些东西读了会为你节省许多烦恼,如果这是您的最终目标。

Also, more on just mobile development in general, with PhoneGap If you're looking to build apps, that are distributed through the Android market and iPhone App Store, I would read through their exhaustive lists for guidelines on how to develop your app. For example, in the tools link above, there is a "tool/plugin" called Easy APNS - while this is useful for Android - and technically doable on the iPhone, it violates the development agreement, as it states you must use the Apple notification network, etc.. This is just an example, but reading up on that stuff will save you a lot of headaches, if that's your end goal.

所有的一切,这是伟大的轻量级应用程序,特别是如果你来自一个Web开发的背景。 localStorage的,地理位置等。作品真的很好。我希望这有助于有点......感觉提问。

All in all, it's great for lightweight apps, especially if you come from a web development background. LocalStorage, GeoLocation, etc.. works really well. I hope this helps a little... and feel to ask questions.

其他编辑:

我真的认为它归结为你想要做什么,以及你知道该怎么做。马特指出,开发原生应用,为iOS比较好,等..是啊,如果你有时间和知识来学习的 - 当然,本地会更好。但PhoneGap的经费用于Web开发人员可以利用他们现有的技能和构建应用程序。此外,PhoneGap的,您可以快速构建应用程序,适用于iOS,安卓,塞班,棕榈,黑莓。有了轻微的调整到codeBase的每一个。

I really think it comes down to what you want to do, and what you know how to do. Matt pointed out that developing native apps, for iOS is better, etc.. Yeah, if you have the time and knowledge to learn that - of course native will be better. But PhoneGap is made for web developers that can take their existing skillset and build apps. Also, PhoneGap allows you to build apps quickly, for iOS, Android, Symbian, Palm, Blackberry. With minor adjustments to your codebase for each.

这篇关于使用PhoneGap的对本地应用开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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