SlideShare una empresa de Scribd logo
1 de 39
Juan Luis Guerrero Minero
@juanluelguerre
http://elguerre.com
Agenda
 JavaScript
 Web Assemly
 Blazor
Next Steps
JavaScript one of the most popular languages
Easy to learn:
• King of the web
• Dynamic typing
• We have to know one more language
• Ambiguous syntax
• NOT PREDICTIBLE PERFORMANCE !
but….
Tries to solve
What is Web Assembly (a.k.a WASM)?
https://webassembly.org/
• Announced in 17 June 2015
• Supported by major Browsers
• Developed by WebAssembly Working
Group (W3C)
• Draft specific published 15 Feb 2018
WASM is a build target “for Browsers”
https://webassembly.org/
Debugging
Testing
Experimenting
OptimizingLearning
Teaching
Write
programs by
hand
Textual
representation of the
wasm binary format
S-Expression
Compact
bytecode
Optimised
for
mínimum
download
sizes
Optimised
for
maximun
execution
speed
Regular
assembly
(x86/x64
or similar)
Do what
JavaScript
can do
No
plugings
So, Web Assembly (WASM):
Browser compatibility
Usage Scenarios in Web
• Write faster versión of the specific application
• Using existing C libraries in browser
• Reuse algorithm from service side
• Distribute whole application as wasm
Video editor: https://d2jta7o2zej4pf.cloudfront.net/
Game (Unity): http://webassembly.org/demo/Tanks/
Garden (Unreal Engine): https://s3.amazonaws.com/mozilla-
games/ZenGarden/EpicZenGarden.html
WebSight: https://websightjs.com
AutoCAD: https://web.autocad.com
Samples
Demo
https://webassembly.studio/
Web Assembly Resources
Articles: https://hacks.mozilla.org/category/webassembly
Site: http://webassembly.org
Github: https://github.com/WebAssembly
Twitter: @WasmWeekly – WebAssemblyWeekly
Specification:
https://webassembly.github.io/spec/core/_download/WebAssembly.p
df
Before anything…
• Razor MVC
• Razor Pages
• Similar to ASP.NET
ViewComponents.
• Is more an MVVM framework
• Enables two-way data binding
• Useful for SPA apps.
Running .NET in the browser
“The first step to building a .NET-based SPA framework is to have a way of
running .NET code inside web browsers. We can at last do this based on open
standards, supporting any web browser (without any plugins), thanks to
WebAssembly.”
Web Assembly compilation
@svqdotnet
How it works
How it works
Interpreter AOT
Mono aims to run under WebAssembly in two modes:
So, Wich one is better?
AOT
Production
Environments
Interpreter
Development
Time
Currently: Interpreter, is on (enabled) by default and AOT mode is not ready to be tried yet
Infrastructure
• Layout
• Component
• App.cshtml
• Routing
• Dependency Injection
• Main component (root)
• Index.html
Blazor & JavaScript Interactions
1. Call JavaScript from Blazor (Interop
JavaScript)
2. Call Blazor for JavaScript
https://github.com/aspnet/Blazor.Docs/issues/59
https://learn-blazor.com/architecture/interop
1
2
Getting started 1
2
https://dotnet.myget.org/f/blazor-dev/api/v3/index.json
3
Blazor on Mac !
dotnet new -i Microsoft.AspNetCore.Blazor.Templates
dotnet new blazorhosted
Will WebAssembly replace JavaScript?
Yes
No now !
References
• Introducción a Blazor
• Getting Started
• Learn Blazor
• https://blazor.net/
• Gitter (aspnet/Blazor)
• Blazor Backlog !
• Elguerre.com (blazor)
@svqdotnet
• Microsoft Build 2018: https://www.youtube.com/watch?v=KAIJ3ezQb3c&feature=youtu.be&t=4436
• https://codedaze.io/what-is-blazor-and-why-is-it-so-exciting/
Play Online: https://marcelooliveira.github.io/
https://www.codeproject.com/Articles/1241210/WebAssembly
-with-Blazor
Uno
http://platform.uno
https://github.com/nventive/Uno
https://gitter.im/uno-platform
Gracias

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Blazor web apps
Blazor web appsBlazor web apps
Blazor web apps
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET Core
 
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
 
