SlideShare a Scribd company logo
PUSHING AI TO THE CLIENTPUSHING AI TO THE CLIENT
WITH WEBASSEMBLY AND BLAZORWITH WEBASSEMBLY AND BLAZOR
Barry S. Stahl - @bsstahl - http://www.cognitiveinheritance.com
PRINTABLE VERSIONPRINTABLE VERSION
ABOUT MEABOUT ME
Favorite Physicists Favorite Mathematicians
Harold "Hal" Stahl Ada Lovelace
Carl Sagan Alan Turing
Neil Degrasse Tyson Johannes Kepler
Nikola Tesla Rene Descartes
Marie Curie Isaac Newton
Richard Feynman Leonardo Fibonacci
Albert Einstein George Boole
Other notables: Niels Bohr, Galileo Galilei, Michael Faraday, Blaise Pascal, Johann Gauss, Grace Hopper,
Stephen Hawking, Marvin Minsky, Daphne Koller, Benoit Mandelbrot
I think it is noteworthy that I am the type of person who has both favorite physicists
and favorite mathematicians - @bsstahl 16 Apr 2017
SOME OSS PROJECTS I RUNSOME OSS PROJECTS I RUN
[Experimental] The media tracking and aggregation system that was used to assemble this presentation
A blogging platform that produces plain HTML5/CSS output for ultimate scalability.
A set of extension methods helpful when building unit tests.
A conference schedule optimizer
A microservices framework for creating conversational bots on top of Bot Framework.
A library of abstractions and their implementations that help create loosely-coupled applications.
A c# library and website for generating agenda's for Toastmasters meetings.
Liquid Victor
Prehensile Pony-Tail
TestHelperExtensions
Conference Scheduler
IntentBot
LiquidNun
Toastmasters Agenda
GIVECAMPGIVECAMP
International Headquarters:
WHERE SOFTWARE CREATORS COME TOGETHER TO BUILD GREAT TOOLS FOR AMAZINGWHERE SOFTWARE CREATORS COME TOGETHER TO BUILD GREAT TOOLS FOR AMAZING
LOCAL CHARITIESLOCAL CHARITIES
http://givecamp.org
WASM IN THE BROWSERWASM IN THE BROWSER
A rst look at WASM directly in the browser
HTTPS://WEBASSEMBLY.GITHUB.IO/WABT/DEMO/WAT2WASM/HTTPS://WEBASSEMBLY.GITHUB.IO/WABT/DEMO/WAT2WASM/
WHAT IS WEBASSEMBLY (WASM)WHAT IS WEBASSEMBLY (WASM)
A W3C Speci cation
A portable binary compilation-target
Designed to execute well within existing web platforms
Able to support non-browser embeddings
The Intermediate-Language of the Web
Can be compiled-to from nearly any language
Can be executed on nearly any platform
Can be used inside the browser or out
WASM PROVIDESWASM PROVIDES
A Structured Stack Machine execution model
Most instructions use the stack for data
Flow of control handled with structured constructs
i.e. if and while
A very limited type-system
Integer types: i32 & i64
Float types: f32 & f64
Any other types handled by the compiler
WASM MODULE SECTIONSWASM MODULE SECTIONS
Name Code Description
Type 1 Declares signatures of all types (functions)
Import 2 Declares all imported modules (i.e. Javascript)
Function 3 Cross references sections type (1) and code (10)
Table 4 Declares tables for storage
Memory 5 Declares contiguous memory sections
Global 6 Declares globabl variables
Export 7 Declares items to be exposed outside of the module
Start 8 Declares the start function if one exists
Element 9 Used to initialize imported modules
Code 10 The implementation of all functions
Data 11 Used to initialize any memory ranges
ONE GOAL OF WEBASSEMBLYONE GOAL OF WEBASSEMBLY
Execute in the same sematic universe as JavaScript
Allow synchronous calls to and from JavaScript
Enforce the same-origin and permissions security policies
Design to integrate well with the existing Web platform -
https://webassembly.org/docs/high-level-goals/
BROWSER EXECUTION PIPELINEBROWSER EXECUTION PIPELINE
AS THE WORLD EXISTED PRE-WASMAS THE WORLD EXISTED PRE-WASM
BROWSER EXECUTION PIPELINEBROWSER EXECUTION PIPELINE
AS THE WORLD EXISTS TODAYAS THE WORLD EXISTS TODAY
ASP.NET CORE BLAZORASP.NET CORE BLAZOR
ASP.NET RAZORASP.NET RAZOR
WHY RAZOR?WHY RAZOR?
Simpli ed Routing
Each page's location in the le system is its route
Simpli ed Layout
HTML is inline with C# or VB syntax
Can be used alongside MVC
Razor pages are ASP.NET pages
BASIC BLAZORBASIC BLAZOR
A rst look at Blazor from File > New Project
WHAT IS BLAZOR?WHAT IS BLAZOR?
A SPA Framework
Builds client-side applications
Runs in the browser
C# is the programming language
Uses the Razor engine and syntax
C# code is inline
Encapsulation done with components
.NET code executed using mono.wasm
MONO.WASMMONO.WASM
A Web Assembly implementation of the .NET runtime
Built by the Xamarin team
Supports NetStandard2.0
CHUTES & LADDERS PROJECT STRUCTURECHUTES & LADDERS PROJECT STRUCTURE
.NET CODE IN BLAZOR.NET CODE IN BLAZOR
Using Blazor to run existing .NET libraries
WHY NOT USE BLAZOR RIGHT NOW?WHY NOT USE BLAZOR RIGHT NOW?
Blazor has only recently had its "Experimental" tag removed by Microsoft
We still don't know when it will RTW
There may be better ways to accomplish the goals
The tooling is not yet where we need it to be
Many features are planned but not yet implemented
Little bene t if you are uent and comfortable with JavaScript
Why move away from proven technologies if it isn't solving your pain?
Little bene t if you don't need existing .NET in the browser
If your code is Javascript (or not written) use what is right
SHOULD I BE USING BLAZOR NOW?SHOULD I BE USING BLAZOR NOW?
ONLY IF YOU ARE UNHAPPY WITH JAVASCRIPT OR WANT TO RUN .NET IN THE BROWSERONLY IF YOU ARE UNHAPPY WITH JAVASCRIPT OR WANT TO RUN .NET IN THE BROWSER
ANDAND YOU DON'T NEED TO RELEASE FOR AT LEAST 6 MONTHSYOU DON'T NEED TO RELEASE FOR AT LEAST 6 MONTHS
HOW DO I GET STARTED?HOW DO I GET STARTED?
Install Visual Studio 2019
Install the latest .NET Core
Install the Blazor Extension
In Visual Studio 2019
File > New Project > Web > ASP.NET Core Web Application
https://visualstudio.microsoft.com/downloads/
https://www.microsoft.com/net/download
https://go.microsoft.com/fwlink/?linkid=870389
SUMMARYSUMMARY
WebAssembly
A portable binary compilation-target
Executes in the same browser context as Javascript
Blazor
A SPA framework
Uses C# for scripting
Interpreted using Mono.wasm in the browser
Pushing AI to the Client Barry S. Stahl - @bsstahl - http://www.cognitiveinheritance.com
RESOURCESRESOURCES
These Slides
Code
Instructions & Tutorials
http://PushingAIToTheClient-2019Q2.azurewebsites.net
Chutes & Ladders Simulation
My GitHub Repos
WebAssembly
Blazor
Cognitive Inheritance (my blog)

