JavascriptMVC 可以与 jQuery 的替代库一起使用吗?
具体来说,我正在查看最近发布的 qMobi 并想知道是否有人有幸让 JavascriptMVC 使用它。
我假设 Zepto 不能使用它?
有人尝试过吗?
就上下文而言,我目前正在使用 Backbone + Zepto 创建移动(和移动 Web)应用程序,但我喜欢 JMVC 的构建环境和内置测试工具。然而,我并不是 jQuery 的忠实粉丝,恕我直言,对于移动 Web 应用程序开发来说,jQuery 有点太重量级了。
Specifically, I'm looking at the recently released qMobi and wondered if anyone has had any luck getting JavascriptMVC to work with it.
I'm assuming Zepto doesn't work with it?
Has anyone tried either?
For context, I'm currently creating mobile (and mobile web) apps using Backbone + Zepto but I like JMVC's build environment and built-in testing tools. I'm not however, a big fan of being tied in to jQuery which IMHO is a little too heavyweight for mobile web app development.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为 JavaScriptMVC 足够模块化,可以在构建过程中使用其生态系统(StealJS、FuncUnit 等),而无需使用 jQueryMX。构建系统将依赖于 jQuery,但发布的应用程序不会。
I think JavaScriptMVC is modular enough to use its ecosystem (StealJS, FuncUnit, ...) in your building process without using jQueryMX. The building system will depend on jQuery, but the released application will not.
正如已经说过的,您可以省略 jQueryMX,只使用steal 等来构建测试和文档,但这有点像购买没有发动机的汽车。
理论上,另一个具有 jQuery 兼容语法的库可能可以驱动 jQueryMX。尝试用 qMobi 替换 jquery/jquery.js 并查看是否有效。我猜它不会。控制器尤其大量利用 jQuery,并且大多数插件都会假设它是真正的 jQuery。
As has been said, you could leave out jQueryMX and just use steal, etc. to build test and document, but that's kind of like buying a car without an engine.
In theory, it's possible that another library with a jQuery compatible syntax could drive jQueryMX. Try replacing jquery/jquery.js with qMobi and see if it works. I'm guessing that it wont though. The controllers in particular leverage jQuery pretty heavily, and most plugins are going to assume it's the real jQuery.