Mean stack
Mean stackMean stack
Mean stack
 
WordPress development checklist
WordPress development checklistWordPress development checklist
WordPress development checklist
 
Isomorphic web application
Isomorphic web applicationIsomorphic web application
Isomorphic web application
 
Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014
 
Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014
 
Web Assembly Big Picture
Web Assembly Big PictureWeb Assembly Big Picture
Web Assembly Big Picture
 
Blazor - The New Silverlight?
Blazor - The New Silverlight?Blazor - The New Silverlight?
Blazor - The New Silverlight?
 
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
 
JavaScript Engine and WebAssembly
JavaScript Engine and WebAssemblyJavaScript Engine and WebAssembly
JavaScript Engine and WebAssembly
 
Web assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail SorokovskyWeb assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail Sorokovsky
 
1 pluginable laravel cms
1 pluginable laravel cms1 pluginable laravel cms
1 pluginable laravel cms
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPages
 
WebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationWebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction Presentation
 
Nuxt로 사내서비스 구현하면서 얻은 경험 공유
Nuxt로 사내서비스 구현하면서 얻은 경험 공유Nuxt로 사내서비스 구현하면서 얻은 경험 공유
Nuxt로 사내서비스 구현하면서 얻은 경험 공유
 
Webpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsWebpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ Steps
 
JSConf.eu Overview
JSConf.eu OverviewJSConf.eu Overview
JSConf.eu Overview
 
Web assembly - Future of the Web
Web assembly - Future of the WebWeb assembly - Future of the Web
Web assembly - Future of the Web
 

Similar a Blazor v1.1

Javascript as universal language
Javascript as universal languageJavascript as universal language
Javascript as universal language
Ronald Harmsen
 

Similar a Blazor v1.1 (20)

Blazor.pptx
Blazor.pptxBlazor.pptx
Blazor.pptx
 
WebAssembly (Wasm) defines a portable binary-code format and a corresponding ...
WebAssembly (Wasm) defines a portable binary-code format and a corresponding ...WebAssembly (Wasm) defines a portable binary-code format and a corresponding ...
WebAssembly (Wasm) defines a portable binary-code format and a corresponding ...
 
Net training in bhubaneswar
Net training in bhubaneswar Net training in bhubaneswar
Net training in bhubaneswar
 
The shift to the edge
The shift to the edgeThe shift to the edge
The shift to the edge
 
Transforming the web into a real application platform
Transforming the web into a real application platformTransforming the web into a real application platform
Transforming the web into a real application platform
 
JS digest. Decemebr 2017
JS digest. Decemebr 2017JS digest. Decemebr 2017
JS digest. Decemebr 2017
 
Javascript 01 (js)
Javascript 01 (js)Javascript 01 (js)
Javascript 01 (js)
 
Web summit.pptx
Web summit.pptxWeb summit.pptx
Web summit.pptx
 
Blazor and more.pptx
Blazor and more.pptxBlazor and more.pptx
Blazor and more.pptx
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
 
Java script Session No 1
Java script Session No 1Java script Session No 1
Java script Session No 1
 
WebAssembly with Rust
WebAssembly with RustWebAssembly with Rust
WebAssembly with Rust
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
 
playwrightmeetup-14jan2021-210114173639.pdf
playwrightmeetup-14jan2021-210114173639.pdfplaywrightmeetup-14jan2021-210114173639.pdf
playwrightmeetup-14jan2021-210114173639.pdf
 
Javascript as universal language
Javascript as universal languageJavascript as universal language
Javascript as universal language
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
 
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
 
Web assembly with go
Web assembly with goWeb assembly with go
Web assembly with go
 
Getting Started with ASP.NET vNext
Getting Started with ASP.NET vNextGetting Started with ASP.NET vNext
Getting Started with ASP.NET vNext
 

Último

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 

Blazor v1.1