More Related Content

What's hot (19)

DOCX
Sejarah perkembangan komputer dari generasi 1 5
permatas
 
DOCX
Trabajo maquina turnin y von neumann
luisvaleri19
 
DOCX
HA2NV50 EQ8-StarUML
Erick Ortega Herrera
 
PPTX
Mi lenguaje de programación de preferencia
monty19
 
PPTX
gestion de contenidos en el AVA
SistemadeEstudiosMed
 
PPT
Presentacion Sql
guest5f0fa0
 
PPTX
Maquinas virtuales
isma2013
 
PDF
How To Break Odoo's Security [Odoo Experience 2018]
Olivier Dony
 
PPTX
Java file
sonnetdp
 
PPT
Lordinateur et-ses-composants4941
Ismail Bouyahya
 
PDF
Proyecto mineria de_datos_caso_2
Gustavo Rene Rojas Valdez
 
PPTX
Odoo's Test Framework - Learn Best Practices
Odoo
 
PDF
Políticas de grupos GPO
Antonio Ortega
 
PDF
Interbloqueo
JosefaYareni
 
PPTX
Taller de Base de Datos - Unidad 6 SQL procedural
José Antonio Sandoval Acosta
 
PPT
Que Es Java
quesada_diego
 
PDF
Correction Examen 2016-2017 POO .pdf
slimyaich3
 
