Full-stack web development
with C# and Web-Assembly
Ruwantha Ratnayake
Software Engineer – Ism APAC
B.Sc(Hons) in Computing Science
Blazor.net
About Speaker
Ruwantha Ratnayake
Software Engineer – ISM APAC
• In the field of IT solutions development Since
2013
https://www.facebook.com/007ruwantha
https://www.linkedin.com/in/ruwantharatnayake
https://ruratnayake.wordpress.com/
Agenda
•Introduction to Blazor.net and How it works
•Setup Developer Environment
•Start Development with Blazor.net
•Key Features in Blazor.net
•Sample Application
Blazor.Net
Blazor is an experimental .NET web framework using
C#/Razor and HTML that runs in the browser with
WebAssembly.
Blazor uses only the latest web standards. Therefor No
plugins or transpilation needed. It runs in the browser
on a real .NET runtime implemented
in WebAssembly that executes normal .NET assemblies.
Blazor.Net – Version History
Current Version 0.5.0 experiential release (July 25, 2018)
Version 0.4.0 experiential release (June 7, 2018)
Version 0.3.0 experiential release (May 2, 2018)
Version 0.2.0 experiential release (April 17, 2018)
Version 0.1.0 experiential release (March 19, 2018)
Blazor is an experimental project and is going to be changing
regularly. IT IS NOT PRODUCTION READY.
Yet It Seems to have a Promising future!!!.
WebAssembly
It is a low-level assembly-like language with a compact
binary format that provides a way to run code written
in high level languages (like C/C++/Rust) on the web at
near native speed.
It is also designed to run alongside JavaScript, allowing
both to work together.
Why WebAssembly and C# ? Or Why Blazor?
Mono
Mono, the open source development platform
based on the .NET Framework, allows developers
to build/ run cross-platform applications with
improved developer productivity.
Mono’s .NET implementation is based on the ECMA standards
for C# and the Common Language Infrastructure.
Full stack web development with c# and web assembly - Blazor.Net
Razor
Razor is a template engine that combines C# with
HTML to create dynamic web content.
Rendering DOM
Setup Developer Environment
•Install the .NET Core 2.1 SDK (2.1.300 or later).
•Install Visual Studio 2017 (15.7 or later) with
the ASP.NET and web development workload
selected.
•Install the latest Blazor Language Services
extension from the Visual Studio Marketplace.
Get started with Blazor
•Create project from Visual Studio
•Create Project from command prompt
• Project Templates
•Blazor (Standalone)
•Blazor (ASP.NET Core Hosted)
•Blazor (Serverside in ASP.NET Core)
•Blazor Library [Using CLI only]
Demo 01 - Key Features
•A component model for building composable UI
•Life-Cycle Events
•Data binding & Events
•Routing
•Layouts
•JavaScript interop
•Validations and Debugging
JavaScript interop
A Blazor app can invoke JavaScript functions from .NET
and .NET methods from JavaScript code.
• Invoke JavaScript functions from .NET methods
• Invoke .NET methods from JavaScript functions
Demo 02 – Sample Application
• Download Application from GitHub
• Create A Form to Add/ Edit records
• Display Records
l
Contribute
•How to contribute
• Provide feedback & Make suggestions
• Report Bugs and contribute code
• Ask questions and participate in the discussion
•Where you can contribute
• GitHub Repo
• Blazor Community
• MSDN Blog
Resource
• Blazor.net
• LEARN BLAZOR
• ASP.NET Blog
• ASP.Net Blazor GitHub
• Blazor community resources
• Blazor: a technical introduction by Steve Sanderson
• Contribute
Full stack web development with c# and web assembly - Blazor.Net

More Related Content

PPTX
PPTX
Introduction to ASP.NET Core
PPTX
Whats new in .net core 3
PDF
What's New in ASP.NET Core 3
PPTX
Introduction to .NET Core & ASP.NET Core MVC
PPTX
Professional JavaScript Error-Logging
PPTX
ASP.NET Core: The best of the new bits
PPTX
Blazor - An Introduction
Introduction to ASP.NET Core
Whats new in .net core 3
What's New in ASP.NET Core 3
Introduction to .NET Core & ASP.NET Core MVC
Professional JavaScript Error-Logging
ASP.NET Core: The best of the new bits
Blazor - An Introduction

