学习 Dart 好还是我必须继续使用基本的 javascript?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13692812/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 19:30:01  来源:igfitidea点击:

Is it good to learn Dart or i must stay with the basic javascript?

javascripthtmlclient-sidedart

提问by Mike Boutin

Is it better to stay with the basic Javascript language or will Dart save me a lot of time? I think Dart looks like very cool software, but will it increase my production? Is Dart code faster than javascript?

继续使用基本的 Javascript 语言会更好还是 Dart 会为我节省很多时间?我认为 Dart 看起来是一个很酷的软件,但它会增加我的产量吗?Dart 代码比 javascript 更快吗?

Is it a good way to go or is it still unclear whether to choose to learn it?

是好办法还是目前还不清楚是否选择学习?

My goal is to make very good animated websites, with some complex custom transitions. I do well with jQuery, but i want to be more specific and professional than using jQuery plugins and tweak it.

我的目标是制作非常好的动画网站,并带有一些复杂的自定义过渡。我用 jQuery 做得很好,但我想比使用 jQuery 插件和调整它更具体和专业。

Thank you very much for your help and advice.

非常感谢您的帮助和建议。

采纳答案by RonaldBarzell

It all comes down to what you are trying to do and what your requirements are. I recommend you read some of the Dart vs. Javascript pages (to get both sides of the story) and ask yourself where you stand after reading those.

这一切都取决于您要尝试做什么以及您的要求是什么。我建议您阅读一些 Dart 与 Javascript 页面(以了解故事的双方),并在阅读完这些之后问问自己您的立场。

Here are some quick links from a Google of "Dart vs. Javascript". Please note that these links may not be balanced or even have very good reasons, but I hope they are enough to get you started. I highly recommend that you look for some more comparisons and do your own research on both sides of the issue:

以下是来自 Google 的“Dart vs. Javascript”的一些快速链接。请注意,这些链接可能不平衡,甚至有很好的理由,但我希望它们足以让您入门。我强烈建议您寻找更多比较,并对问题的双方进行自己的研究:

Here's a pro-Dart page, but one that gives details on why the poster likes Dart: http://www.grobmeier.de/10-reasons-why-dart-is-cooler-than-javascript-03012012.html#.UL0kXuT7J8E

这是一个支持 Dart 的页面,其中详细说明了海报为何喜欢 Dart:http: //www.grobmeier.de/10-reasons-why-dart-is-cooler-than-javascript-03012012.html#。 UL0kXuT7J8E

And here's a more pro-Javascript angle: http://www.quirksmode.org/blog/archives/2011/10/dart_or_why_jav.html

这是一个更亲 Javascript 的角度:http: //www.quirksmode.org/blog/archives/2011/10/dart_or_why_jav.html

Again, don't take these links as instructions on whether you should or should not use Dart. Rather, read WHY each link supports one or the other then ask yourself if that reasoning applies to your case.

同样,不要将这些链接作为是否应该使用 Dart 的说明。相反,阅读为什么每个链接支持一个或另一个,然后问问自己这种推理是否适用于您的情况。

回答by Markus A.

This talk where Google introduced Dart at the last Google I/O conference earlier this year might answer a bunch of your questions and considerations:

谷歌在今年早些时候的最后一次谷歌 I/O 大会上介绍了 Dart 的这个演讲可能会回答你的一系列问题和考虑:

http://www.youtube.com/watch?v=bsGgfUreyZw

http://www.youtube.com/watch?v=bsGgfUreyZw

In short: It doesn't sound like Dart is at the point where it's really that useful yet. So one of the things you need to consider is: When do you need the tool by. If it's now, stay away from Dart (for now).

简而言之:听起来 Dart 还没有达到它真正有用的地步。因此,您需要考虑的一件事是:您何时需要该工具。如果是现在,请远离 Dart(暂时)。

If you are interested in alternatives to coding in plain JavaScript, you should also check out the Google Web Toolkit. I have a feeling Dart might even be the evolution of GWT.

如果您对纯 JavaScript 编码的替代方案感兴趣,您还应该查看 Google Web Toolkit。我有一种感觉,Dart 甚至可能是 GWT 的演变。

GWT is very mature, ready for action today, and uses Java for development, which, combined with Eclipse or IntelliJ delivers amazing productivity that I don't think is possible in JavaScript. Especially for complex applications that need to run cross-browser and actually be reasonably bug-free.

GWT 非常成熟,可以立即投入使用,并使用 Java 进行开发,结合​​ Eclipse 或 IntelliJ 可提供惊人的生产力,我认为这在 JavaScript 中是不可能的。特别是对于需要跨浏览器运行并且实际上没有错误的复杂应用程序。

Here's a (pretty old, but) good intro to GWT as well, also from Google I/O (but 2008):

这是 GWT 的(很旧,但是)很好的介绍,同样来自 Google I/O(但 2008 年):

https://www.youtube.com/watch?v=nvti32k4xyU(replaced the link... this one is better)

https://www.youtube.com/watch?v=nvti32k4xyU(替换了链接……这个更好)