使用哪个 Javascript 库?
我是使用 Phonegap 进行 Android 开发的新手,刚刚完成了这两个教程:
http://news.softpedia.com/news/How-to-Run-Android-Applications-on-Ubuntu-115152.shtml
http://wiki.phonegap.com/w/page/30862722/phonegap-android-eclipse-quickstart
现在我想让index.html 做更壮观的事情。您是否建议我使用 jQuery、Zepto.js、Sencha Touch、jQTouch 或这些的组合来完成我想要的操作?我很困惑。我非常了解 jQuery,但如果它与 Zepto.js(我只读过)相比显得臃肿,那么如果它不是太有限制的话,也许我需要 Zepto.js?然后是 Sencha Touch 和 jQTouch,我看到它们提供了控件框架,但我不知道它们是否也提供自己的 Javascript API,或者需要 jQuery,或者其他什么。我只是想为开发通用应用程序建立最佳环境。
到目前为止,我的应用程序需求相当简单,只有两种:
加载单个页面,然后 加载 Flash SWF 组件。这 组件可能会或可能不会交互 通过 AJAX 与后端 Web 服务器。 (我不是 Flash 的粉丝,但我的 客户要求它。她经常跑步 为她的业务提供游戏。)
带有 4 个静态选项的选项卡式界面 页面和图像,但随后在 第 5 个选项卡,它连接到以下网站: 一个 IFRAME(或者可能使用 AJAX)
I am new to Android development with Phonegap and just got through these two tutorials:
http://news.softpedia.com/news/How-to-Run-Android-Applications-on-Ubuntu-115152.shtml
http://wiki.phonegap.com/w/page/30862722/phonegap-android-eclipse-quickstart
Now I want to make the index.html do more spectacular things. Do you recommend I use jQuery, Zepto.js, Sencha Touch, jQTouch, or a mix of these, to do what I want? I'm confused. I know jQuery very well, but if it's bloated compared to Zepto.js (which I have only read about), then perhaps I need Zepto.js if it's not too limiting? And then there's Sencha Touch and jQTouch, and I see these provide a framework for controls, but I don't know if they also provide their own Javascript API, or require jQuery, or whatever. I just want to set up the best environment for doing general purpose apps.
My app needs so far are fairly simple and are only two kinds:
Loads a single page and then
loads a Flash SWF component. This
component may or may not interact
over AJAX with a backend web server.
(I'm not a fan of Flash, but my
client requests it. She runs a lot
of games for her business.)A tabbed interface with 4 static
pages and images, but then on the
5th tab, it connects to a website in
an IFRAME (or perhaps uses AJAX)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我不投票。
我建议保持应用程序尽可能小。
如果你想要一个框架,那么我更喜欢 sencha 而不是 jQTouch。正如我们所说,它更加成熟(不确定,因为我个人不使用框架)。
但如果你要商业化,那就要留意许可证。
I vote none.
I would recommend keeping the application as small as possible.
If you want a framework, then i would prefer sencha above jQTouch. It is more mature as we speak (don't know for sure as i personally do not use a framework).
But if you go commercial, then watch out for the licence.
您还可以查看使用 GWT 在 java 中编写应用程序并使用 PhoneGap 进行部署。 (仅当您喜欢用java而不是javascript编写代码时)
You can also look at using GWT for writing the application in java and deploy using phonegap. (Only if you like to code in java and not javascript)
对于一个非常简单的“类似站点”的项目,其中没有太多内容,这将取决于您选择声明式开发(jQuery)还是编程式开发(Sencha Touch,我的公司)。后者稍微成熟一些。
如果您希望构建一个更丰富、独立的应用程序(例如,使用 MVC、离线存储等),那么 Sencha Touch 将是您在两者之间唯一真正的选择。
NB Sencha Touch 附带两个许可证(GPL 和商业),并且都是免费的。
有兴趣看到当您的唯一目标是单一平台(Android,因为 Flash 依赖性)时您正在使用 Web 应用程序方法...您可能有兴趣了解这些天 CSS3 的可能性以及您可以使用的内容更愉快地跨移动操作系统平台:http://dev.sencha.com/animator/demos/
For a very simple 'site-like' project, there's not much in it, and it will come down to your choice of declarative development (jQuery) or programmatic (Sencha Touch, my company). The latter is a little more mature.
If you're looking to build a richer, self-contained app (say, with MVC, off-line storage etc), then Sencha Touch would be your only real single choice between the two.
NB Sencha Touch comes with two licences (GPL & commercial) and both are free-of-charge.
Interested to see that you are using a web app approach when your only target is a single platform (Android, because of the Flash dependency)... you might be interested to see what's possible with CSS3 these days and therefore what you could then use more happily across mobile OS platforms: http://dev.sencha.com/animator/demos/
我目前正在使用 PhoneGap 来创建跨平台游戏。我使用 JQuery 和 JQuery Mobile。我还没有看到 JQuery 有很多大小/性能问题。至于 JQuery Mobile - 目前处于 Alpha 发布阶段,并且确实存在一些问题。这对我来说很好,因为我预计 JQuery Mobile 的最终版本会在我的游戏完成时推出,但对您和您的项目来说可能不太好。您始终可以选择使用 JQuery + JQuery Mobile 并删除不需要的内容。
其他图书馆我也不能说。不过,我想指出的是,如果您要在闭源应用程序中使用 Sencha Touch,则需要商业许可证。
http://jquerymobile.com/
http://www.sencha.com/products/touch/license.php
I'm currently using PhoneGap to create a cross platform game. I use JQuery and JQuery Mobile. I have not seen many sizing/performance issues with JQuery. As for JQuery Mobile - it is currently in Alpha release stage and does have some issues. This is fine for me as I anticipate a final version of JQuery Mobile being available by time my game is complete but it may not be fine for you and your project. You always have the option of going with JQuery + JQuery Mobile and trimming out what you don't need.
The other libraries I cannot speak too. I would like to note, however, that Sencha Touch requires a commercial license if you'll be using it in a closed source application.
http://jquerymobile.com/
http://www.sencha.com/products/touch/license.php
我只在jQuery mobile和jqTouch中做了一些基本的页面。 jqTouch 目前似乎更加完善,因为 JQuery mobile 仍处于 alpha 阶段。它们都依赖于 jQuery,因此它们的性能应该是相同的,如果您已经熟悉 jQuery,那么我肯定会选择其中之一。
根据我在 Android 和 iPhone 上查看页面的测试,它们非常相似。我认为截至今天,jQTouch 更好地显示了 URL 栏,更少的 bug,但正如 Jason 所说,一旦我认为 jQuery mobile 版本 1 发布,我认为它将是更好的产品。一切都取决于你是否能及时等待它完成。
I have only done some basic pages in jQuery mobile and jqTouch. jqTouch seems to be a little more polished at the moment as JQuery mobile is still alpha. They both rely on jQuery so their performance should be the same and if you are already familiar with jQuery then I would definatly choose one of these 2.
From my test at looking at pages on Andrioid and iPhone they are preety similar. I think as of today jQTouch is better shows the URL bar less, less bugy, but like Jason said once I think jQuery mobile Version 1 is relased I think it will be the better product. All depends if you can wait for it to be finished in time.
最近几天,我从 john 那里听说他们的 jQuery mobile 仍处于 alpha 版本,但我相信他们会尽快发布它们。
你可以尝试它们,但他们无法选择使用它们,因为它不稳定。所以主要你可以尝试一些其他库
,或者你可以尝试 jQuery mobile 但无法使用。
in last days i hear from john about their jQuery mobile who still in alpha but i believe they release them as soon as possible.
you can try them but their is no option to use them because it is not stable. so mainly you can try some other library
or you can just try jQuery mobile but can't be use.