从 jQuery 切换到 Dojo 的缺点
我正在考虑在一些新项目(或至少包括它)中使用Dojo,部分原因是它与 Google Closure 编译器的高级模式兼容,这将(希望)完全删除所有未使用的代码。
我会失去什么? (除了熟悉语法之外)
(此外,通常任何有关不同之处的提示可能会有所帮助)
I am considering using Dojo in some new projects (or at least including it),, Partially because of it's compatibility with Google Closure Compiler's Advanced mode which will (hopefully) entirely delete all unused code.
What would I lose? (besides familiarity with syntax)
(also, generally any tips on what is different would probably be helpful)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我自己使用 jQuery,但总而言之,jQuery 似乎有更好的文档记录,并且更容易“开箱即用”地完成很酷的事情。如果您知道自己在做什么,Dojo 似乎更容易扩展。我从 社区 wiki 获取此信息:
jQuery
Dojo
“作为一名 Dojo 开发人员,我会推荐 Dojo。虽然我的选择并不奇怪,但我成为一名 Dojo 开发人员是因为我发现以下事情比其他 JavaScript 框架做得更好:”
“社区中的聪明人(最后但并非最不重要的)——尽管我很喜欢为新手提供指导,但在某些时候,每个开发人员都会变得“经验丰富”,并且需要的远不止于此。
如果您只想编写简单的代码并向现有 Web 应用程序添加简单的渐进式增强功能,那么您几乎可以使用任何框架甚至纯 JavaScript 来完成此操作。但是,一旦您的 Web 应用程序变得更大或更复杂,良好的包装、对您喜欢的方法的良好支持、良好的构建块以及制作自己的构建块的能力就变得越来越重要。这就是为什么我选择了 Dojo,并且再也没有回头。”
I use jQuery myself, but to sum it up jQuery appears to be better documented and easier to do cool stuff "out of the box". Dojo appears to be easier to extend if you know what you are doing. I got this info from the community wiki here:
jQuery
Dojo
"Being a Dojo developer I would recommend Dojo. While my choice is not surprising, I became a Dojo developer because I found following things, which are done better than in other JavaScript frameworks:"
"Smart people in the community (last but not least) — as much as I love hand-holding for novices at some point every developer becomes "seasoned" and needs much more than that.
If all you want is to write one-liners and add simple progressive enhancements to existing web applications, you can do it with pretty much any framework, or even with a pure JavaScript. But as soon as your web application becomes bigger or more complex good packaging, good support for your favorite methodologies, good building blocks, and the ability to make your own building blocks become more and more important. That's why I settled on Dojo, and never looked back."
就其价值而言,dojo 的完整源代码版本附带了 ShrinkSafe。我不熟悉它和闭包编译器之间的任何性能比较,但我发现 dojo 的模块管理和打包工具(包括 ShrinkSafe)非常有用。
For what it's worth, the full source version of dojo comes with ShrinkSafe. I'm not familiar with any performance comparisons between that and the closure complier, but I find dojo's module management and packaging tools (including ShrinkSafe) to be very useful.
好吧,如果我现在需要说一些事情,我会说 jquery 和 dojo 对我来说没有区别,因为我不使用两者。我使用纯javascript,我对此进行了更深入的研究,我不需要任何库我创建自己的框架我自己的东西更快,更纯粹,更固化,
我会说我讨厌所有库,因为它让我更不知道诸如 JavaScript 的奇妙及其美丽之类的事情。
我不建议使用任何库,如果你需要的话,请在你真正了解 javascript 之后再使用。
Well if I need to say some thing now I would say there is not a difference for me between jquery and dojo because I don't use both. I use pure javascript that i have gone deeper on it that I don't need any of the libraries I create my own framework my own things more fast, pure, cured,
And I would say I have hated all libraries cause it make me more unkowing of things like the wonder of javascript and its beauty.
I dont advise using any library and if you need so do it after you know javascript for real.