What's hot (19)

PDF
Introduction of bootstrap in angular
PDF
Introduction to ASP.NET Core
PPTX
DotNet Conf Madrid 2019 - ASP.NET Core 3
PPTX
Que hay de nuevo en 2013 en la plataforma Microsoft para desarrolladores
PPTX
Migrating .NET Application to .NET Core
PPTX
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
PPTX
Microsoft <3 Linux with ASP.NET Core
PDF
React Server Side Rendering with Next.js
PPTX
ASP.NET Core 1.0 Overview
PPTX
A walkthrough of JavaScript ES6 features
PDF
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
PPTX
A guide to getting started with WebdriverIO
PDF
Server Side React for WordPress by Muhammad Muhsin @ The JavaScript for WordP...
PDF
Dot Net Core
PDF
Micro frontends with react and redux dev day
PPTX
PPTX
Node.js BFFs: our way to better/micro frontends
PDF
Isomorphic web application
Introduction of bootstrap in angular
Introduction to ASP.NET Core
DotNet Conf Madrid 2019 - ASP.NET Core 3
Que hay de nuevo en 2013 en la plataforma Microsoft para desarrolladores
Migrating .NET Application to .NET Core
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
Microsoft <3 Linux with ASP.NET Core
React Server Side Rendering with Next.js
ASP.NET Core 1.0 Overview
A walkthrough of JavaScript ES6 features
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
A guide to getting started with WebdriverIO
Server Side React for WordPress by Muhammad Muhsin @ The JavaScript for WordP...
Dot Net Core
Micro frontends with react and redux dev day
Node.js BFFs: our way to better/micro frontends
Isomorphic web application
Ad

Similar to Full stack web development with c# and web assembly - Blazor.Net (20)

PPTX
Blazor.pptx
PPTX
Welcome to Blazor
PPTX
DevDay 2018 - Blazor
PPTX
.NET Conf 2019 高雄場 - .NET Core 3.0
PPTX
PPTX
PDF
Blazor web apps
PDF
Blazor - The New Silverlight?
PDF
Introduction to ASP.NET MVC
PPTX
Modernizing Web Apps with .NET 6.pptx
PPTX
Modernizing Web Apps with .NET 6.pptx
PPTX
ASP.NET Core 2.0: The Future of Web Apps
DOC
Amit Kumar Architect with Web and Angular JS
PPTX
ASP.NET 5 Overview - Post Build 2015
PPTX
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
PPTX
Azure Integration DTAP Series, How to go from Development to Production – Par...
PPTX
Introduction to ASP.NET
DOC
Trinada pabolu profile
PPTX
.NET Fest 2018. Dino Esposito. ASP.NET Blazor—the C# Angular or the return of...
Blazor.pptx
Welcome to Blazor
DevDay 2018 - Blazor
.NET Conf 2019 高雄場 - .NET Core 3.0
Blazor web apps
Blazor - The New Silverlight?
Introduction to ASP.NET MVC
Modernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptx
ASP.NET Core 2.0: The Future of Web Apps
Amit Kumar Architect with Web and Angular JS
ASP.NET 5 Overview - Post Build 2015
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Azure Integration DTAP Series, How to go from Development to Production – Par...
Introduction to ASP.NET
Trinada pabolu profile
.NET Fest 2018. Dino Esposito. ASP.NET Blazor—the C# Angular or the return of...
Ad

Recently uploaded (20)

PDF
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
Altius execution marketplace concept.pdf
PPTX
Build automations faster and more reliably with UiPath ScreenPlay
PPTX
Module 1 Introduction to Web Programming .pptx
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PPTX
SGT Report The Beast Plan and Cyberphysical Systems of Control
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PPTX
Presentation - Principles of Instructional Design.pptx
PDF
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
PDF
LMS bot: enhanced learning management systems for improved student learning e...
PDF
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
PDF
4 layer Arch & Reference Arch of IoT.pdf
PDF
Ensemble model-based arrhythmia classification with local interpretable model...
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Altius execution marketplace concept.pdf
Build automations faster and more reliably with UiPath ScreenPlay
Module 1 Introduction to Web Programming .pptx
Data Virtualization in Action: Scaling APIs and Apps with FME
SGT Report The Beast Plan and Cyberphysical Systems of Control
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Presentation - Principles of Instructional Design.pptx
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
LMS bot: enhanced learning management systems for improved student learning e...
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
4 layer Arch & Reference Arch of IoT.pdf
Ensemble model-based arrhythmia classification with local interpretable model...
Co-training pseudo-labeling for text classification with support vector machi...
Early detection and classification of bone marrow changes in lumbar vertebrae...
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
A symptom-driven medical diagnosis support model based on machine learning te...
Build Real-Time ML Apps with Python, Feast & NoSQL

