SPA Revolution with WebAssembly and Blazor Rainer Stropek | software

Slides:



Advertisements
Similar presentations
UNIT4 BUSINESS ANALYTICS. page WHAT IS THE PRODUCT? 2 A business intelligence tool kit, specializing in Coporate Performance Management An application.
Advertisements

Object Oriented Software Development 1. Introduction to C# and Visual Studio.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Philly.NET Hands-on Labs JAVASCRIPT SERIES. July 9: JavaScript Syntax Visual Studio ◦Projects ◦Editors ◦Debugging ◦Script blocks ◦Minification and bundling.
ASP.NET 5 Visual Studio 2015 Templates Bill Wolff Rob Keiser June 10, 2015.
Angelo Chan Kamran Bilgrami. Agenda ● WinJS - What and Why ● Modern Apps ● WinRT Architecture ● Demos o Controls o Data Bindings o Program LifeCycle Management.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Introducing NativeScript [Pavel Kolev Software Telerik: a Progress company]
Ventsislav Popov Crossroad Ltd.. 1. What is AJAX?  AJAX Concept  ASP.NET AJAX Framework 2. ASP.NET AJAX Server Controls  ScriptManager, UpdatePanel.
Name Microsoft Student Partner Overview of the Visual Studio 2005 Express Products.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
INTRODUCING HYBRID APP KAU with MICT PARK IT COMPANIES Supported by KOICA
//liveVirtualacademy2011/ What’s New for ASP.NET 4.5 and Web Development in Visual Studio 11 Developer Preview Γιώργος Καπνιάς MVP, MCT, MCDP, MCDBA, MCTS,
A Detailed Introduction To Visual Studio.NET CRB Tech ReviewsCRB Tech Reviews introduces you to the world of Visual.
Ramping Up On The SharePoint Framework (SPFx)
DevOps with ASP.NET Core and Entity Framework Core
Introducing the Microsoft® .NET Framework
Modernizing your. NET applications with. NET Standard,
JQuery Fundamentals Introduction Tutorial Videos
Pre-Production Meet with the client to create a project plan:
Angular 2 with ASP.NET Core in Practice
Essential tools for implementing and testing websites
Visual Studio 2017 By Michael Washington
Getting started with .NET Core
INF230 Basics in C# Programming
Angular 4 + TypeScript Getting Started
What's new in the world of SharePoint development and deployment
Introduction to ASP.NET 2.0
Kendo UI Builder Bob Brennan
ASP.NET Core 2.0 Fundamentals
Line of Business Solutions in SharePoint Online
The Modern ASP.NET Tech Stack!
The Transition to Modern Office Add-in Development
Introduction to .NET Framework Ch2 – Deitel’s Book
Did your feature got in, out or planned?
CE-105 Spring 2007 Engr. Faisal ur Rehman
Lean .NET stack for building modern web apps
DNN Connect 2017 Microsoft Keynote
Not Sure how you Should React
Developing applications using Chromium
Top 5 Javascript Frameworks
A lot of Software Development is about learning
SPA Revolution with WebAssembly and Blazor Rainer Stropek | software
MVC in ASP.NET Core: The new kid on the block
Explore web development with Microsoft ASP.NET Core 1.0
Microsoft Ignite NZ October 2016 SKYCITY, Auckland
Building Modern Web Apps with ASP.NET MVC 6
Explore web development with Microsoft ASP.NET Core 1.0
Blazor C# in the Browser Derek codeopinion.com.
ASP.NET
Introducing the .NET Framework
.NET Conf 2018 Keynote Jose Barbosa Aaron Amm Theeranit.
04 | Apps and SharePoint Chris Johnson | SharePoint Guru
Introduction.
Introduce to Angular 6 Present by: Võ Văn Hào
Blazor C# running in the browser via WebAssembly
WEBASSEMBLY I .NET - WEB APLIKACIJE BUDUĆNOSTI
Introduction to ASP.NET Parts 1 & 2
Mark Quirk Head of Technology Developer & Platform Group
The Future is Now with ASP.NET Core 3.0
#01# ASP.NET Core Overview Design by: TEDU Trainer: Bach Ngoc Toan
Running C# in the browser
Blazor A new framework for browser-based .NET apps Ryan Nowak
WebAssembly: The Browser is your OS
What if I told you….
ASP.NET Core 2.0 The Future of Web Apps Shahed Chowdhuri
Presentation transcript:

SPA Revolution with WebAssembly and Blazor Rainer Stropek | software architects @rstropek

Samples: https://github

https://commons.wikimedia.org/wiki/File:Csharp_Logo.png https://commons.wikimedia.org/wiki/File:Images_200px-ISO_C%2B%2B_Logo_svg.png

https://commons.wikimedia.org/wiki/File:Antu_firefox.svg https://commons.wikimedia.org/wiki/File:Microsoft_Edge_logo.svg https://en.wikipedia.org/wiki/File:Google_Chrome_icon_(September_2014).svg https://commons.wikimedia.org/wiki/File:Wikimedia_Foundation_Servers-8055_14.jpg

https://commons.wikimedia.org/wiki/File:Silverlight_Logotyp.jpg

https://de.wikipedia.org/wiki/Datei:Unofficial_JavaScript_logo_2.svg

