SlideShare une entreprise Scribd logo
1  sur  63
Oleksandr Skachkov, Itera
Running C# in your Web Browser with
WebAssembly
ABOUT ME
• Itera’s FrontEnd Tech Lead
• WebKit contributor
• WebAssembly enthusiast
• Twitter: @alSkachkov
• JavaScript in the Web
• WebAssembly’s key features
• WebAssembly and C#
• Blazor
JavaScript has monopoly in the Web
C# developer asked to do some JavaScript
New solution!
Blazor on WebAssembly
• Announced in 17 June 2015
• Supported by major Browsers
• Developed by WebAssembly Working
Group (W3C)
• Draft specific published 15 Feb 2018
WebAssembly – New Hope
What is WebAssembly (aka WASM)?
safe, portable, low-level code format designed for efficient execution
and compact representation
https://webassembly.github.io/spec/intro
C - Source code
RUST - Source code
S - Expression
fast to load
Byte code
WebAssembly’s key features
quick validation (parsing)
S-expression
S-expression
$0 10
Stack
S-expression
$0
10
10 * $0
Stack
S-expression
10 * $0
Stack
S-expression
Streaming API
1
3 2 1
5 4 3 2 1
No garbage collector
Only 4 primitive types
No access to DOM and WEB API
INTERACTION WITH JAVASCRIPT
We can use JS function in WASM and WASM function in JS
WEBASSEMBLY WILL BRING TO WEB
• High performance
• New languages
• Variety of existed libraries
WebAssembly and C#
.NET RUNTIME
• Mono
• https://github.com/mono/mono
• https://github.com/lrz/mono-wasm
• CoreRT
• https://github.com/dotnet/corert
• https://github.com/dotnet/llilc
WEBASSMBLY .NET FRAMEWORKS
• Blazor - https://github.com/aspnet/Blazor
• Xamarin.FORMS - https://github.com/praeclarum/Ooui
• NoesisGUI - http://www.noesisengine.com
BLAZOR. KEY FEATURES
• Built specially for SPA
• Use C# in Browser!
• Own shadow DOM
• Same codebase for both ENDS
BLAZOR
• Blazor concept announced at NDC Jul 10 2017
• Bring C# to the WEB
• Blazor = Browser + Razor
• At start relied on DotNetAnywere
• Currently relies on Mono WebAssembly
• Current version 0.1.0
• Not a new Silverlight!
CLR IN BROWSER
HOW BLAZOR WORKS
BLAZOR. FEATURES
Components
Routing
Binding
Dependency injection
HTTP Calls
JavaScript interop
Support asm.js for old browsers
COMPONENTS
• C# class from .cshtml
• Master page
• Reusable components
• Shadow DOM and diff base update
• Can be created fully in C#
• Life cycle methods/event, ie onInit …
COMPONENT
ROUTING
BINDING
BINDING
BINDING
BINDING
DEPENDENCY INJECTION
HTTP CALLS
JAVASCRIPT INTEROP: JS FROM C#
JAVASCRIPT INTEROP: C# FROM JS
JAVASCRIPT INTEROP: C# FROM JS
SOME MORE
REDUX: https://github.com/torhovland/blazor-redux
Entity Framework: https://www.c-sharpcorner.com/article/asp-net-core-crud-
using-blazor-and-entity-framework-core/
BLAZOR. HOW TO START
https://blogs.msdn.microsoft.com/webdev/2018/03/22/get-started-building-
net-web-apps-in-the-browser-with-blazor/
https://learn-blazor.com/
SUMMARY
• WebAssembly is an emerging technology
• Blazor on earliest stages
• Blazor very promising Framework
• Large build package for the Web
RESOURCES
• Blazor: https://learn-blazor.com
• Blazor github: https://github.com/aspnet/Blazor
• Blazor gitter: aspnet/Blazor
• Steven Sanderson: http://blog.stevensanderson.com
• WebAssembly Site: http://webassembly.org/
• Github: https://github.com/WebAssembly/
THANKS!
QUESTIONS?

Contenu connexe

Tendances

slide-dnrdw
slide-dnrdwslide-dnrdw
slide-dnrdw
Yue Liu
 

Tendances (20)

Pump up the JAM with Gatsby
Pump up the JAM with GatsbyPump up the JAM with Gatsby
Pump up the JAM with Gatsby
 
Using eZ Platform as a Headless CMS (with Vue.js)
Using eZ Platform as a Headless CMS (with Vue.js)Using eZ Platform as a Headless CMS (with Vue.js)
Using eZ Platform as a Headless CMS (with Vue.js)
 
Blazor web apps
Blazor web appsBlazor web apps
Blazor web apps
 
Blazor - An Introduction
Blazor - An IntroductionBlazor - An Introduction
Blazor - An Introduction
 
Isomorphic web application
Isomorphic web applicationIsomorphic web application
Isomorphic web application
 
