将 jquery 语法转换为 mootools 语法的在线实用程序

发布于 2024-08-27 06:33:06 字数 79 浏览 8 评论 0原文

有没有在线实用程序可以将 jquery 语法转换为 mootools 语法?
有没有将 jquery 转换为 mootools 的指南?

Is there any online utility to convert jquery syntax to mootools syntax?
Is there any guideline to convert jquery to mootools?

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

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

发布评论

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

评论(2

怀中猫帐中妖 2024-09-03 06:33:06

我还没见过一个,没有。

但我认为,即使确实存在,也可能不会那么好。当你处理像 JavaScript 这样富有诗意的语言时,很难传达代码的含义;做类似事情的方法太多了。

更糟糕的是,您无法将 MT 直接映射到 JQ。它们的功能集略有不同,并且每个都依赖于正在实现的额外功能。

我认为你自己转码会得到一个更干净、更易于维护的结果。这也是改进原版的好机会,这并不是一件坏事。

I've not seen one, no.

But I would argue that even if one did exist, it probably wouldn't be that good. It's hard to convey the meaning of code when you're dealing with such a poetic language as JavaScript; there are just too many ways of doing similar things.

Worse still is that you can't map MT to JQ directly. They have slightly different feature-sets and each would rely on extra things being implemented.

I think you'd get a much cleaner, massively more maintainable result transcoding it yourself. It's a good opportunity to improve on the original too, which can't be a bad thing.

若言繁花未落 2024-09-03 06:33:06

虽然我不知道有什么指导方针,但我首先浏览一下这些:

http://www.jqueryvsmootools。 com - 由 aaron newton 和评论贡献者在两个框架下并排完成相同的事情

http://www .davidwaslh.name - mootools 核心团队开发人员也经常使用 jquery,并且经常发布有关两个框架之间可互换代码的提示,他甚至有一个插件可以为 mootools 启用 jquery 语法 - 我知道这是相反的你想要什么,但这只是一个开始——我认为他将其编码是为了演示 mootools 的灵活性,并使其对想要更进一步的 jquery 用户更具吸引力,但它非常有用。

混合这两个框架似乎很流行,即使今天我在 Twitter 上看到了这一点:
http://jsfiddle.net/fate/jGhpc/ (jquery 中的 mootools“style”类)

或 ryan florence 在 jquery 中实际实现的 mootools OOP 模型: http://ryanflorence.com/object-oriented-jquery-with-mootools-pigs-take-flight/

底线是,您需要做一些工作,但这是一个好东西,真的会让您了解哪个框架更适合您。

although there are no guidelines that I know of, I'd start by glancing over at these:

http://www.jqueryvsmootools.com - same things being done under both frameworks side by side, by aaron newton and comment contribs

http://www.davidwaslh.name - mootools core team dev that also works a lot with jquery and often releases tips on interchangeable code between the two frameworks, he even has a plugin that enables jquery syntax for mootools - i know it's the reverse of what you want but it's a start--i think he coded it to demo of how flexible mootools is and make it more appealing to jquery users that want to go further but it's quite useful.

mixing the two frameworks seems quite popular, even today i saw this on twitter:
http://jsfiddle.net/fate/jGhpc/ (mootools "style" Classes in jquery)

or ryan florence's ACTUAL implementation of the mootools OOP model inside of jquery: http://ryanflorence.com/object-oriented-jquery-with-mootools-pigs-take-flight/

bottom line is, you will need to do some work but it's a good thing, will really give you a perspective on which framework is better suited to you.

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