DOC
Modul praktikum Bahasa assembly
stephan EL'wiin Shaarawy
 
PDF
Terminologia Médica_230824_131735.pdf
JoseQuiroga49
 
Sejarah perkembangan komputer dari generasi 1 5
permatas
 
Trabajo maquina turnin y von neumann
luisvaleri19
 
HA2NV50 EQ8-StarUML
Erick Ortega Herrera
 
Mi lenguaje de programación de preferencia
monty19
 
gestion de contenidos en el AVA
SistemadeEstudiosMed
 
Presentacion Sql
guest5f0fa0
 
Maquinas virtuales
isma2013
 
How To Break Odoo's Security [Odoo Experience 2018]
Olivier Dony
 
Java file
sonnetdp
 
Lordinateur et-ses-composants4941
Ismail Bouyahya
 
Proyecto mineria de_datos_caso_2
Gustavo Rene Rojas Valdez
 
Odoo's Test Framework - Learn Best Practices
Odoo
 
Políticas de grupos GPO
Antonio Ortega
 
Interbloqueo
JosefaYareni
 
Taller de Base de Datos - Unidad 6 SQL procedural
José Antonio Sandoval Acosta
 
Que Es Java
quesada_diego
 
Correction Examen 2016-2017 POO .pdf
slimyaich3
 
Modul praktikum Bahasa assembly
stephan EL'wiin Shaarawy
 
Terminologia Médica_230824_131735.pdf
JoseQuiroga49
 

Similar to Pushing AI to the Client with WebAssembly and Blazor (20)

PPTX
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Fwdays
 
PPTX
Blazor.pptx
ssuserb1d1a2
 
PPTX
Blazor v1.1
Juan Luis Guerrero Minero
 
PPTX
DevDay 2018 - Blazor
Denis Voituron
 
PPTX
Full stack web development with c# and web assembly - Blazor.Net
Ruwantha Ratnayake
 
PPTX
Blazor and more.pptx
Jürgen Gutsch
 
PDF
Learning Blazor (Fourth Early Release) David Pine
zapatruca
 
PPTX
What's new in .net 5 by muralidharan deenathayalan
Muralidharan Deenathayalan
 
PDF
بالعربي التطور في البرمجة باستخدام ال .Net
Mohamed Galal
 
PPTX
Building Web Apps with WebAssembly and Blazor
Amir Zuker
 
PDF
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
CodeValue
 
PPTX
Blazor Full-Stack
Ed Charbeneau
 
PPTX
.NET Core Previews - New Features in .NET Core and ASP.NET Core 2.1, Blazor a...
Jon Galloway
 
PPTX
Modernizing Web Apps with .NET 6.pptx
Ed Charbeneau
 
