从 Jquery Mobile 切换到 AppFramework
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16495803/
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
Switching from Jquery Mobile to AppFramework
提问by Alain Zelink
I've built a project using Jquery Mobile. JQM seems perfect for fast prototyping but the end result on an iphone 3GS/IOS 5.1 is far from fluid. I've tried a lot of hacks/tricks to make it faster and got rid of transitions but still, I cannot get a satisfying result.
我已经使用 Jquery Mobile 构建了一个项目。JQM 似乎非常适合快速原型设计,但在 iphone 3GS/IOS 5.1 上的最终结果远非流畅。我尝试了很多技巧/技巧来使其更快并摆脱过渡,但仍然无法获得令人满意的结果。
I've been looking around. What I need is a lightweight solution with a decent UI (JQM is perfect for what I need in that domain).
我一直在环顾四周。我需要的是一个轻量级的解决方案,它有一个不错的 UI(JQM 非常适合我在该领域中的需求)。
trigger.io and AppFramework seem to be the 2 solutions which are available (maybe I'm missing some others).
trigger.io 和 AppFramework 似乎是可用的 2 个解决方案(也许我错过了其他一些解决方案)。
I'd like to give AppFramework a go but I'd like to have feedback from people who have made the change.
我想试一试 AppFramework,但我想从做出更改的人那里得到反馈。
Thank you.
谢谢你。
回答by Gajotres
Intro
介绍
A larger version of this answer can also be found HERE.
这个答案的更大版本也可以在这里找到。
jQuery Mobilewas never intended to be used only as an HTML5/CSS3 hybrid mobile app framework. On a similar track like its older brother jQueryand jQuery UIit was intended to be used as a robust, responsive solution in the ever growing mobile web application market. What it took from its older brother was an all around browser support. Run it on every possible major platform and it should work just the same.
jQuery Mobile从未打算仅用作 HTML5/CSS3 混合移动应用程序框架。在与它的哥哥jQuery和jQuery UI类似的轨道上,它旨在在不断增长的移动 Web 应用程序市场中用作强大的响应式解决方案。它从它的哥哥那里得到的是全面的浏览器支持。在所有可能的主要平台上运行它,它的工作方式应该是一样的。
That same broad browser support also brought another problem and that is platform optimization. Because jQM can't favor specific platforms also means it is not optimized to use most in any of it.
同样广泛的浏览器支持也带来了另一个问题,那就是平台优化。因为 jQM 不能支持特定平台也意味着它没有被优化以在任何平台中使用大多数。
Let us also talk about Phonegapa bit. While great app packaging system it becomes a hell hole when used with a larger jQuery Mobileapplication. It's like two great parents made a deformed bastard child or to large pluses gave as an even bigger minus.
让我们也谈谈Phonegap。虽然很棒的应用程序打包系统,但当与更大的jQuery Mobile应用程序一起使用时,它就变成了一个地狱。这就像两个伟大的父母生了一个畸形的私生子,或者把大的优点变成了更大的缺点。
Solutions
解决方案
Like always in human history another groups of developers came to fill this evident hole. And here came jqMobi(now AppFramework), jqTouch, Zepto, Sencha Touch, Trigger.ioand others.
就像人类历史上一样,另一组开发人员来填补这个明显的漏洞。在这里,来到jqMobi(现AppFramework),jqTouch,的Zepto,煎茶触摸,Trigger.io等。
Good vs ...
好对...
Before going any further than jQuery Mobile one thing must be understood, whatever you gain in speed (and trust me you will get it), you will lose in community support. While every earlier mentioned framework has a sizable developer community behind them, all of them combined can't even come close to jQM.
在进一步了解 jQuery Mobile 之前,必须了解一件事,无论您在速度上获得什么(相信我,您会得到它),您都将失去社区支持。尽管前面提到的每个框架背后都有一个相当大的开发人员社区,但所有这些组合起来甚至都无法与jQM 相提并论。
With this said, let us delve into specifics. From my experience currently two best solutions as HTML5/CSS3 Android and iOS hybrid app frameworks are AppFrameworkand Sencha Touch. First, let me say, they are fast, faster than jQuery Mobilewill ever be (if jQ developers stay on this course). UI support is similar if not even better in the case of Sencha Touch, not to mention UI is more native looking that it is the case with jQuery Mobile. Listviews are faster, scrolling is better, transitions do not stutter.
话虽如此,让我们深入研究细节。根据我的经验,目前作为 HTML5/CSS3 Android 和 iOS 混合应用程序框架的两个最佳解决方案是AppFramework和Sencha Touch。首先,让我说,它们比jQuery Mobile快,永远快(如果 jQ 开发人员继续学习这个课程)。在Sencha Touch的情况下,UI 支持类似,甚至更好,更不用说 UI 看起来更原生,jQuery Mobile 就是这种情况。列表视图更快,滚动更好,过渡不会卡顿。
... bad
... 坏的
Before someone asks why do people then choose to use, jQuery Mobileinstead? The obvious reason would be community support and to some extent, this is the truth. But there are some other pressing matters here. While jQMobyadvertise it self as a truer jQueryalternative to jQuery Mobileit is a big lie. While still a great an excellent framework they are using this saying as a marketing trick. They have indeed cloned (redone them) a lot of jQueryfeatures but this is only a partial job, and veteran jQuerydevelopers are going to find them self in a problem. They will not be able to make fully the most of their previous knowledge thus spending more time trying to find how to do something that was supposed to work than working on an app.
在有人问为什么人们会选择使用jQuery Mobile 之前?显而易见的原因是社区支持,在某种程度上,这就是事实。但这里还有一些其他紧迫的问题。虽然jQMoby宣称自己是jQuery Mobile的更真实的jQuery替代品,但这是一个很大的谎言。虽然仍然是一个很棒的优秀框架,但他们将这句话用作营销技巧。他们确实克隆(重做)了很多jQuery功能,但这只是部分工作,而且经验丰富的jQuery开发人员会发现他们自己遇到了问题。他们将无法充分利用他们以前的知识,因此花费更多的时间试图找到如何做一些应该有效的事情而不是在应用程序上工作。
On the other hand Sencha Touchdoesn't suffer from this problem because it has a different, almost alien syntax. Like with jqMobyyou will need a lot of time to get into its syntax. But have no fear, the result will be satisfactory in the end.
另一方面,Sencha Touch不会遇到这个问题,因为它有一个不同的,几乎是异类的语法。与jqMoby一样,您将需要大量时间来了解其语法。但是不要害怕,最终的结果会是令人满意的。
One other thing, unlike jQuery Mobile and Phonegap, AppFrameworkand Sencha Touchhas their native app packaging system. In my humble opinion, this system is better than Phonegapbecause they are made to work with their js frameworks. Only thing Phonegaphave over them is a HUGE plugin development community.
另一件事,与 jQuery Mobile 和Phonegap 不同,AppFramework和Sencha Touch有他们的原生应用程序打包系统。在我看来,这个系统比Phonegap更好,因为它们是为了与他们的 js 框架一起工作的。唯一的PhoneGap有超过他们是一个庞大的插件开发社区。
Links
链接
jQuery vs Zepto vs jQMobi - which one is the fastest?
jQuery vs Zepto vs jQMobi - 哪个是最快的?
In this case jQuery is like jQuery Mobile because test here relays on an underlying framework functionality which jQM takes from jQ.
在这种情况下,jQuery 就像 jQuery Mobile,因为这里的测试依赖于 jQM 从 jQ 获取的底层框架功能。
Good ranting on jQuery Mobile vs. Sencha Touch
关于 jQuery Mobile 与 Sencha Touch 的好评论
Title says it all.
标题说明了一切。
Only good jqMoby support site
唯一好的 jqMoby 支持站点
Only good Sencha Touch support site
唯一好的 Sencha Touch 支持网站
Conclusion
结论
AppFramework is probably the best choice for you. It has a similar design as jQuery Mobile so the syntax is not going to be a problem.
AppFramework 可能是您的最佳选择。它具有与 jQuery Mobile 类似的设计,因此语法不会成为问题。