Bootstrapping angular js with bower grunt yeoman
Bootstrapping angular js with bower grunt yeomanBootstrapping angular js with bower grunt yeoman
Bootstrapping angular js with bower grunt yeoman
 
WebKit Programming in Cocoa
WebKit Programming in CocoaWebKit Programming in Cocoa
WebKit Programming in Cocoa
 
Blazor - The New Silverlight?
Blazor - The New Silverlight?Blazor - The New Silverlight?
Blazor - The New Silverlight?
 
Blazor introduction
Blazor introductionBlazor introduction
Blazor introduction
 
React server side rendering performance
React server side rendering performanceReact server side rendering performance
React server side rendering performance
 
Fast Slim Correct: The History and Evolution of JavaScript.
Fast Slim Correct: The History and Evolution of JavaScript.Fast Slim Correct: The History and Evolution of JavaScript.
Fast Slim Correct: The History and Evolution of JavaScript.
 
Blazor Full-Stack
Blazor Full-StackBlazor Full-Stack
Blazor Full-Stack
 
React Webinar With CodePolitan
React Webinar With CodePolitanReact Webinar With CodePolitan
React Webinar With CodePolitan
 
slide-dnrdw
slide-dnrdwslide-dnrdw
slide-dnrdw
 
[Cordova] Empezando con Ionic
[Cordova] Empezando con Ionic[Cordova] Empezando con Ionic
[Cordova] Empezando con Ionic
 
Node PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsNode PDX: Intro to Sails.js
Node PDX: Intro to Sails.js
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
 
React brief introduction
React brief introductionReact brief introduction
React brief introduction
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
 
Why NodeJS
Why NodeJSWhy NodeJS
Why NodeJS
 

Similaire à Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"

Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Gabriel Villa
 

Similaire à Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly" (20)

Blazor.pptx
Blazor.pptxBlazor.pptx
Blazor.pptx
 
WebAssemlby vs JavaScript
WebAssemlby vs JavaScriptWebAssemlby vs JavaScript
WebAssemlby vs JavaScript
 
Azure Serverless Conf
Azure Serverless ConfAzure Serverless Conf
Azure Serverless Conf
 
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
 
WebAssembly overview. KievJS meetup
WebAssembly overview. KievJS meetupWebAssembly overview. KievJS meetup
WebAssembly overview. KievJS meetup
 
The shift to the edge
The shift to the edgeThe shift to the edge
The shift to the edge
 
Full stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.NetFull stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.Net
 
Intro to Node.js
Intro to Node.jsIntro to Node.js
Intro to Node.js
 
Web Assembly Big Picture
Web Assembly Big PictureWeb Assembly Big Picture
Web Assembly Big Picture
 
The shift to the edge
The shift to the edgeThe shift to the edge
The shift to the edge
 
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.jsCome Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
 
Oleksandr Skachkov "How to run WebAssembly in your React web application"
Oleksandr Skachkov "How to run WebAssembly in your React web application"Oleksandr Skachkov "How to run WebAssembly in your React web application"
Oleksandr Skachkov "How to run WebAssembly in your React web application"
 
ASP.NET 5 Overview - Post Build 2015
ASP.NET 5 Overview - Post Build 2015ASP.NET 5 Overview - Post Build 2015
ASP.NET 5 Overview - Post Build 2015
 
Blazor - .NET in the Browser!
Blazor - .NET in the Browser!Blazor - .NET in the Browser!
Blazor - .NET in the Browser!
 
ASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTMASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTM
 
ASP.NET 5 Overview for Apex Systems
ASP.NET 5 Overview for Apex SystemsASP.NET 5 Overview for Apex Systems
ASP.NET 5 Overview for Apex Systems
 
Blazor certification training - Dot Net Tricks
Blazor certification training - Dot Net TricksBlazor certification training - Dot Net Tricks
Blazor certification training - Dot Net Tricks
 
.NET Conf 2019 高雄場 - .NET Core 3.0
.NET Conf 2019 高雄場 - .NET Core 3.0.NET Conf 2019 高雄場 - .NET Core 3.0
.NET Conf 2019 高雄場 - .NET Core 3.0
 
JavaScript Engine and WebAssembly
JavaScript Engine and WebAssemblyJavaScript Engine and WebAssembly
JavaScript Engine and WebAssembly
 
ASP.NET 5 Overview
ASP.NET 5 OverviewASP.NET 5 Overview
ASP.NET 5 Overview
 

Plus de Fwdays

Plus de Fwdays (20)

"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y..."How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
 
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
 
"Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl..."Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl...
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
 
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ..."The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
 
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu..."[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
 
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care..."[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
 
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"..."4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
 
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast..."Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
 
"Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others..."Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others...
 
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
 
"Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv..."Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv...
 
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin..."How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"

Notes de l'éditeur

  1. Stackoverflow.com Github.com
  2. Stackoverflow.com
  3. Stackoverflow.com