admin管理员组文章数量:1431413
I am wondering if it is OK to use multiple javascript frameworks for example (jQuery, Raphael) in the same script (handling event & ajax with jQuery and drawing with Raphael) ?
I am wondering if it is OK to use multiple javascript frameworks for example (jQuery, Raphael) in the same script (handling event & ajax with jQuery and drawing with Raphael) ?
Share Improve this question edited Dec 15, 2018 at 14:38 Cœur 38.8k25 gold badges206 silver badges279 bronze badges asked Jun 11, 2010 at 8:34 Ayoub M.Ayoub M. 4,81810 gold badges43 silver badges52 bronze badges4 Answers
Reset to default 6Raphael isn't really a framework. It's a specialized library.
When it es to mixing frameworks, then it is usually a bad idea.
While you can usually persuade them to run without conflicting, you end using a lot of code that does the same job as a lot of other code in the page. This adds a lot of overhead to the page, which is bad for performance.
Yeah it's fine. jQuery will happily not bind to $
if you ask it (and need it):
jQuery.noConflict();
I don't think there's any problem about it since Raphael's demo already uses jQuery : http://raphaeljs./analytics.html (look at code source).
If you have good reason to do so: yes. Such a reason would be that both frameworks have different features. Obviously you should only use stable frameworks that have no known issues of interference with other frameworks (or provide a way to avoid interference, like jQuery does with the noConflict method)...
Anyway it might not be a bad idea to search the jQuery plugin directory (plugins.jquery.) to see if there's anything available like Raphael, or maybe a plugin that integrates Raphael with jQuery before bining the two yourself...
本文标签: jqueryis it right to combine javascript frameworksStack Overflow
版权声明:本文标题:jquery - is it right to combine javascript frameworks? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745581808a2664664.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论