http://blazormastermind.azurewebsites.net
Speakers
Denis Voituron
• Engineer
• Developer VB3  C#
• Podcaster
• Principal .Net Software Architect
Traditional
Single Page Application
JS
JavaScript
• Easy to learn
• The king of the Web
• Dynamic typing
• Insufficient structures
• No POO
• Poorly accepted by pro.
Alternatives
WebAssembly
• Announced on June 17, 2015
• Supported by the majority of browsers
• Developed by the W3C
• Draft published on 15 February 2018
https://www.w3.org/TR/wasm-core-1
01000
10011
WA WEB
=
WebAssembly (wasm)
A safe, portable, low-level code format designed for
efficient execution and compact representation.
http://webassembly.org
Format bas niveau, portable et sûr, conçu pour une exécution efficace et une représentation compacte.
WebAssembly (wasm)
A safe, portable, low-level code format designed for
efficient execution and compact representation.
int calc(int a, int b)
{
if (a > 10)
return a * 5;
return a * b;
}
https://mbebenita.github.io/WasmExplorer
http://webassembly.org
Format bas niveau, portable et sûr, conçu pour une exécution efficace et une représentation compacte.
Usable ?
WebAssembly or "wasm" is a new portable, size- and load-time-
efficient format suitable for compilation to the web.
Global usage: 80,2% of all users
Blazor ?
WA
B azor
v 0.7.0
https://blazor.net
Why .NET ?
• Stable, mature, efficient .NET standard, MSBuild, Unit Tests, …
• Fast, scalable .NET Core for Backend Services
• Modern languages Innovations in C#, F#, Razor
• Tools oriented dev Visual Studio, IntelliSense
everything is already there
BROWSER
Principles
Get started
• Go to https://blazor.net
• Install the .NET Core SDK : https://dot.net
• Install the Blazor CLI
• In Visual Studio, install the Blazor extension
https://marketplace.visualstudio.com/items?itemName=aspnet.blazor
dotnet new -i Microsoft.AspNetCore.Blazor.Templates
Let’s GO
MasterMind
Computer Choice
Row 1
Row 2
Row 3
Demo
1. Component : Razor, Code Behind
2. Binding
3. Parameters
4. Dependency Injection
5. Routing
6. JavaScript Interop
7. Publish
<Counter />
<div value="@City" onchange="@MyMethod" />
<div bind ="@Lastname">
@page "/Contacts/{id:int}"
[Inject]
<NavLink />
JSRuntime.Current.InvokeAsync
dotnet publish
[Parameter]
IUriHelperHttpClient
@page "/Contacts"
Server-side Blazor
SignalR
Server-side Blazor
• Entire app with C#
• Avoid page refreshes
• App size smaller
• Full server capabilities
• Thin clients
• Latency for every interaction
• No offline support
• Server must manage multiple
connections & states
.NET Core 3.0
Blazor
Compiler
.NET Standard (C#) + Razor (HTML)
Components Binding Parameters
Routes Injection Interrop
Single Page Application
WebAssembly
http://programmez.devday.be
https://blazor.net
https://blazor.net/community.html
https://learn-blazor.com
https://www.slideshare.net/dvoituron
https://blazormastermind.azurewebsites.net
https://github.com/dvoituron/Blazor.Mastermind
@DenisVoituron

DevDay 2018 - Blazor

Editor's Notes

  • #3 Denis
  • #4 Quand vous voulez développer une application, vous avez une multitude de choix de frameworks, de composants, d’outils, langages. Pour développer pour le Web, vous ne disposez que de JavaScript.
  • #5 Quand vous voulez développer une application, vous avez une multitude de choix de frameworks, de composants, d’outils, langages. Pour développer pour le Web, vous ne disposez que de JavaScript.
  • #6 Quand vous voulez développer une application, vous avez une multitude de choix de frameworks, de composants, d’outils, langages. Pour développer pour le Web, vous ne disposez que de JavaScript.
  • #7 Facile à apprendre Le roi du web Typage dynamique Structures insuffisantes Pas de POO Mal accepté par les pro Sa FORCE est sa FAIBLESSE
  • #8 Applet Java ActiveX Flash Silverlight Google Native Client Dart Google Portable Native Client Asm.js
  • #9 Annoncé le 17 juin 2015 Supporté par la majorité des navigateurs Développé par le W3C Draft publié le 15 février 2018
  • #10 Un format de code de bas niveau, portable et sûr, conçu pour une exécution efficace et une représentation compacte.
  • #14 Stable, mature, efficace .NET standard, MSBuild, Unit Tests, … Rapide, évolutif .NET Core pour les services Backend Langages modernes Innovations dans C#, F#, Razor Outils orientés dev Visual Studio, IntelliSense
  • #21 Facile à apprendre Le roi du web Typage dynamique Structures insuffisantes Pas de POO Mal accepté par les pro Sa FORCE est sa FAIBLESSE