JavaScript 的历史

On Christmas Day 1990, Sir Tim Berners-Lee introduced the world to the first web browser he had created in Switzerland on the NeXT computer system and around the same time, he also created the first web server.
1990 年圣诞节那天,蒂姆·伯纳斯-李爵士向世界介绍了他在瑞士在 NeXT 计算机系统上创建的第一个网络浏览器,大约在同一时间,他还创建了第一个网络服务器。
In this article, we'll walk back in time to see how JavaScript evolved from a simple scripting language famously built in ten days to a technology that touches nearly every human being on the globe.
在这篇文章中,我们将回顾过去,看看 JavaScript 如何从一门简单的脚本语言在十天内发展成为一项触及全球几乎每一个人的技术。

The story begins in December of 1991, when Al Gore invented the internet. What he actually did was introduce the Gore bill, which provided funding for the first mainstream browser mosaic, which was developed by Marc Andreessen and Eric Bina at the University of Illinois.

故事始于 1991 年 12 月,当时阿尔·戈尔 (Al Gore) 发明了互联网。他实际上所做的是介绍了戈尔法案,该法案为伊利诺伊大学的马克安德森和埃里克比纳开发的第一个主流浏览器马赛克提供了资金。

In January 1993, it was published for UNIX systems, with Macintosh and Windows ports following later that year.

1993 年 1 月,它针对 UNIX 系统发布,同年晚些时候发布了 Macintosh 和 Windows 端口。

Mosaic was the first web browser to introduce the Internet to the masses, but there is no JavaScript yet, only the DOM or document object model, which was not even close to being standardised.
Mosaic 是第一个将 Internet 介绍给大众的网络浏览器,但还没有 JavaScript,只有 DOM 或文档对象模型,这甚至还没有接近标准化。

After graduating in 1993, Andreessen moved to California to co-found Netscape, and within a few years, the Netscape Navigator would hold over 80% of the browser market share.

1993 年毕业后,安德森移居加利福尼亚,与他人共同创立了 Netscape,几年之内,Netscape Navigator 占据了浏览器市场 80% 以上的份额。

Andreessen noticed about this time that browsers needed to become more dynamic, and that web designers required some sort of glue language to make their webpages more interactive.

Andreessen 注意到此时浏览器需要变得更加动态,而网页设计师需要某种胶水语言来使他们的网页更具交互性。

The super trendy Java programming language from Sun Microsystems would be the first thing they'd turn to, but they quickly decided that idea sucked, so Plan B was to hire this guy named Brendan Eich, whose job it was to put the scheme programming language in the browser while maintaining a syntax that still resembled Java.

来自 Sun Microsystems 的超级流行的 Java 编程语言将是他们首先求助的对象,但他们很快认为这个想法很糟糕,所以 B 计划是聘请这个名叫 Brendan Eich 的人,他的工作是将方案编程语言在浏览器中,同时保持仍然类似于 Java 的语法。

Just ten days later, the first version of JavaScript was born, but it wasn't called JavaScript yet; it was mocha.
仅仅十天后,第一个版本的 JavaScript 诞生了,但当时还不叫 JavaScript;这是摩卡咖啡。
Syntactically, it was a curly bracket language like Java or C, but under the hood, it already contained many of the features that we know and love in modern JavaScript, such as first-class functions, dynamic typing, and prototypal inheritance, which was inspired by Sun Microsystems' self programming language.
从语法上讲,它是一种类似于 Java 或 C 的大括号语言,但在底层,它已经包含了现代 JavaScript 中我们所熟知和喜爱的许多特性,例如一流函数、动态类型和原型继承,这是灵感来自 Sun Microsystems 的自编程语言。

Writing a perfect programming language in ten days is practically impossible, and Brendan Eich was well aware of this. Instead of writing a highly specialised language designed only for browsers from the 1990s, he wrote a flexible multi-paradigm language that developers could use to apply their own language patterns to, but there was still a very good chance that the language would fail, and there was no way he could have predicted the extremes developers would experience.

