简体   繁体   English

Dajax与jQuery

[英]Dajax vs jQuery

I am currently using the dajax/dajaxice plugin for django in order to take care of ajax calls. 我目前正在使用django的dajax / dajaxice插件来处理ajax调用。 We are also using jQuery for a lot of UI operations, but decided to keep dajax because of simpler configuration. 我们还将jQuery用于许多UI操作,但由于配置更为简单,因此决定保留dajax。 Are there any advantages to using jquery's ajax functionality? 使用jquery的ajax功能有什么好处? Are there any disadvantages to using dajax? 使用dajax有什么缺点吗?

Thanks, 谢谢,

jQuery's Ajax support requires no configuration, but you don't have the "magic" of being able to call a specific actions on the server directly from JavaScript. jQuery的Ajax支持不需要配置,但是您没有“魔术”可以直接从JavaScript调用服务器上的特定操作。 Instead, you will need to provide actions for each Ajax request. 相反,您将需要为每个Ajax请求提供操作。 I wouldn't doubt that there is already a jQuery plugin for Django, and if there isn't, you could basically just recreate Dajax in jQuery. 我毫不怀疑已经有一个Django的jQuery插件,如果没有,基本上可以在jQuery中重新创建Dajax。

I see no reason to switch to jQuery, if Dajax is working for you, except that it would result in one less dependency. 如果Dajax为您工作,我认为没有理由切换到jQuery,除了它会减少一个依赖。 But, does one less dependency make sense for you in terms of rewriting code that already works with Dajax? 但是,就重写已经可以与Dajax一起使用的代码而言,减少依赖性就对您有意义吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM