Running C# in the browser

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

Introduction to .NET Framework
Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
Building Mobile Apps in the Cloud – Comparing Approaches.
Amanda Silver Director of Program Management Visual Studio Tools for Client Applications Cross-Platform Development using Visual Studio.
Delivering the multiagent technology to end-users through the web D. Mitrović 1, M. Ivanović 1, C. Bădică 2 1 University of Novi Sad, Serbia 2 University.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Microsoft.Net Technology Sachin Shetty Vimal Amin Thomas Mullasaril Vinutna Pulavarti Software Engineering CS616 Instructor:Dr.Tappert.
V1.00 © 2009 Research In Motion Limited Introduction to Mobile Device Web Development Trainer name Date.
Microsoft SharePoint 2013 SharePoint 2013 as a Developer Platform
It’s always better live. MSDN Events Developing ASP.NET AJAX Controls with Silverlight.
Development of mobile applications using PhoneGap and HTML 5
What is Crystal Reports By: Wase Siddiqui. History Crystal Reports was not created by SAP. It was a Software created by Terry Cunningham. It was created.
Building Windows Apps Jason Keicher, Technical Specialist
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
DEV-5: Introduction to WebSpeed ® Stephen Ferguson Sr. Training Program Manager.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
Developing ASP.NET AJAX Controls with Silverlight Barry Gervin Microsoft Regional Director John Bristowe Developer Advisor, Microsoft.
ASP.NET in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
ASP.NET (Active Server Page) SNU OOPSLA Lab. October 2005.
The business logic engine for Microsoft IIS Speaker T.M. Arnett.
 Can access all API’s made available by OS vendor.  SDK’s are platform-specific.  Each mobile OS comes with its own unique tools and GUI toolkit.
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.
WHAT'S THE DIFFERENCE BETWEEN A WEB APPLICATION STREAMING NETWORK AND A CDN? INSTART LOGIC.
Build Hybrid Mobile Apps with Ionic, Angular, & Cordova Brian
Mobile Application Solution
GrapeCity Build Experiences with Enterprise-level Tools and Solutions
Introducing the Microsoft® .NET Framework
Introduction to Xamarin C# Everywhere
Netscape Application Server
The Modern ASP.NET Tech Stack!
Platform as a Service.
Introduction to .NET Framework Ch2 – Deitel’s Book
Multi-Device Hybrid Apps What, Why, and When to Use Hybrid Development Option Ervin Loh ALM Program Manager
Building Innovative Apps using the Microsoft Developer Platform
Mobile Application Solution
A lot of Software Development is about learning
Module 1: Getting Started
SPA Revolution with WebAssembly and Blazor Rainer Stropek | software
MVC in ASP.NET Core: The new kid on the block
Building Modern Web Apps with ASP.NET MVC 6
DotnetConf 11/14/2018 3:27 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE.
Blazor C# in the Browser Derek codeopinion.com.
Web Development Using ASP .NET
.NET and .NET Core Foot View of .NET Pan Wuming 2017.
SPA Revolution with WebAssembly and Blazor Rainer Stropek | software
Microsoft Connect /1/2018 2:36 AM
ASP.NET Module Subtitle.
Introducing the .NET Framework
SharePoint 2019 Overview and Use SPFx Extensions
Last.Backend is a Continuous Delivery Platform for Developers and Dev Teams, Allowing Them to Manage and Deploy Applications Easier and Faster MICROSOFT.
.NET Conf 2018 Keynote Jose Barbosa Aaron Amm Theeranit.
Best practices for packaging and distributing device drivers
1. Azure Data Explorer Azure Data Explorer enables rich data exploration over raw, structured, and semi-structured data delivering fast time to insight.
Blazor C# running in the browser via WebAssembly
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
Yale Digital Conference 2019
Blazor A new framework for browser-based .NET apps Ryan Nowak
WebAssembly: The Browser is your OS
What if I told you….
SSDT, Docker, and (Azure) DevOps
Presentation transcript:

Running C# in the browser using Blazor

Dan Patrascu-Baba Founder @ Codewrinkles .Net Developer @ Amdaris Mentor @ Scoala Informala de IT Interests: .Net Core, Microsoft Azure, Angular, Office 365

Blazor => experimental Microsoft project Full-stack web development with .NET via WebAssembly Requires no plugin or code transpilation Works in all modern browsers including mobile browsers Browser + Razor = Blazor!

Why .NET in the browser? Stable and consistent: .NET offers standard APIs, tools, and build infrastructure across all .NET platforms that are stable, feature rich, and easy to use. Modern innovative languages: .NET languages like C# and F# make programming a joy and keep getting better with innovative new language features. Industry leading tools: The Visual Studio product family provides a great .NET development experience on Windows, Linux, and macOS. Fast and scalable: .NET has a long history of performance, reliability, and security for web development on the server. Using .NET as a full-stack solution makes it easier to build fast, reliable and secure applications.

Blazor features 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

WebAssembly = the future of web development WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable target for compilation of high-level languages like C/C++, enabling deployment on the web for client and server applications. Code compiled to WebAssembly can run in any browser at native speeds

BROWSER Short overview App.dll Compile to .NET assemblies .NET .cs .cshtml BROWSER WebAssembly (mono.wasm) .NET (mscorlib.dll, System.Core.dll,…) App.dll Compile to .NET assemblies

Interpreted mode

AOT mode

There are however some challenges Mono not optimized to act as runtime in a browser AOT is for now only a roadmap point Limited debugging options Performance Download sizes are too big

Server-side Blazor (Razor Components) to the rescue! Benefits of Blazor architecture Blazor  separate the execution of a Blazor application from the rendering process Blazor can be run a in Web Worker thread with events coming in from the UI thread and Blazor pushing back UI updates. This would allow Blazor to be used for developing Progressing Web Applications. Another option would be to develop desktop apps using Blazor with Electron

Server-side Blazor (Razor Components) to the rescue! Server side model When you make the initial request your browser will download an index.html file and a small javascript file called blazor.server.js. Blazor then establishes a connection between your browser and the server using SignalR. The server will execute the component logic server side producing HTML. This is then compared, on the server, to a snap-shot of the DOM currently on the client. When you interact with the application that event is packaged up and sent back to the server via the same connection, where it will be processed and the resulting DOM changes will be sent back to the browser to be rendered.

Server-side Blazor (Razor Components) to the rescue! Benefits You can still write your entire app with .NET and C# using the Blazor component model. Your app still has a rich interactive feel and avoids unnecessary page refreshes. Your app download size is significantly smaller, and the initial app load time is much faster. Your Blazor component logic can take full advantage of server capabilities, including using any .NET Core compatible APIs. Because you're running on .NET Core on the server, existing .NET tooling, such as debugging, works as expected. Server-side hosting works with thin clients (for example, browsers that don't support WebAssembly and resource constrained devices).

Server-side Blazor (Razor Components) to the rescue! No such thing as a free lunch  Latency: every user interaction now involves a network hop. No offline support: if the client connection goes down, the app stops working. Scalability: the server must manage multiple client connections and handle client state.

Some conclusions The goal of the Blazor team is still to deliver the client-side model, that has not changed and will continue to be pursued. Chris Sainty, Microsoft

Razor components (server-side Blazor) will be shipped in .Net Core 3.0

Resources Blazor: https://blazor.net/index.html Docs: https://blazor.net/docs/index.html Asp.Net Blog: http://wrink.me/06a701a6 GitHub: https://github.com/aspnet/Blazor Codewrinkles: http://codewrinkles.com My Blog: http://danpatrascu.com/ Resources

Questions?

Thank you!