在十天内写出一门完美的编程语言几乎是不可能的,Brendan Eich 很清楚这一点。他没有编写一种只为 1990 年代的浏览器设计的高度专业化的语言,而是编写了一种灵活的多范式语言,开发人员可以用它来应用他们自己的语言模式,但是这种语言仍然很有可能会失败,并且他无法预测开发人员会经历的极端情况。

Mocha was renamed to live script by September 1995, and it was included in the initial beta releases of Netscape Navigator 2.0. However, only a few months later, in December, they decided to change the name to JavaScript because it sounded more hip and trendy than the hottest programming language of the time.

1995 年 9 月,Mocha 更名为 live script,并包含在 Netscape Navigator 2.0 的初始测试版中。然而,仅在几个月后的 12 月,他们决定将名称更改为 JavaScript,因为它听起来比当时最热门的编程语言更时髦。

When Javascript first came out, it had a negative impact on user experience, mostly through the use of intrusive pop-up windows. During this time, a firm that was growing rapidly was introducing their own browser, called Internet Explorer.
当 Javascript 刚问世时,它对用户体验产生了负面影响,主要是通过使用侵入式弹出窗口。在此期间,一家发展迅速的公司推出了自己的浏览器,称为 Internet Explorer。
In 1996, we have two nearly identical languages, javascript and jscript, as a result of Microsoft reverse engineering JavaScript and calling it jscript.
1996 年,由于 Microsoft 对 JavaScript 进行逆向工程并将其称为 jscript,我们有了两种几乎相同的语言,javascript 和 jscript。

People realised that JavaScript would need to be standardised due to the internet's rapid expansion, so Netscape approached the European Computer Manufacturers Association (ECMA), which has been a neutral party since 1961 for setting standards in the IT industry.

人们意识到,由于互联网的快速扩张,JavaScript 需要标准化,因此 Netscape 与欧洲计算机制造商协会 (ECMA) 接洽,该协会自 1961 年以来一直是 IT 行业标准制定的中立方。

By June 1997, we had the first version of ECMA script, and this provided browser vendors and server-side applications with a consistent spec or set of guidelines for implementing JavaScript.
到 1997 年 6 月,我们有了第一个版本的 ECMA 脚本,这为浏览器供应商和服务器端应用程序提供了一致的规范或一套实施 JavaScript 的指南。

At the same time that everyone was preparing for the end of the world, 1999 was one of the most interesting years in the history of technology.

在每个人都在为世界末日做准备的同时,1999 年是科技史上最有趣的年份之一。

We received ECMAScript version 3 just before y2k and the eventual stock market crisis.

就在 y2k 和最终的股市危机之前,我们收到了 ECMAScript 版本 3。

However, things are about to turn worse, and we won't see another version of ECMAScript published for another 10 years. It included features like better error handling and the string equality operator to make equality comparisons a little less strange. However, the internet was here to stay and at this point we have a solid standard for JavaScript but the company behind this push Netscape was acquired by AOL a year prior. Just three months later, in March 2000, the tech bubble started to burst. The Nasdaq lost over a trillion dollars in value in that month alone, and high-profile companies started to fold but the internet was here to stay.

然而,事情即将变得更糟,我们不会再看到 ECMAScript 的另一个版本再过 10 年发布。它包括更好的错误处理和字符串相等运算符等功能,使相等比较不那么奇怪。然而,互联网仍然存在,此时我们有一个可靠的 JavaScript 标准,但推动这一发展的公司 Netscape 在一年前被 AOL 收购。仅仅三个月后,也就是 2000 年 3 月,科技泡沫开始破灭。仅在那一个月,纳斯达克就损失了超过 1 万亿美元的市值,知名公司开始倒闭,但互联网仍然存在。

Microsoft Internet Explorer devoured the browser market share, and Microsoft didn't care about following the rules specification. In the early 2000s, Explorer owned at least 80% of the browser market share.

Microsoft Internet Explorer 吞噬了浏览器的市场份额,而 Microsoft 并不关心遵守规则规范。在 2000 年代初期,Explorer 拥有至少 80% 的浏览器市场份额。

Microsoft basically went off and did its own thing, implementing its own JavaScript extensions. This resulted in fragmentation, which we still have to deal with today when supporting these legacy versions of Internet Explorer, but it also resulted in some very revolutionary features, such as Ajax, which allowed JavaScript to be implemented asynchronously, which was a precursor to modern single page applications.