PPTX
Modernizing Web Apps with .NET 6.pptx
Ed Charbeneau
 
PPTX
WebAssembly and .NET
Joanna Lamch
 
PPTX
Blazor - An Introduction
JamieTaylor112
 
PDF
Blazor - The New Silverlight?
Christian Nagel
 
PPTX
Blazor
Ed Charbeneau
 
PDF
WebAssemlby vs JavaScript
Alexandr Skachkov
 
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Fwdays
 
Blazor.pptx
ssuserb1d1a2
 
DevDay 2018 - Blazor
Denis Voituron
 
Full stack web development with c# and web assembly - Blazor.Net
Ruwantha Ratnayake
 
Blazor and more.pptx
Jürgen Gutsch
 
Learning Blazor (Fourth Early Release) David Pine
zapatruca
 
What's new in .net 5 by muralidharan deenathayalan
Muralidharan Deenathayalan
 
بالعربي التطور في البرمجة باستخدام ال .Net
Mohamed Galal
 
Building Web Apps with WebAssembly and Blazor
Amir Zuker
 
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
CodeValue
 
Blazor Full-Stack
Ed Charbeneau
 
.NET Core Previews - New Features in .NET Core and ASP.NET Core 2.1, Blazor a...
Jon Galloway
 
Modernizing Web Apps with .NET 6.pptx
Ed Charbeneau
 
Modernizing Web Apps with .NET 6.pptx
Ed Charbeneau
 
WebAssembly and .NET
Joanna Lamch
 
Blazor - An Introduction
JamieTaylor112
 
Blazor - The New Silverlight?
Christian Nagel
 
WebAssemlby vs JavaScript
Alexandr Skachkov
 
Ad

More from J On The Beach (20)

PDF
Massively scalable ETL in real world applications: the hard way
J On The Beach
 
PPTX
Big Data On Data You Don’t Have
J On The Beach
 
PPTX
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
J On The Beach
 
PDF
Pushing it to the edge in IoT
J On The Beach
 
PDF
Drinking from the firehose, with virtual streams and virtual actors
J On The Beach
 
PDF
How do we deploy? From Punched cards to Immutable server pattern
J On The Beach
 
PDF
Java, Turbocharged
J On The Beach
 
PDF
When Cloud Native meets the Financial Sector
J On The Beach
 
PDF
The big data Universe. Literally.
J On The Beach
 
PDF
Streaming to a New Jakarta EE
J On The Beach
 
PDF
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
J On The Beach
 
PDF
Axon Server went RAFTing
J On The Beach
 
PDF
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
J On The Beach
 
PDF
Madaari : Ordering For The Monkeys
J On The Beach
 
PDF
Servers are doomed to fail
J On The Beach
 
PDF
Interaction Protocols: It's all about good manners
J On The Beach
 
PDF
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
J On The Beach
 
PDF
Leadership at every level
J On The Beach
 
PDF
Machine Learning: The Bare Math Behind Libraries
J On The Beach
 
PDF
Getting started with Deep Reinforcement Learning
J On The Beach
 
Massively scalable ETL in real world applications: the hard way
J On The Beach
 
Big Data On Data You Don’t Have
J On The Beach
 
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
J On The Beach
 
Pushing it to the edge in IoT
J On The Beach
 
Drinking from the firehose, with virtual streams and virtual actors
J On The Beach
 
How do we deploy? From Punched cards to Immutable server pattern
J On The Beach
 
Java, Turbocharged
J On The Beach
 
When Cloud Native meets the Financial Sector
J On The Beach
 
The big data Universe. Literally.
J On The Beach
 
Streaming to a New Jakarta EE
J On The Beach
 
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
J On The Beach
 
Axon Server went RAFTing
J On The Beach
 
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
J On The Beach
 
Madaari : Ordering For The Monkeys
J On The Beach
 
Servers are doomed to fail
J On The Beach
 