https://de.wikipedia.org/wiki/Datei:Angular_full_color_logo.svg https://de.wikipedia.org/wiki/Datei:AngularJS_logo.svg https://de.wikipedia.org/wiki/Datei:Node.js_logo.svg

WebAssembly Binary instruction format for a stack-based VM http://webassembly.org/ Binary instruction format for a stack-based VM For Browser and beyond Portable compilation target for high-level languages like C/C++/Rust Open Standard Why? Performance Safe https://commons.wikimedia.org/wiki/File:Web_Assembly_Logo.svg

Some Facts about WASM Very different from .NET‘s IL Much simpler Linear memory No GC Cannot access the DOM = no UI (…yet) JavaScript interop exists WASM calls JS JS calls into WASM

WASM and the CLR C++ can be compiled into WASM The .NET CLR is written in C++ Can the .NET CLR run on WASM? Yes, it can – with mono

Blazor Built on the Mono WASM Runtime ASP.NET Razor Template Syntax The .NET Core you know and love…

Demos Anatomy of a Blazor app JS Interop Data Binding Router RESTful Web APIs

Anatomy of a Blazor App dotnet command line Add to a new solution dotnet new blazor dotnet build Add to a new solution dotnet new sln dotnet sln add BlazorDemo.csproj Publish Solution dotnet publish -c Release -o out Review content of out folder VS2017 Open VS2017 and show how to create Blazor app there Show Blazor language service extension Open project in VS2017 (start BlazorDemo.sln)

Running a SPA Blazor App dotnet command line dotnet blazor serve F5 in Visual Studio – show .csproj Look at Network tab in Chrome Dev Tools Static hosting Prove SPA nature by hosting app in Chrome Dev Web Server (chrome://apps) Speak about rewrite rules

Anatomy of a Blazor App Loading HTML, CSS, JS WASM (Mono) .NET DLLs

Hosting in ASP.NET Core RestApi Sample Publish and discuss result Show and discuss Startup.cs Microsoft.AspNetCore.Blazor.Server in UseBlazor<T> Show and discuss shared library (Shift+F12) Publish and discuss result dotnet publish -c Release -o out Run hosted app in Docker container: docker run -v C:\Code\GitHub\learn-blazor\samples\RestApi\RestApi.Server\out:/app -w /app -p 8081:5000 microsoft/dotnet:2.1.4-aspnetcore-runtime-alpine dotnet RestApi.Server.dll

Razor Walkthrough Razor BlazorComponent Counter.cshtml Razor file Show generated C# file Counter.g.cs  Razor becomes C# BlazorComponent Speak about Components-based architecture Show DynamicRenderTree in BlazorPages app Blazor templates quick tour (BlazorPages sample) OneWayDataBinding.cshtml TwoWayDataBinding.cshtml EventBinding.cshtml Initialization.cshtml ManualRefresh.cshtml

Anatomy of a Blazor App Razor Code Generation

JavaScript Interop Basics Coded JS Interop Open two-way-data-binding in BlazorPages sample Break on node removal at You are an administrator Trigger node removal and speak about call stack Coded JS Interop Open interop-basics in RestApi sample Set breakpoint in window.say Trigger breakpoint and speak about call stack Open auto-complete in RestApi sample Set breakpoints in fillAutoComplete and select callback

Anatomy of a Blazor App Rendering

JavaScript Intertop

Dependency Injection Basics HttpClient Open Startup.cs in DependencyInjection sample Open CustomerList.cshtml in DependencyInjection sample – @inject Speak about DI basics Open Repository.cs in DependencyInjection sample – constructor injection HttpClient Open FetchData.cshtml in RestApi sample Speak about HttpClient standard service HttpClient(HttpMessageHandler) Constructor HttpClient creation in Blazor (Browser) BrowserHttpMessageHandler in Blazor (Browser) JS implementation using fetch API Show call stack for Web API calls in RestApi service

Router Basics (in RouterDemo sample) Links HelloUniverse.cshtml HelloPlanet.cshtml HelloWorld.cshtml Links MainMenu.cshtml Talk about base tag in index.html

Server-Side Hosting Client-side Server-side Browser Server UI Thread All benefits of a SPA Restrictions because of WASM Maturity of tooling and runtime Larger initial download Server-side Same Blazor programming model Full .NET environment Smaller initial download More server resources No offline support Browser Server UI Thread dotnet Blazor Blazor (JS) WS

Server-Side Hosting Create new Blazor app with Server-Side Hosting Code Walkthrough Show blazor.server.js reference in index.html Show UseServerSideBlazor<T> in Startup.cs Debug Run app Show WebSockets traffic in Chrome Dev Tools Set breakpoint in counter increment, show it hitting

What else is in the box? Debugging Layouts Early prototype Layouts Master pages Many details about component model E.g. Child content

So what? Is Blazor the Angular/React/Vue Killer?

Should I use it? JS-based Frameworks Blazor TypeScript Huge ecosystem of tools and components Mature Feature-richness Proven for small and large projects Web development skills necessary No reuse of C# code possible Blazor C# and JavaScript/TypeScript Limited community Immature tools Limited functionality (B)Leading Edge Less web development skills necessary Reuse of C# code possible Maturity of C#/.NET

Learning More…

Thank you for coming!