决定选择正确的 iOS Mobile Safari Web 开发工具(jQuery Mobile/Sencha Touch/等)时感到沮丧

发布于 2024-11-01 04:00:16 字数 958 浏览 4 评论 0原文

在使用 Backbone JS 和 jQuery Mobile 为 iPad Mobile Safari 完成一个项目后,我感觉 jQuery Mobile 可能不是适合该特定工作的工具。

我发现 jQuery Mobile 的性能总体上相当令人失望。许多移动 JS 框架(处理转换、对话框等)似乎都遇到了同样的问题。让 jQuery Mobile 和 Backbone JS 很好地协同工作似乎有点困难。

我需要像 jQuery Mobile 这样的东西来处理拖放元素和页面转换(和对话框)。 Backbone JS 非常适合我们正在做的事情,因此我们希望将其保留在工具箱中。我们只为 iPhone 和 iPad 做项目,在本机(使用 Objective-C)做这些项目在这种情况下是不合适的。

最近完成的项目最终使用了 jQuery、jQuery Mobile、jQuery UI、一些使 jQuery UI 与触摸兼容的小插件、Backbone JS、Underscore JS...对于移动设备上的 Web 应用程序来说,这一切似乎都很沉重!我想要一些功能强大且占地面积更小的东西。

Sencha Touch 似乎具有出色的性能,但似乎您需要先投入其中并完全了解它的工作原理。但也许我全错了?我更想要的是能够与 Backbone 配合良好、相对轻量级并且具有大量用于为 iPhone/iPad 构建漂亮 UI 的功能(手势支持、页面/对话框转换、列表视图等)。理想情况下,它的行为更像 jQuery - 我称它为 DOM 上的位,并且当我们不想要它时不妨碍它 - 而不是它是一个命令框架并且必须遵守它的规则(像 jQuery移动设备,最有可能的是 Sencha Touch)。还看到了jQTouch...不过这个现在已经被Sencha接管了,也就是说它已经死了?

有什么东西可以做到这一点吗?我们可以使用一些轻量级、稳定、快速和可靠的东西,与 Backbone JS 结合使用,为 Mobile Safari 创建快速、响应式的 Web 应用程序……它仍然具有 UI 和过渡等所有有用的功能,使应用程序大放异彩?

After completing one project with Backbone JS and jQuery Mobile for the iPad Mobile Safari, it left me feeling that jQuery Mobile is maybe not the right tool for that particular job.

I have found the performance of jQuery Mobile generally quite disappointing. A lot of the mobile JS frameworks (that handle transitions, dialogs etc) seem to suffer from the same thing. Getting jQuery Mobile and Backbone JS to work nicely together seemed a little jagged.

I needed something like jQuery Mobile to handle drag and drop elements and page transitions (and dialog boxes). Backbone JS is great for what we're doing, so we want to keep this in the toolbox. We're doing projects only for the iPhone and iPad and doing them natively (with Objective-C) just isn't appropriate in this case.

The recently completed project ended up using jQuery, jQuery Mobile, jQuery UI, some little plugin that makes jQuery UI work with touch, Backbone JS, Underscore JS... It all just seems so heavy for a web app on the mobiles! I want something powerful and smaller in footprint.

Sencha Touch seems to have great performance, but it does seem that you need to jump feet first into it and go the whole way with how it works. But maybe I have that all wrong? I'm more looking for something that plays nice with Backbone, is relatively lightweight and has lots of bits for building nice bits of UI for the iPhone/iPad (gesture support, page/dialog transitions, list views etc). Ideally something that acts more like jQuery - where I call it to do the bits on the DOM and stays out of the way when we don't want it - rather than it being a dictating framework and having to play by it's rules (like jQuery Mobile and most probably Sencha Touch). Also saw jQTouch... But this has been taken over by Sencha now, meaning that it's dead?

Is there anything that does this? Something lightweight, stable, fast and reliable that we can use, in conjunction with Backbone JS, to create fast, responsive web apps for Mobile Safari...that still has all the useful bits of UI and transitions etc that would make the app shine?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苦行僧 2024-11-08 04:00:16

