热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

JavaScript赢得了:使用MozillaShumway运行Flash并使用Fayde在JS中开发Silverlight

Wellthisissomeamazingnewsthathasbeenalongtimecoming.YoucantakeyourFlashappsandrunthemwitho

Well this is some amazing news that has been a long time coming. You can take your Flash apps and run them without Flash, and take your Silverlight apps and (almost) run them without Silverlight.

好吧,这是一个令人惊奇的消息,已经有很长时间了。 您可以使用Flash应用程序并在没有Flash的情况下运行它们,也可以使用Silverlight应用程序,并且(几乎)在没有Silverlight的情况下运行它们。

If you still don't think Javascript has won the web, please read on.

如果您仍然认为Javascript不能赢得网络,请继续阅读。

Shumway-Javascript和HTML 5中的Flash (Shumway - Flash in Javascript and HTML 5)

The Mozilla Project "Shumway" has been a long time coming (as long ago as 2012, but it's now ready to be looked at more deeply).

Mozilla项目“ Shumway ”已经有很长时间了(早在2012年,但现在已经准备好进行更深入的研究了)。

Chris Peterson, a Program Manager on the Mozilla Shumway says:

Mozilla Shumway的项目经理Chris Peterson说:

"Shumway is in a race to stay relevant as Flash fades from the web, but there will always be a long-tail of Flash content that would/will be lost when Adobe or browsers stop supporting the Flash plugin."

随着Flash从网络上淡出, Shumway一直在努力保持相关性,但是当Adobe或浏览器停止支持Flash插件时,Flash内容将永远存在很长的尾巴。

Think about that. We've all largely got "Evergreen Browsers" now that update themselves as often as weekly, but sometimes it feels like Adobe Flash is being attacked daily, so we're told to update that as well. Flash itself has more than fallen from grace, as Chris points out, it's fading from the web itself. Fast forward a year or so when there is no more Flash installed, but there's still Flash on the web. Enter Shumway - it's a renderer for SWF (Flash files) without native code! Shumway literally.

考虑一下。 现在,我们所有人都已经有了“ Evergreen Browsers”,它们每周更新一次,但是有时感觉Adobe Flash每天都在受到攻击,因此我们也被告知也要进行更新。 正如克里斯指出的那样,Flash本身已经从优雅中跌落了很多,它正在从网络本身中消失。 快进一年了,这时不再安装Flash,但网络上仍然有Flash。 输入Shumway-它是没有本机代码的SWF(Flash文件)渲染器! 从根本上说,Shumway。

Why is it called Shumway? Again, Chris:

为什么叫Shumway? 克里斯再次:

"The name "Shumway" is derived from "Gordon Shumway", the actual name of the TV character ALF: Flash -> Flash Gordon -> Gordon Shumway -> Shumway."

“名称“ Shumway”源自电视角色ALF的实际名称“ Gordon Shumway”:Flash-> Flash Gordon-> Gordon Shumway-> Shumway。”

That's awesome. What else is awesome? "Shumway is written in TypeScript. It has an ActionScript interpreter and a JIT that generates Javascript, compiled using eval()."

棒极了。 还有什么很棒的? “ Shumway用TypeScript编写。它具有一个ActionScript解释器和一个使用eval()编译的生成Javascript的JIT。”

Shumway makes Flash into HTML5

So Shumway is an HTML experiment that uses TypeScript (a modern typed Javascript compiler/transpiler) to read ActionScript and resources and JIT the result into evaluated Javascript. Fantastic. It's also open source and on GitHub. Even better, the Firefox Nightly is using Shumway for Flash videos on Amazon.com. This is the beginning of their test, I presume, to sunset Flash in Firefox.

因此, Shumway是一个HTML实验,它使用TypeScript(一种现代类型Javascript编译器/编译器)读取ActionScript和资源,并将结果JIT到经过评估Javascript中。 太棒了它也是开源的,并且在GitHub上。 更好的是,Firefox Nightly在Amazon.com上将Shumway用于Flash视频。 我想,这是他们测试Firefox日落Flash的开始。

Fayde-Javascript和HTML5画布中的Silverlight (Fayde - Silverlight in Javascript and HTML5 Canvas)

At the same time, there's The Fayde project. Also Open Source, Fayde also compiles to Javascript. But Fayde transforms Silverlight into HTML5 Canvas and Javascript! It's an implementation of a XAML engine in JS. Here's a near-Silverlight implementation of the classic Todo application, expressed on the web without plugins. Not enough? Here's a complex Fantasy Football app written in a Silverlight-like environment but running in your browser, again, without Silverlight.

同时,还有Fayde项目。 Fayde也是开源的,也可以编译为Javascript。 但是Fayde将Silverlight转换为HTML5 Canvas和Javascript! 它是JS中XAML引擎的实现。 这是经典Todo应用程序的接近Silverlight的实现,在Web上无需插件即可表示。 不够? 这是一个在类似Silverlight的环境中编写的复杂的Fantasy Football应用,但是再次在您的浏览器中运行,而没有Silverlight。

Fayde - Silverlight in HTML5

To be clear, there are significant architectural differences between these two projects. Shumway reads the binary SWF format and tries to Be Flash, while Fayde is reimagining, if you will, that takes the Silverlight concepts of ViewModels and Views in XAML and adds TypeScript (a comfortable language for the C#-familiar) with the result rendered on a Canvas. It's not a Silverlight Emulator, it's a Silverlight-like implementation and app development pattern for HTML5. It's open source, and they are looking for participation, so head over and get involved! Fayde may be the Silverlight migration strategy you've been looking for.

需要明确的是,这两个项目之间存在重大的体系结构差异。 Shumway会读取二进制SWF格式并尝试将其设为Flash,而Fayde会重新构想(如果愿意),它采用XAML中ViewModels和Views的Silverlight概念,并添加TypeScript(对C#熟悉的舒适语言),并在其上呈现结果。画布。 它不是Silverlight模拟器,而是HTML5的类似于Silverlight的实现和应用程序开发模式。 它是开源的,他们正在寻求参与,所以赶快加入吧! Fayde可能是您一直在寻找的Silverlight迁移策略。

Aside: From my perspective, it's not unreasonable to imagine taking something like JSIL (listen to my podcast on this amazing project) or a similar IL->JS system and combine it with Fayde to somehow run XAPs as well.

另外:从我的角度来看,可以想象采用JSIL之类的东西(在这个令人惊叹的项目上收听我的播客)或类似的IL-> JS系统,并将其与Fayde结合起来以某种方式运行XAP并非没有道理。

I love how crazy Javascript is and what people have been able to do with it. Now, go run this PC Emulator (~virtual machine) written by Fabrice Bellard in Javascript. It's Linux, on a 486, in your browser, in Javascript. *brain explodes*

我喜欢Javascript多么疯狂,人们已经能够使用它。 现在,运行由Fabrice Bellard用Javascript编写的PC仿真器(〜虚拟机)。 它是Linux,在486中,在您的浏览器中,在Javascript中。 *大脑爆炸*

Have a lovely day and enjoy today's Open Web.

祝您有美好的一天,并享受今天的开放式网络。

翻译自: https://www.hanselman.com/blog/Javascript-has-won-run-flash-with-mozilla-shumway-and-develop-silverlight-in-js-with-fayde




推荐阅读
  • 前言:原本纠结于Web模板,选了Handlebars。后来发现页面都是弱逻辑的,不支持复杂逻辑表达式。几乎要放弃之际,想起了Javascript中ev ... [详细]
  • 近来有一个需求,是需要在androidjava基础库中插入一些log信息,完成这个工作需要的前置条件有编译好的android源码具体android源码如何编译,这 ... [详细]
  • 在本教程中,我们将看到如何使用FLASK制作第一个用于机器学习模型的RESTAPI。我们将从创建机器学习模型开始。然后,我们将看到使用Flask创建AP ... [详细]
  • fileuploadJS@sectionscripts{<scriptsrc~Contentjsfileuploadvendorjquery.ui.widget.js ... [详细]
  • 小编给大家分享一下TypeScript2.7有什么改进,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收 ... [详细]
  • 刘连响:为什么看好小程序音视频在教育行业的应用?
    作者简介:刘连响,一起玩耍科技创始人。2013年起开始研究WebRTC,对音视频处理、直播、实时音视频相关技术非常感兴趣,具 ... [详细]
  • 本文介绍了Perl的测试框架Test::Base,它是一个数据驱动的测试框架,可以自动进行单元测试,省去手工编写测试程序的麻烦。与Test::More完全兼容,使用方法简单。以plural函数为例,展示了Test::Base的使用方法。 ... [详细]
  • Python正则表达式学习记录及常用方法
    本文记录了学习Python正则表达式的过程,介绍了re模块的常用方法re.search,并解释了rawstring的作用。正则表达式是一种方便检查字符串匹配模式的工具,通过本文的学习可以掌握Python中使用正则表达式的基本方法。 ... [详细]
  • 本文概述了JNI的原理以及常用方法。JNI提供了一种Java字节码调用C/C++的解决方案,但引用类型不能直接在Native层使用,需要进行类型转化。多维数组(包括二维数组)都是引用类型,需要使用jobjectArray类型来存取其值。此外,由于Java支持函数重载,根据函数名无法找到对应的JNI函数,因此介绍了JNI函数签名信息的解决方案。 ... [详细]
  • 引号快捷键_首选项和设置——自定义快捷键
    3.3自定义快捷键(CustomizingHotkeys)ChemDraw快捷键由一个XML文件定义,我们可以根据自己的需要, ... [详细]
  • ①页面初始化----------收到客户端的请求,产生相应页面的Page对象,通过Page_Init事件进行page对象及其控件的初始化.②加载视图状态-------ViewSta ... [详细]
  • 浅解XXE与Portswigger Web Sec
    XXE与PortswiggerWebSec​相关链接:​博客园​安全脉搏​FreeBuf​XML的全称为XML外部实体注入,在学习的过程中发现有回显的XXE并不多,而 ... [详细]
  • 【CTF 攻略】第三届 SSCTF 全国网络安全大赛—线上赛 Writeup
    【CTF 攻略】第三届 SSCTF 全国网络安全大赛—线上赛 Writeup ... [详细]
  • Angular10.0.0-next.6已发布,具体更新内容如下:BugFixesbazel:ng_package规则应更新ts_library目标的“package.json”(#36944)(d5293d2)compiler:删除未解决的DI参数的过时和无效警告(#3 ... [详细]
  • 深入理解TypeScript认识TypeScript&配置详解
    为什么使用TypeScript?最初使用TypeScript开发项目的时候,觉得很繁琐,定义每一个变量还要加上类型,尤其是对象形式的,几乎每一个用到的都要定一个接口,还要为每一 ... [详细]
author-avatar
Novice
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有