Full stack web development with c# and web assembly - Blazor.Net

  • 1. Full-stack web development with C# and Web-Assembly Ruwantha Ratnayake Software Engineer – Ism APAC B.Sc(Hons) in Computing Science
  • 3. About Speaker Ruwantha Ratnayake Software Engineer – ISM APAC • In the field of IT solutions development Since 2013 https://www.facebook.com/007ruwantha https://www.linkedin.com/in/ruwantharatnayake https://ruratnayake.wordpress.com/
  • 4. Agenda •Introduction to Blazor.net and How it works •Setup Developer Environment •Start Development with Blazor.net •Key Features in Blazor.net •Sample Application
  • 5. Blazor.Net Blazor is an experimental .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly. Blazor uses only the latest web standards. Therefor No plugins or transpilation needed. It runs in the browser on a real .NET runtime implemented in WebAssembly that executes normal .NET assemblies.
  • 6. Blazor.Net – Version History Current Version 0.5.0 experiential release (July 25, 2018) Version 0.4.0 experiential release (June 7, 2018) Version 0.3.0 experiential release (May 2, 2018) Version 0.2.0 experiential release (April 17, 2018) Version 0.1.0 experiential release (March 19, 2018) Blazor is an experimental project and is going to be changing regularly. IT IS NOT PRODUCTION READY. Yet It Seems to have a Promising future!!!.
  • 7. WebAssembly It is a low-level assembly-like language with a compact binary format that provides a way to run code written in high level languages (like C/C++/Rust) on the web at near native speed. It is also designed to run alongside JavaScript, allowing both to work together. Why WebAssembly and C# ? Or Why Blazor?
  • 8. Mono Mono, the open source development platform based on the .NET Framework, allows developers to build/ run cross-platform applications with improved developer productivity. Mono’s .NET implementation is based on the ECMA standards for C# and the Common Language Infrastructure.
  • 10. Razor Razor is a template engine that combines C# with HTML to create dynamic web content.
  • 12. Setup Developer Environment •Install the .NET Core 2.1 SDK (2.1.300 or later). •Install Visual Studio 2017 (15.7 or later) with the ASP.NET and web development workload selected. •Install the latest Blazor Language Services extension from the Visual Studio Marketplace.
  • 13. Get started with Blazor •Create project from Visual Studio •Create Project from command prompt • Project Templates •Blazor (Standalone) •Blazor (ASP.NET Core Hosted) •Blazor (Serverside in ASP.NET Core) •Blazor Library [Using CLI only]
  • 14. Demo 01 - Key Features •A component model for building composable UI •Life-Cycle Events •Data binding & Events •Routing •Layouts •JavaScript interop •Validations and Debugging
  • 15. JavaScript interop A Blazor app can invoke JavaScript functions from .NET and .NET methods from JavaScript code. • Invoke JavaScript functions from .NET methods • Invoke .NET methods from JavaScript functions
  • 16. Demo 02 – Sample Application • Download Application from GitHub • Create A Form to Add/ Edit records • Display Records
  • 17. l
  • 18. Contribute •How to contribute • Provide feedback & Make suggestions • Report Bugs and contribute code • Ask questions and participate in the discussion •Where you can contribute • GitHub Repo • Blazor Community • MSDN Blog
  • 19. Resource • Blazor.net • LEARN BLAZOR • ASP.NET Blog • ASP.Net Blazor GitHub • Blazor community resources • Blazor: a technical introduction by Steve Sanderson • Contribute