嗯……我同意你关于 JavaScript 框架膨胀部分的看法。我发现 jqTouch、jQuery Mobile 和 Sencha 也很令人沮丧。那里有太多不需要的东西。然后我查看了 Zepto 和 BaseJS,但它们大多只是针对移动 JavaScript,没有提供控件或布局帮助。所以我卷起袖子重新发明了轮子。我创建了一个名为 ChocolateChip-UI 的框架。它为移动 Web 应用程序提供了一种清晰、直接的标记语言,称为 WAML(Web 应用程序标记语言)。它还提供了许多标准的 iOS 类型控件和布局,可以轻松自定义以创建独特的外观。大多数 ChocolateChip-UI 控件都可以手动编码或动态创建,并通过简单的调用进行初始化。 ChocolateChip-UI 负责使控件具有适当的行为。

我快速浏览了一下 Backbone,我的感觉是应该可以使用 ChocolateChip-UI 的布局和控件作为 Backbone 视图。所有 ChococlateChip-UI 应用程序的根都是“app”。这将有一个或多个“视图”,也可以有“子视图”。因此,您似乎应该能够将 ChocolateChip-UI 视图和子视图映射到 Backbone 视图。如果你能做到这一点,请告诉我。无论如何,当我有足够的空闲时间时,我会有兴趣亲自测试它,看看我是否可以为那些想要使用 Backbone 的人制作一个内置 Backbone 支持的特殊版本 ChocolateChip-UI。基本上,那个版本的 ChocolateChip-UI 将成为 Backbone 的增强视图引擎。

就此而言,ChocolateChip-UI 是开源的。您可以随意对其进行拆解或脑白质切除以满足您的目的。

Hmmm... I agree with you about the JavaScript framework bloat part. I found that quite frustrating with jqTouch, jQuery Mobile and Sencha as well. There was just too much stuff that didn't need to be there. Then I looked at Zepto and BaseJS, but they were mostly just for mobile JavaScript and provided no controls or layout help. So I rolled up my sleeves and reinvented the wheel. I created a framework called ChocolateChip-UI. It provides a clear and straightforward markup language for mobile Web apps called WAML (Web App Markup Language). It also provides many standard iOS type controls and layouts that are easily customized to create unique looks. Most ChocolateChip-UI controls can be hand-coded or created dynamically and initialized with a simple call. ChocolateChip-UI takes care of making the controls have the appropriate behaviors.

I took a quick look at Backbone and my feeling is that it should be possible to use ChocolateChip-UI's layouts and controls as Backbone Views. The root of all ChococlateChip-UI apps is "app". This will have one or move "views" which can also have "sub-views". So, it seems like you should be able to map ChocolateChip-UI views and subviews to Backbone views. If you get this to work, please do let me know. Regardless, when I have enough spare time I'll be interested in testing it myself and seeing if I might make a special version of ChocolateChip-UI with Backbone support built in for those that want to use Backbone. Basically then that version of ChocolateChip-UI would become an enhanced view engine for Backbone.

For that matter, ChocolateChip-UI is open source. Feel free to cannibalize or lobotomize it to suit your purposes.

哭泣的笑容 2024-11-08 04:00:16

Sencha Touch 确实是“先跳入其中,然后一路走下去”——但在我看来,这是值得花时间的。 (我目前正在“进入 Sencha Touch”)

在我自己寻找正确框架的过程中,我还遇到了 NimbleKit (http://www.nimblekit.com)。 Nimblekit 处于稳定版本,提供 iOS UI 元素,并且可以使用您希望的任何 JS 库进行扩展。然而,Nimblekit 不是基于 Web 应用程序的……

因此,选择归结为 jQuery Mobile(并等待该库的进一步开发 // 性能优化)或 Sencha,这是一个非常广泛的框架,但学习曲线陡峭。

Webapp 的性能始终难以优化。

Sencha Touch is indeed quite 'jump feet first into it and go the whole way' - But in my opinion this is worth the time. (I'm currently in the proces of 'getting into Sencha Touch)

In my own search for the right framework I also came across NimbleKit (http://www.nimblekit.com). Nimblekit is in it's stable release, offers the iOS UI elements and can be extended with any JS Library you wish. Yet, Nimblekit is not web-app based...

Because of that the choice comes down to jQuery Mobile (and wait for the further development of this library // performance optimization) or Sencha, a very extensive framework but a steep learning curve.

The performance of Webapps will always be difficult to optimize.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文