微软基本上开始做自己的事,实现自己的 JavaScript 扩展。这导致了碎片化,我们今天在支持这些遗留版本的 Internet Explorer 时仍然必须处理这个问题,但它也带来了一些非常革命性的功能,例如 Ajax,它允许 JavaScript 异步实现,这是现代 Internet Explorer 的先驱单页应用程序。

Now, in the early 2000s, work had begun on ECMA script version 4, which was moving in a direction that looks a lot more like modern-day typescript with features like optional type annotations, classes, interfaces, and a bunch of other features designed to use JavaScript at the enterprise scale, but one of the committee members was Douglas Crockford from Yahoo who had created JSON in 2003 and was very concerned that the ES for proposal was growing to be very large.

现在,在 2000 年代初期,ECMA 脚本版本 4 的工作已经开始,它正朝着一个看起来更像现代打字稿的方向发展,具有可选类型注释、类、接口和一系列其他设计的功能在企业范围内使用 JavaScript,但委员会成员之一是来自雅虎的 Douglas Crockford,他在 2003 年创建了 JSON,并且非常担心提案的 ES 变得非常庞大。

This led to two proposals running concurrently, one for version 3.1 and the other for version 3.1 was a much simpler version without significant language changes. The saga would continue until 2008, when ES 4 was finally abandoned for good, but it did in fact enter the market as a language called ActionScript ** created by **Adobe.

这导致两个提案同时运行,一个针对 3.1 版,另一个针对 3.1 版,这是一个没有重大语言变化的更简单的版本。这个传奇一直持续到 2008 年,那时 ES 4 终于被永远放弃了,但它确实作为一种由 **Adobe 创建的名为 ActionScript** 的语言进入了市场。

Developers in the mid 2000s were extremely frustrated trying to build web applications that ran on all browsers, but we saw a huge leap forward in 2006 with the release of jQuery. This is a library that deserves a lot more credit than it gets because it's one of the first JS libraries to have extremely well done documentation and it empowered developers to build cross-browser web applications.

2000 年代中期的开发人员对构建可在所有浏览器上运行的 Web 应用程序感到非常沮丧,但随着 jQuery 的发布,我们在 2006 年看到了巨大的飞跃。这是一个值得更多赞誉的库,因为它是第一个拥有非常完善的文档的 JS 库,它使开发人员能够构建跨浏览器的 Web 应用程序。

The release of Google Chrome and the v8 engine on September 2, 2008, was another significant milestone. v8 engine fundamentally changed how javascript was generated and interpreted, making it an attractive alternative for high-performance applications on both the client and server sides of the application stack.
2008 年 9 月 2 日发布的 Google Chrome 和 v8 引擎是另一个重要的里程碑。 v8 引擎从根本上改变了 javascript 的生成和解释方式,使其成为应用程序堆栈客户端和服务器端高性能应用程序的有吸引力的替代方案。

Less than a year later, in May 2009, Ryan Dahl would introduce nodejs, a server-side runtime for JavaScript built on top of v8 that included an event loop, a novel idea at the time that allowed you to write event-driven and non-blocking code. Because of those features, nodejs became known as a great solution for building real-time, scalable web applications, and it also allowed developers to build their entire web application from scratch.

不到一年后,即 2009 年 5 月,Ryan Dahl 推出了 nodejs,这是一个构建在 v8 之上的 JavaScript 服务器端运行时,其中包含一个事件循环,这在当时是一个新颖的想法,允许您编写事件驱动的和非-阻塞代码。由于这些特性,nodejs 成为构建实时、可扩展的 Web 应用程序的绝佳解决方案,它还允许开发人员从头开始构建他们的整个 Web 应用程序。

ES 3.1 was chosen as the foundation for ES 5, which was eventually released in December 2009, exactly 10 years after the last official spec from a technical standpoint. This decision was made around the same time that the JavaScript authorities were finally getting their act together for the next version of ECMA script.

ES 3.1 被选为 ES 5 的基础,ES 5 最终于 2009 年 12 月发布,从技术角度来看,正好是上一个官方规范发布 10 年后。这一决定大约是在 JavaScript 当局最终为下一版 ECMA 脚本采取行动的同时做出的。

