javascript:_JavaScript:2015年回顾

javascript:

JavaScript有着出色的一年。 尽管五月份已经达到二十岁,但新闻,项目和对该语言的兴趣仍在以指数级增长。 也许是我进入的怪圈,但我想不出另一种以相似的速度发展的技术。 跟上来变得越来越困难,所以我希望这个总结对您有帮助...

ECMAScript翻转

ECMAScript Harmony或ECMAScript 6.0的长达七年的等待于2015年6月以正式完成的规范结束

ES6立即被重新命名为ES2015,尽管我不知道有人称它为ES2015。 改名的前提是好的。 2015年是规范完成的一年。 JavaScript引擎现在可以声称它们完全符合ES2015,并且每个人都可以理解。 不幸的是,营销类型一点也不喜欢它。 到2016年1月1日听起来过时的情况下,没人会声称ES2015兼容。

ES2015对开发人员意味着什么? 准备自己的美食,例如:

  • 增强对象文字
  • let和const
  • 箭头功能
  • 模板字符串
  • 迭代器
  • 发电机
  • 解构
  • 代理
  • 弱图和弱集
  • 符号
  • 诺言
  • 反射

它大部分是语法糖。 例如,JavaScript将保留原型继承,但为那些从其他语言迁移的 mo吟 开发者提供类似于经典继承的class结构。

ES2015支持仍然不完整,但是可以使用诸如Babel之类的编译器将大多数代码转换为ES5。 它运作良好,但是额外的步骤会使测试和调试更加复杂。 就我个人而言,我是一名JavaScript Luddite,他喜欢坚持使用旧方法直到支持得到改善。

但是现在暂时忘了ES2015-让我们继续进行ES7 / 2016!

JavaScript复仇者联盟

随着WebAssembly的发布,Hype在6月达到了高潮。 一种用于Web的低级二进制压缩的类似于汇编的语言!

向浏览器交付大型应用程序并不总是可行的。 游戏或复杂程序可能需要大量兆字节的源代码,这些源代码需要下载,编译为字节码并最终作为机器代码运行。 WebAssembly通过将源代码编译为更简单,处理速度更快,JavaScript引擎兼容的字节码并将其打包为紧凑的二进制文件,从而使过程更加高效。 因此,浏览器代码将加载并启动得更快。 它的运行速度不一定比普通JavaScript快,但是可以进行优化。

我们之前曾参观过二进制土地。 Flash,Silverlight,Java和Google Native Client(NaCl)都做出了类似的承诺,但是WebAssembly应该有更好的机会:

  1. 需要对JavaScript引擎进行相对简单的更改
  2. 不需要浏览器插件,并且
  3. 由Google,Microsoft,Mozilla和Apple支持。

激动吗 您最好精通C / C ++技能,因为这是第一个WebAssembly编译器的目标。

Node.js分叉

Node.js从2014年的一个相对小众的运行时移到了2015年的必备技术。 您的台式机,服务器,Raspberry Pi,嵌入式设备等等。 甚至其他信仰的开发人员也采用Node.js来使用构建工具,例如Grunt和Gulp。

2015年,随着io.js分支的合并, 围绕Node政治争论结束了。 这意味着Node.js v0.12可能会在9月被Node.js v4.0取代。 是的,这是整个三个版本的跳跃,因为io.js已达到3.0版,并且不能向后退。

当然,版本号没有任何意义……除了那些现在认为Node.js 4+比Ruby 2和Python 3更高级的人之外。鉴于v5一个月后问世,它也已经超越.NET 4并Swift赶上了PHP 7!

框架疲劳

2015年推出了2,269个新JavaScript框架。我完全没有研究发现了这个数字,但很少有人对此表示怀疑。 很难追踪…

JavaScript开发人员不可能自信地支持特定的代码库。 碎片太多了,单片式的多合一框架可能会引起解决的问题 。 依靠抽象基础技术的框架可能很危险,并且根据这位明智的研究人员的说法, 前端JavaScript依赖是完全错误的

如果您必须但绝不认为它长期可行,请使用一个框架。 在项目进行到一半之前,将出现更新更好的替代方案。 永远不要忘记,框架是一种选择- 您不必使用 。 最小的,更灵活的项目,具有最小的依赖性,是一个更安全的选择。

工具潮汐波

您还记得无忧无虑的日子,当时Web开发仅需要浏览器,文本编辑器和FTP客户端吗? 今天,您需要Node.js,Gulp / Grunt,git,静态HTML生成器,Sass编译器,Autoprefixer,minifiers,uglifiers,lint,BrowserSync和其他一系列构建工具来创建基本的“ Hello World”页面。

大部分都很好。 我们正在开发越来越复杂的Web应用程序,并且这些工具使我们能够自动执行平凡的流程,并专注于更有趣的棘手部分。 2015年是丰收的一年:

  • Atom 1.0 — GitHub的基于Node.js的可入侵编辑器,于6月启动
  • PostCSS-快速,模块化CSS处理器获得年度最佳工具奖
  • 包括EdgeVivaldi在内的大量新浏览器,以及众多开发人员工具的增强。

免费学习PHP!

全面介绍PHP和MySQL,从而实现服务器端编程的飞跃。

原价$ 11.95 您的完全免费

