Farewell, Flash. 感谢你,但这一次是真正的永别。

So long, and thanks for all the Flash

Posted by Hux on July 26, 2017

本文首发于我的知乎专栏 The Little Programmer,转载请保留链接 ;)

一年半前,我曾和 Flash 作过一次告别。那一次,Adobe Flash Professional CC 被重新命名为了 Adobe Animate CC,宣告着 Flash 作为一个创作工具走到了尽头。

而今天,通过 Chromium 博客 So long, and thanks for all the Flash 我才得知,Adobe 官博在 Flash & The Future of Interactive Content 一文中,宣布将在 2020 年底时停止发布与更新 Flash Player。这一次,意味着 Flash 作为一个平台走到了尽头。

在不少人眼里,Flash 与 HTML5 是纯粹的竞争关系,我们应该为 HTML5 与 Open Web 标准的胜利欢呼,而将 Flash 狠狠的咒骂在黄泉之下。但其实,大多数人都忘记了,或是从不曾知道:HTML5(严谨的来说,其 marketing 含义中所涵盖的那些 Web APIs),有很大一部分正是 Flash 平台、Flash 社区对 web 标准做出的贡献。

正如 Flash & The Future of Interactive Content 所说:

Adobe has long played a leadership role in advancing interactivity and creative content – from video, to games and more – on the web. Where we’ve seen a need to push content and interactivity forward, we’ve innovated to meet those needs. Where a format didn’t exist, we invented one – such as with Flash and Shockwave. And over time, as the web evolved, these new formats were adopted by the community, in some cases formed the basis for open standards, and became an essential part of the web.

当我们(企业、用户)需要 web 平台承载包括视频、游戏在内的各种富交互内容而 web 平台本身还不具备这样的能力时,我们通过给予这个平台一种新的格式,以满足大家的需求,这就是 Flash Player,作为一种私有平台与浏览器插件,却能一度成为 web 事实标准的客观原因。

而时至今日,这些 web 平台所欠缺的能力,在得到市场与社区的认可之后,逐渐被从 Flash 中吸收与扬弃,成为了诸如 HTML5 Video/Audio/Canvas、WebGL 这些真正的 Open Web 标准。这时候,这些在诞生之初颇为创新的,作为了一种「过渡手段」、「Shim」的私有平台,便自然而然的,慢慢的不再被需要了。

这并不应该理解为一种失败,而应该说,它们「功成身退」了。


ActionScript 3.0,Flash 中的御用编程语言,作为 ES4 的唯一实现,推动了 ECMAScript 标准的发展,深远得影响着现代 JavaScript

Adobe Flex,Flash 平台的企业开发框架,在今年和 @徐飞 老师聊到时,还一起怀念并认可其相比现代 web 前端/客户端开发在工具链、协作、兼容性、UI 组件等方面的先进与成熟; Adobe AIR,作为最早借鉴 JRT 将 web 相关技术的 Runtime 植入操作系统或捆绑在可执行文件内的跨平台开发方案,或许可以视作 Cordova、Electron、NodeWebkit、ReactNative 这些方案的一个前身与成功先例;

Microsoft IE 私有技术 ActiveX 中的 XMLHTTP,作为 XMLHTTPRequest 的前身,促进了 Ajax 的诞生与 Web 2.0 时代的来临;

Google Gears 作为 2008 年时为了增强 web 应用的浏览器插件,其私有 API 分别是 App Cache、Web Worker、WebSQL 等标准或标准未遂的前身;

Cordova/Phonegap 作为第一个面向移动端的 Hybrid 方案,成为了 web 开发与移动设备的 polyfill 与桥梁,加速了 Web 平台 Device APIs 的发展,并与 WebOS、FirefoxOS、Chrome Apps、Windows Runtime Apps 等一同影响了 Progressive Web App 的出现;

Google Extension 中 Background Page 与 Event Page 多年对 web 平台后台持续计算的尝试,直接帮助了 Service Worker 的 API 设计;

Google 的 NativeClient、Mozilla 的 asm.js 对于 web 追逐 native 性能的极致追求,则奠定了 Web Assembly 的诞生……

你看,在这条道路上,Flash 与它的朋友们,其实并不孤单。

「看到你长大了,我也就可以心满意足的离开了。」

就像是, web 技术发展的必然规律一样,

而 Open Web 则因此不朽。


我很高兴,Google Chrome、Mozilla Firefox、Microsoft Edge 都能这么写到:

Flash helped make the web a rich, dynamic experience, and shaped the modern set of web standards.

— “So long, and thanks for all the Flash” Chromium Blog

Over the years, Flash has helped bring the Web to greatness with innovations in media and animation, which ultimately have been added to the core web platform.

— “Firefox Roadmap for Flash End-of-Life” Mozilla Blog

Flash led the way on the web for rich content, gaming, animations, and media of all kinds, and inspired many of the current web standards powering HTML5.

— “The End of an Era – Next Steps for Adobe Flash” Windows Blog

感谢你,Flash。

感谢你们,那些「功成身退」的你们。