软件项目-1.4_微软开源Blazor

Blazor介绍

微软的ASP.NET团队宣布了一个名为Blazor的新项目,它是一种基于流行语言C#,Razor和HTML的实验性Web UI框架,Blazor是Browser + Razor的组合。

Visual Studio产品系列在Windows,Linux和MacOS上提供了一个很好的.NET开发体验。Blazor是一个构建在.NET上的单页Web应用程序框架,通过WebAssembly在Web浏览器中运行。

Blazor应用程序类似于也在Web浏览器中运行的渐进式Web应用程序。它虽然使用诸如CSS 和HTML 之类的Web 技术,但它使用 C#语言和 Razor 语法代替 JavaScript 来构建可组合的 Web UI 。通过提供用于编译到 Web 的大小和高效加载的格式,WebAssembly 可让 .Net 在浏览器中运行。

 

Blazor框架具备功能,包括:

用于构建 composable UI 的组件模型

路由

布局

表格和验证

依赖注入

JavaScript 互操作

开发期间在浏览器中实时重新加载

服务器端渲染

在浏览器和 IDE 中全面调试 .NET

能够通过 asm.js 在较早版本的(非 WebAssembly )浏览器上运行

Sanderson's Blog

http://blog.stevensanderson.com/2018/02/06/blazor-intro/

Running .NETin the browser

The first step to building a .NET-based SPA frameworkis to have a way of running .NET code inside web browsers. We can at last dothis based on open standards, supporting any web browser (without any plugins),thanks to WebAssembly.

 

WebAssembly is now supported by all mainstreambrowsers, including on mobile devices. It’s a compact bytecode format optimisedfor minimum download sizes and maximum execution speed. Despite what a lot ofdevelopers first assume, it does not introduce new security concerns, becauseit isn’t regular assembly code (e.g., x86/x64 or similar) - it’s a new bytecodeformat that can only do what JavaScript can do.

 

So how does that let us run .NET? Well, the Mono team isadding support for WebAssembly. In case you missed the news, Monohas been part of Microsoft since 2016. Mono is the official .NET runtime forclient platforms (e.g., native mobile apps and games). WebAssembly is yetanother client platform, so it makes sense that Mono should run on it.

Mono aims to run under WebAssembly in two modes:interpreted and AOT.

 

以上引用Sanderson'sBlog,谢谢!


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值