然而,尽管有所有这些免费的优化工具, 但平均每个网页的重量仍超过2MB ,由一百个单独的文件组成。 那是进步吗? 如果您阅读了Klint Finley的《 我关闭JavaScript一整周,那真是光荣》,也许就不行了 。 这并不是技术的错,而是实现的错。 关闭JavaScript会阻止广告,弹出窗口,模式对话框,无限滚动页面,社交注册提示,新闻快报以及我们认为在网页上至关重要的所有其他令人讨厌的膨胀。

一些公司希望通过诸如Facebook InstantGoogle Accelerated Mobile Pages之类的替代方法来阻止网页腐烂。 我不认为隔离的非标准网络是答案。

最后

这是官方的: Node.js比PHP更好 ! 诚然,这篇文章并没有这么说,但它说明了Node.js的发展。 鉴于版本7速度的提高,PHP现在可能会赢,但最终,请使用您认为合适的任何方式。 有争议的是,Automattic最近将其WordPress.com前端从PHP转换为Node.js,但我怀疑这更多地是关于Calypso项目状态而不是语言。

2015年的技术流行语是“同构” 。 SitePoint已经对其进行了讨论提供了示例代码,但从本质上讲,它意味着您编写JavaScript代码可在任何地方(在浏览器或服务器上)都可以使用。 对于小型,独立的实用程序而言,它相对简单,但是很快变得令人麻木。

jQuery 3.0的第一个alpha 版本于7月发布 。 承诺提供两个新版本; 一个用于现代浏览器,一个包含IE8支持的Compat版本。 团队预计很少会有重大变化,这是一项可观的成就。

去年12月,Mozilla宣布将停止销售基于JavaScript的Firefox OS智能手机 。 Firefox OS的发展并不止于此-发展仍在继续,并且已在某些智能电视中使用-但迹象并不理想。 押注与操作系统无关的可安装脱机Web应用程序也许更好?

2015年,最大的企业JavaScript惊喜来自微软,其产品包括:

考虑到最近对网络的开放性,也许我们应该将公司称为“新微软”?

2016年展望

对JavaScript的态度已经改变。 几年前,它被(不公平地)嘲笑为真正的开发人员所避免的一种难以理解的,多虫的脚本语言。 如今,您无法回避这种语言,并且工具,框架和项目的增长将在2016年继续。

跟上步伐并非易事,但要支持JavaScript,就不会出错。

翻译自: https://www.sitepoint.com/javascript-2015-review/

javascript:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
JavaScript: Moving to ES2015 by Ved Antani English | 24 Mar. 2017 | ASIN: B06XWDKLS8 | 1194 Pages | AZW3 | 9.08 MB Explore and master modern JavaScript techniques with ES2015 in order to build large-scale web applications About This Book This course offers an expert's eye on the latest ES6 features and how these advanced tasks fit together in JavaScript as a whole Discover robust JavaScript implementations of classic and advanced design patterns Learn about modern web architectures and build real-world apps on top of them Who This Book Is For This course is for experienced developers familiar with other object-oriented languages who wants to learn new capabilities of ES-2015 to improve their web development skills and build professional-quality web applications. This also goes for those who want to explore some modern JavaScript features, techniques, and architectures in order to develop cutting-edge web applications. What You Will Learn Get a run through of the basic language constructs, Functions, and Closures of JavaScript Code using the powerful object-oriented feature in JavaScript Master DOM manipulation, cross-browser strategies, and ES6 Harness the power of patterns for tasks ranging from application building to code testing Identify the best use cases for microservices Gain expertise in responsive and dynamic website design Enable real-time communications between client-client and client-server/server-client Write complete applications using functional reactive programming In Detail JavaScript is a high-level, dynamic, untyped, lightweight, and interpreted programming language. Mastering modern JavaScript techniques and the toolchain are essential to develop web-scale applications. This Learning Path will upgrade your skills to ES2015, and you will get to introduce yourself to popular frameworks like React and Angular 2. In the first module, you will get familiar with the language constructs and how to make code easy to organize. You will gain a concrete understanding of variable scoping, loops, and best practices on using types and data structures, as well as the coding style and recommended code organization patterns in JavaScript. By the end of the module, you will understand how reactive JavaScript is going to be the new paradigm. Over the course of the next module, you will explore how design patterns can help you improve and organize your JavaScript code. You'll get to grips with creational, structural, and behavioral patterns and get a deeper look at patterns used in functional programming, as well as model view patterns and patterns to build web applications. By the end of the module, you'll be saved of a lot of trial and error and developmental headaches, and you will be on the road to becoming a JavaScript expert. In the last leg of this course, you will shift your focus to network programming concepts as you build a real-time web application with websockets. Along the way, you'll explore how the power of JavaScript can be increased multi-fold with high performance techniques. By the end of this module, you'll be a skilled JavaScript developer with a solid knowledge of the latest JavaScript techniques, tools, and architecture to build modern web apps. This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products: Mastering JavaScript by Ved Antani Mastering JavaScript Design Patterns, Second Edition by Simon Timms Modern JavaScript Applications by Narayan Prusty Style and approach This course is a comprehensive guide with a clear focus on practical use cases and patterns. Each chapter consists of best practices, useful advice, and a bunch of easy-to-follow examples that will build up your skills as you advance.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值