Notas del editor

  1. https://elguerre.com/2018/04/11/javascript-ha-muerto-net-web-assembly-con-blazor/ Gracias a @alSkachkov
  2. https://octoverse.github.com/
  3. Since 1995 there are severals alternatives to get a better performance…
  4. https://webassembly.org/docs/faq/
  5. https://webassembly.org/ Works for: Firefox Chorme Safari Edge Opera (Just in a Desktop. At 2018/06/26). No Works for: IE Brower Compatibility: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly
  6. https://webassembly.org/docs/faq/
  7. To enable WebAssembly to be read and edited by humans, there is a textual representation of the wasm binary format: https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format
  8. It’s a compact bytecode format optimised for minimum download sizes and maximum execution speed. Despite what a lot of developers first assume, it does not introduce new security concerns, because it isn’t regular assembly code (e.g., x86/x64 or similar) - that can only do what JavaScript can do. it’s a new bytecode format
  9. Brower Compatibility: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly
  10. https://wasdk.github.io/wasmcodeexplorer/
  11. https://blazor.net/ References: - http://blog.stevensanderson.com/2018/02/06/blazor-intro/
  12. http://www.mono-project.com/news/2018/01/16/mono-static-webassembly-compilation/ MVC: Razor Pages: It’s similar to ASP.NET ViewComponents. Is more an MVVM framework. It enables two-way data binding. Useful for SPA apps.
  13. http://www.mono-project.com/ http://www.mono-project.com/news/2018/01/16/mono-static-webassembly-compilation/
  14. http://blog.stevensanderson.com/2018/02/06/blazor-intro/ Interpreter: The Mono runtime itself is compiled to WebAssembly, but your .NET assembly files are not. The browser can then load and execute the Mono runtime, which in turn can load and execute standard .NET assemblies (regular .NET .dll files) built by the normal .NET compilation toolchain. This is similar to how, for the desktop CLR, the core internals of the CLR are distributed precompiled to native code, which then loads and executes .NET assembly files. One key difference is that the desktop CLR uses just-in-time (JIT) compilation extensively to make execution faster, whereas Mono on WebAssembly is closer to a pure interpretation model. Ahead-of-time (AOT) compiled mode In AOT mode, your application’s .NET assemblies are transformed to pure WebAssembly binaries at build time. At runtime, there’s no interpretation: your code just executes directly as regular WebAssembly code. It’s still necessary to load part of the Mono runtime (e.g., parts for low-level .NET services like garbage collection), but not all of it (e.g., parts for parsing .NET assemblies). This is similar to how the ngen tool has historically allowed AOT compilation of .NET binaries to native machine code, or more recently, CoreRT provides a complete native AOT .NET runtime.
  15. Interpreter: Faster AOT: Smaller and compression-friendly compared with AOT-compiled assemblies
  16. Backlog A component model for building composable UI Routing Layouts Forms and validation Dependency injection JavaScript interop Live reloading in the browser during development Server-side rendering Full .NET debugging both in browsers and in the IDE Rich IntelliSense and tooling Ability to run on older (non-WebAssembly) browsers via asm.js Publishing and app size trimming
  17. Blazr -> JS : https://learn-blazor.com/architecture/interop/ JS -> Blazor: https://github.com/aspnet/Blazor.Docs/issues/59
  18. Demos: Estructura de Proyecto Ejecutando y depurando (F12) …
  19. http://blog.stevensanderson.com/2018/02/06/blazor-intro/ https://www.jerriepelser.com/blog/getting-started-with-blazor/ https://learn-blazor.com/ https://elguerre.com/2018/04/11/javascript-ha-muerto-net-web-assembly-con-blazor/
  20. https://www.codeproject.com/Articles/1241210/WebAssembly-with-Blazor
  21. http://platform.uno/ https://github.com/nventive/Uno https://gitter.im/uno-platform/
  22. Practically any portable C or C++ codebase can be compiled into JavaScript using Emscripten !!! List of portable language: https://github.com/kripken/emscripten/wiki/Porting-Examples-and-Demos http://kripken.github.io/emscripten-site/ https://github.com/WebAssembly/design/issues/1087
  23. http://asmjs.org/ https://en.wikipedia.org/wiki/Asm.js