ES 5 has a few crucial characteristics. JSON, for instance, supports functional object and array methods, strictmode accessors, and many other features.

ES 5 有几个关键特性。例如,JSON 支持功能对象和数组方法、严格模式访问器和许多其他功能。

Moving forward to 2010, we begin to see JavaScript frameworks designed specifically for single page applications, the most popular of which were Backbone and Angularjs, both of which were released in October of 2010. Both of these frameworks attempted to solve a similar problem but did so in very different ways.

进入 2010 年,我们开始看到专为单页应用程序设计的 JavaScript 框架,其中最流行的是 Backbone 和 Angularjs,它们都是在 2010 年 10 月发布的。这两个框架都试图解决类似的问题,但没有所以以非常不同的方式。

Backbone was lightweight and utilised an imperative programming approach to manage Dom changes, whereas Angularjs was more all-encompassing and used a declarative programming language.

Backbone 是轻量级的,并使用命令式编程方法来管理 Dom 更改,而 Angularjs 更包罗万象,并使用声明式编程语言。

The designer of backbone Jeremy Ashe is a JavaScript legend who also created CoffeeScript and Underscore.js. Speaking of CoffeeScript, it's a very important part of JavaScript history because it's the first language that really made transpiling go mainstream, dating all the way back to Brendon Ike's original vision in 1995 to create a programming language that was malleable and transpilers would become very important.

backbone 的设计者 Jeremy Ashe 是一位 JavaScript 传奇人物,他还创建了 CoffeeScript 和 Underscore.js。说到 CoffeeScript,它是 JavaScript 历史上非常重要的一部分,因为它是第一种真正使转译成为主流的语言,可以追溯到 1995 年 Brendon Ike 最初的愿景,即创建一种可延展的编程语言,转译器将变得非常重要.

With the next version of JavaScript ES6 plenty of new features arrived in this version things like promises let and Const arrow functions spread syntax D structuring to name a few these new features were a huge leap forward for JavaScript developers but it's really difficult for developers to actually use them because they're not supported in many legacy browsers and that's why today we see widespread use of things like babel and typescript because they can target any flavor of Javascript going all the way back to ES 3 while developers can still write their code with modern features.

随着下一个版本的 JavaScript ES6 的到来,这个版本中出现了许多新特性,比如 promises let 和 Const 箭头函数传播语法 D 结构等等,这些新特性对 JavaScript 开发人员来说是一个巨大的飞跃,但开发人员实际上很难使用它们是因为它们在许多旧版浏览器中不受支持,这就是为什么今天我们看到广泛使用 babel 和 typescript 之类的东西,因为它们可以针对任何风格的 Javascript,一直追溯到 ES 3,而开发人员仍然可以编写他们的代码现代特色。

Another significant development in 2015 was the emergence of respond React js. It took some of the concepts of angularjs with declarative UI but improved them with unidirectional dataflow immutability and the use of the virtual DOM and it's truly been the framework that has solidified modern day declarative UI patterns but there are many other frameworks out there competing for the mind share of developers like angular view.

2015 年的另一个重大发展是响应 React js 的出现。它采用了带有声明式 UI 的 angularjs 的一些概念,但通过单向数据流不变性和虚拟 DOM 的使用对其进行了改进,它确实是巩固现代声明式 UI 模式的框架,但还有许多其他框架在竞争开发人员的想法份额喜欢角度视图。

That gets us to the present 2022; the ECMA script committee is on a regular schedule of updating JavaScript, at this time, we have ES 2022, which has added some excellent new features to the language.

这让我们到了现在的 2022 年; ECMA 脚本委员会定期更新 JavaScript,此时,我们有 ES 2022,它为该语言添加了一些优秀的新特性。

If there's one thing I've learnt over the years, it's to always bet on JavaScript. It's a language that has progressed steadily from its initial prototype and has a large and diverse community unlike any other programming language.

如果这些年来我学到了一件事,那就是始终押注 JavaScript。它是一种从最初的原型开始稳步发展的语言,与任何其他编程语言不同,它拥有庞大而多样化的社区。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值