Interaction Protocols: It's all about good manners
J On The Beach
 
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
J On The Beach
 
Leadership at every level
J On The Beach
 
Machine Learning: The Bare Math Behind Libraries
J On The Beach
 
Getting started with Deep Reinforcement Learning
J On The Beach
 
Ad

Recently uploaded (20)

PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
PPTX
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 

Pushing AI to the Client with WebAssembly and Blazor

  • 1. PUSHING AI TO THE CLIENTPUSHING AI TO THE CLIENT WITH WEBASSEMBLY AND BLAZORWITH WEBASSEMBLY AND BLAZOR Barry S. Stahl - @bsstahl - http://www.cognitiveinheritance.com PRINTABLE VERSIONPRINTABLE VERSION
  • 2. ABOUT MEABOUT ME Favorite Physicists Favorite Mathematicians Harold "Hal" Stahl Ada Lovelace Carl Sagan Alan Turing Neil Degrasse Tyson Johannes Kepler Nikola Tesla Rene Descartes Marie Curie Isaac Newton Richard Feynman Leonardo Fibonacci Albert Einstein George Boole Other notables: Niels Bohr, Galileo Galilei, Michael Faraday, Blaise Pascal, Johann Gauss, Grace Hopper, Stephen Hawking, Marvin Minsky, Daphne Koller, Benoit Mandelbrot I think it is noteworthy that I am the type of person who has both favorite physicists and favorite mathematicians - @bsstahl 16 Apr 2017
  • 3. SOME OSS PROJECTS I RUNSOME OSS PROJECTS I RUN [Experimental] The media tracking and aggregation system that was used to assemble this presentation A blogging platform that produces plain HTML5/CSS output for ultimate scalability. A set of extension methods helpful when building unit tests. A conference schedule optimizer A microservices framework for creating conversational bots on top of Bot Framework. A library of abstractions and their implementations that help create loosely-coupled applications. A c# library and website for generating agenda's for Toastmasters meetings. Liquid Victor Prehensile Pony-Tail TestHelperExtensions Conference Scheduler IntentBot LiquidNun Toastmasters Agenda
  • 4. GIVECAMPGIVECAMP International Headquarters: WHERE SOFTWARE CREATORS COME TOGETHER TO BUILD GREAT TOOLS FOR AMAZINGWHERE SOFTWARE CREATORS COME TOGETHER TO BUILD GREAT TOOLS FOR AMAZING LOCAL CHARITIESLOCAL CHARITIES http://givecamp.org
  • 5. WASM IN THE BROWSERWASM IN THE BROWSER A rst look at WASM directly in the browser HTTPS://WEBASSEMBLY.GITHUB.IO/WABT/DEMO/WAT2WASM/HTTPS://WEBASSEMBLY.GITHUB.IO/WABT/DEMO/WAT2WASM/
  • 6. WHAT IS WEBASSEMBLY (WASM)WHAT IS WEBASSEMBLY (WASM) A W3C Speci cation A portable binary compilation-target Designed to execute well within existing web platforms Able to support non-browser embeddings The Intermediate-Language of the Web Can be compiled-to from nearly any language Can be executed on nearly any platform Can be used inside the browser or out
  • 7. WASM PROVIDESWASM PROVIDES A Structured Stack Machine execution model Most instructions use the stack for data Flow of control handled with structured constructs i.e. if and while A very limited type-system Integer types: i32 & i64 Float types: f32 & f64 Any other types handled by the compiler
  • 8. WASM MODULE SECTIONSWASM MODULE SECTIONS Name Code Description Type 1 Declares signatures of all types (functions) Import 2 Declares all imported modules (i.e. Javascript) Function 3 Cross references sections type (1) and code (10) Table 4 Declares tables for storage Memory 5 Declares contiguous memory sections Global 6 Declares globabl variables Export 7 Declares items to be exposed outside of the module Start 8 Declares the start function if one exists Element 9 Used to initialize imported modules Code 10 The implementation of all functions Data 11 Used to initialize any memory ranges
  • 9. ONE GOAL OF WEBASSEMBLYONE GOAL OF WEBASSEMBLY Execute in the same sematic universe as JavaScript Allow synchronous calls to and from JavaScript Enforce the same-origin and permissions security policies Design to integrate well with the existing Web platform - https://webassembly.org/docs/high-level-goals/
  • 10. BROWSER EXECUTION PIPELINEBROWSER EXECUTION PIPELINE AS THE WORLD EXISTED PRE-WASMAS THE WORLD EXISTED PRE-WASM
  • 11. BROWSER EXECUTION PIPELINEBROWSER EXECUTION PIPELINE AS THE WORLD EXISTS TODAYAS THE WORLD EXISTS TODAY
  • 14. WHY RAZOR?WHY RAZOR? Simpli ed Routing Each page's location in the le system is its route Simpli ed Layout HTML is inline with C# or VB syntax Can be used alongside MVC Razor pages are ASP.NET pages
  • 15. BASIC BLAZORBASIC BLAZOR A rst look at Blazor from File > New Project
  • 16. WHAT IS BLAZOR?WHAT IS BLAZOR? A SPA Framework Builds client-side applications Runs in the browser C# is the programming language Uses the Razor engine and syntax C# code is inline Encapsulation done with components .NET code executed using mono.wasm
  • 17. MONO.WASMMONO.WASM A Web Assembly implementation of the .NET runtime Built by the Xamarin team Supports NetStandard2.0
  • 18. CHUTES & LADDERS PROJECT STRUCTURECHUTES & LADDERS PROJECT STRUCTURE
  • 19. .NET CODE IN BLAZOR.NET CODE IN BLAZOR Using Blazor to run existing .NET libraries
  • 20. WHY NOT USE BLAZOR RIGHT NOW?WHY NOT USE BLAZOR RIGHT NOW? Blazor has only recently had its "Experimental" tag removed by Microsoft We still don't know when it will RTW There may be better ways to accomplish the goals The tooling is not yet where we need it to be Many features are planned but not yet implemented Little bene t if you are uent and comfortable with JavaScript Why move away from proven technologies if it isn't solving your pain? Little bene t if you don't need existing .NET in the browser If your code is Javascript (or not written) use what is right
  • 21. SHOULD I BE USING BLAZOR NOW?SHOULD I BE USING BLAZOR NOW? ONLY IF YOU ARE UNHAPPY WITH JAVASCRIPT OR WANT TO RUN .NET IN THE BROWSERONLY IF YOU ARE UNHAPPY WITH JAVASCRIPT OR WANT TO RUN .NET IN THE BROWSER ANDAND YOU DON'T NEED TO RELEASE FOR AT LEAST 6 MONTHSYOU DON'T NEED TO RELEASE FOR AT LEAST 6 MONTHS
  • 22. HOW DO I GET STARTED?HOW DO I GET STARTED? Install Visual Studio 2019 Install the latest .NET Core Install the Blazor Extension In Visual Studio 2019 File > New Project > Web > ASP.NET Core Web Application https://visualstudio.microsoft.com/downloads/ https://www.microsoft.com/net/download https://go.microsoft.com/fwlink/?linkid=870389
  • 23. SUMMARYSUMMARY WebAssembly A portable binary compilation-target Executes in the same browser context as Javascript Blazor A SPA framework Uses C# for scripting Interpreted using Mono.wasm in the browser
  • 24. Pushing AI to the Client Barry S. Stahl - @bsstahl - http://www.cognitiveinheritance.com RESOURCESRESOURCES These Slides Code Instructions & Tutorials http://PushingAIToTheClient-2019Q2.azurewebsites.net Chutes & Ladders Simulation My GitHub Repos WebAssembly Blazor Cognitive Inheritance (my blog)