Editor's Notes

  • #6: Dot Net Anywhere : Dot Net Anywhere is a interpreted .NET Common Intermediate Language (CIL) runtime. Blazor.net: Blazor is a .NET web framework that runs in any browser. You author Blazor apps using C#/Razor and HTML. Blazor uses only the latest web standards. No plugins or transpilation needed. It runs in the browser on a real .NET runtime (Mono) implemented in WebAssembly that executes normal .NET assemblies. It works in older browsers too by falling back to an asm.js based .NET runtime. http://blog.stevensanderson.com/2017/11/05/blazor-on-mono/ https://blogs.msdn.microsoft.com/webdev/2018/02/06/blazor-experimental-project/
  • #8: This allows us to take advantage of WebAssembly's performance and power and JavaScript's expressiveness and flexibility during development, even if you don't know how to write WebAssembly code. JavaScript is a powerful language but it has its disadvantages. Some are fixed by TypeScript. However, using C# for client-side web development is compelling for many people because of reasons like the following: C# is a very robust and feature-rich language that has proven to be successful for projects and teams of all sizes Existing C# code could be re-used ASP.NET Core is a powerful programming framework for server-side web development. Enabling C# on the client would allow teams to use a common technology stack on server and client. Source: https://developer.mozilla.org/en-US/docs/WebAssembly
  • #9: There are several components that make up Mono: C# Compiler - Mono’s C# compiler is feature complete for C# 1.0, 2.0, 3.0, 4.0, 5.0 and 6.0 (ECMA). A good description of the feature of the various versions is available on Wikipedia. Mono Runtime - The runtime implements the ECMA Common Language Infrastructure (CLI). The runtime provides a Just-in-Time (JIT) compiler, an Ahead-of-Time compiler (AOT), a library loader, the garbage collector, a threading system and interoperability functionality. .NET Framework Class Library - The Mono platform provides a comprehensive set of classes that provide a solid foundation to build applications on. These classes are compatible with Microsoft’s .Net Framework classes. Mono Class Library - Mono also provides many classes that go above and beyond the Base Class Library provided by Microsoft. These provide additional functionality that are useful, especially in building Linux applications. Some examples are classes for Gtk+, Zip files, LDAP, OpenGL, Cairo, POSIX, etc. Source: https://www.mono-project.com/docs/about-mono/
  • #11: Razor has its roots on the server where it is typically used to dynamically generate HTML. In Blazor, Razor is used on the client. To be more specific, the Razor engine runs during compilation to generate C# Code from Razor templates. Unlike former platforms like Silverlight, it does not bring its own rendering engine to paint pixels on the screen. Blazor uses the Browser’s DOM to display data.
  • #12: C# code running in WebAssembly cannot access the DOM directly. It has to go through JavaScript.  The C#-part of Blazor creates a Render Tree which is a tree of UI items. The render tree is passed from WebAssembly to the Rendering in the JavaScript-part of Blazor. It executes the corresponding DOM changes. Whenever the user interacts with the DOM (e.g. mouse click, enter text, etc.), the JavaScript-part of Blazor dispatches an event to C#. The event is processed by the C#-code of the web app. If the DOM changes, a Render Batch with all the UI tree differences (not the entire UI tree) is built in C# and given to a JavaScript Blazor method that applies the DOM changes. Because Blazor is using the regular browser DOM, all usual DOM mechanisms including CSS work keep working. Source: https://learn-blazor.com/getting-started/what-is-blazor/
  • #13: You can get up and running with Blazor using either Visual Studio 2017 preview or VS Code. Regardless of which you choose you must first install the .NET Core 2.1 preview. VS Code Install blazor project template - new -i Microsoft.AspNetCore.Blazor.Templates
  • #14: Blazor Project Type This is the project to select when you are interested in creating a client-side only application. There is no backing API included. Blazor (ASP.NET Core Hosted) This project is for full stack C# development. You get the same client-side project as with the Blazor only template, but with this template you also get an ASP.NET Core WebAPI project as well. ` Once you have selected the project template you want to have a play with, click OK and you should be looking at a new Blazor project ready to go. You can run the project straight away and you should see the basic start app after a few seconds. This project type allows developers to create reusable component libraries that can be shared between projects or packaged up as nuget packages. Currently this can't be added from the menus in Visual Studio, it can only be added using the CLI. In order to create a new Blazor Library project you need to have the latest templates installed.
  • #16: What is a Component Like all modern front end frameworks Blazor has components at its core. Blazor uses a combination of C#, Razor and HTML to create components.  Types of Components Inline Code behind Class only
  • #20: Blazor community resources includes Libraries, Samples, Tooling, Documentation