jQuery 功能到 YUI 3 的映射?
我有一个项目同时使用 jQuery 1.3.2 和 YUI 2.6,现在是时候选择其中之一了。我有很多喜欢 jQuery 的开发人员,没有它就活不下去,但我认为 YUI 3 的一些功能更适合该项目(例如基本小部件)。
我试图找到 jQuery 和 YUI 3 之间的功能映射,并发现 jQuery - YUI3 Rosetta Stone ,将 jQuery 1.4.2 与 YUI 3.0.0 进行了比较。我正在查看 YUI 3.1.1 或 3.2.0 预览版,想知道是否还有其他资源?有一瞬间,我很想编写一个适配器/垫片层,但认为这只会混淆问题,并且开发人员最好在一种范式或另一种范式中工作。
更新:我看到上述内容已迁移到 http://www.jsrosettastone.com /,以及“YUI 团队已经慷慨地接管了维护工作。”现在比较 jQuery 1.4.2 和 YUI 3.1.2
I have a project that is using both jQuery 1.3.2 and YUI 2.6, and it has come time to pick one or the other. I have a lot of developers that love jQuery and can't live without it, but I think some of the features of YUI 3 are a better fit for the project (e.g. the base widget).
I was trying to find a mapping of functionality between jQuery and YUI 3, and found jQuery - YUI3 Rosetta Stone, which compared jQuery 1.4.2 to YUI 3.0.0. I am looking at YUI 3.1.1 or the 3.2.0 preview, and wonder if there were other resources? For a brief moment, I was tempted to write a adapter/shim layer, but think that would just confuse the issue and it is better for developers to work in one paradigm or the other.
Update: I see the above content has been migrated to http://www.jsrosettastone.com/, and "The YUI team has graciously taken over the upkeep." It now compares jQuery 1.4.2 and YUI 3.1.2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有点困惑。如果您不想重写 jquery 代码:包含 jquery.如果您只想使用一个库,那就是 yui:将旧版 jquery 代码重写为 yui。
但是如果您从 yui2 迁移到 yui3,您还必须重写 yui 代码,它们已经足够不同了。我认为你需要做的第一件事就是思考 - 如果有重构的资源,我会避免考虑垫片和额外的层。
不过,个人观点是 yui3 仍然没有为黄金时段做好准备,尽管他们正在做所有很酷且非常优雅的事情。
I'm slightly confused. If you don't want to rewrite your jquery code: include jquery. If you want to use only one library and that's yui: rewrite the legacy jquery code to yui.
But if you're moving from yui2 to yui3, you'll have to rewrite the yui code as well, they're different enough. I think the first thing you need to do to have think - if there are resources for a refactor, I'd avoid thinking in shims and extra layers.
The personal opinion though is yui3 is still not quite ready for primetime, despite all the cool and very elegant stuff they're doing.
卡洛斯的 Rosetta Stone 是我所知道的比较两个库功能的最佳资源。如果您发现 YUI 自 3.0.0 以来的演变有不准确之处,Carlos 确实在 GitHub 上提供了该资源,并欢迎对其进行更新/贡献。
Carlos's Rosetta Stone is the best resource I know of comparing the two libraries feature-for-feature. If you find inaccuracies given the evolution of YUI since 3.0.0, Carlos does have the resource up on GitHub and welcomes updates/contributions to it.