SlideShare a Scribd company logo
Browser + Razor = Blazor
SPA with C# only
Robert Szachnowski
Agenda
2
1. History of client-side web development.
2. What is blazor? Framework’s features.
3. How blazor works – architecture.
4. C# vs AngularJS.
• AngularJS elements.
• Blazor’scomponent power.
• Components.
• Layouts.
5. Look in the code.
6. Materials.
History of client-side
web development
3
1 2 3
What is that Blazor?
4
Blazoris a single-page web app framework built on .NET that runs in the browser
with WebAssembly.Running .NET in the browser is made possibleby a relatively new
standardized web technology called WebAssembly.WebAssemblyis a "portable,
size- and load-time-efficient format suitable for compilation to the web." Code
compiled to WebAssemblycan run in any browser at native speeds.To run .NET
binaries in a web browser, we use a .NET runtime (specificallyMono) that has been
compiled to WebAssembly.
5
Blazor
Razor has its roots on the serverwhere 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.
6How is it compiled?
.cshtml example
Blazor features
7
• A component model
for building
composableUI
• Routing
• Layouts
• Forms and validation
• Dependency injection
• JavaScript interop
• Publishing and app
size trimming
• Livereloadingin the
browser during
development
• Server-siderendering
• Full .NET debuggingboth
in browsers and in the IDE
• Rich IntelliSenseand
tooling
• Abilityto run on older
(non-WebAssembly)
browsers via asm.js
Existing and planned
8
What dependencies are in the
browser?
9
BROWSER
Lorem
ipsum
Blazor &
Javascript
dependencies
Mono.js &
mono.wasm
runtime
Application
DLL’s in
IL code
Blazor workflow
10
11Example
C# vs AngularJS
Comparing Blazor features to Javascript
framework’s
13AngularJS elements
Comparing to list of many different
elements in the AngularJS framework,
creators of Blazor want to simplifythe
whole workflow, adjust to the .net world
and don’t make it the same as this
framework.
They want to make it better.
Source: https://www.slideshare.net/ThoughtWorks/angular-js-introduction-by-tania-gonzales
14Component power
Components
Components in Blazorare equivalent of controllers in the
AngularJS. Main difference is that to the component is
attached template which is „UI” for code.
„Components are flexibleand lightweight, and they can be
nested, reused,and shared between projects.”
We can cast our component in other templates as well. It
similar to directive in angularJS. The main difference in this
case is that components can be called only with specified
HTML tag and not like in the JS framework – as attributes of
HTML tag.
Component C# code can be nested in the template but can
be taken to the code-behind class as well. If we do this then
our class can be inherited in more than one template (if we
15
Layouts
Technically, a layout is just another Blazorcomponent.
A layout is defined in a Razor template or in C# code
and can contain data binding, dependencyinjection, and
other ordinary features of components. Two additional
aspects turn a component into a layout:
16
The layout component
must inherit from
BlazorLayoutComponen
t.
BlazorLayoutComponen
t defines a Body
property that contains
the content to be
@Body syntax located in
the template can allow
layout to be base layout for
components or layouts
(nesting).
Look in the code...
17
Source: https://github.com/rafek1241/blazor-first-approach
Thank you for reading
18
Materials that were used in this presentation:
- Blazor.net
- Learn-blazor.com
- Github.com/aspnet/Blazor
Resources:
- https://blazor.net/community.html

More Related Content

What's hot (20)

PDF
TypeScript Best Practices
felixbillon
 
PPTX
Dart presentation
Lucas Leal
 
PPT
jQuery
Mostafa Bayomi
 
PPTX
JAVASCRIPT PPT [Autosaved].pptx
AchieversIT
 
PPTX
Angular tutorial
Rohit Gupta
 
PPTX
Java script
Sadeek Mohammed
 
PPTX
Angular 9
Raja Vishnu
 
PPT
JavaScript Tutorial
Bui Kiet
 
PPTX
Stability Patterns for Microservices
pflueras
 
PPT
Spring ppt
Mumbai Academisc
 
PDF
Javascript Basic
Kang-min Liu
 
PDF
XSS Magic tricks
GarethHeyes
 
PPT
Groovy presentation
Manav Prasad
 
PPTX
JavaScript
Vidyut Singhania
 
PPTX
Html forms
nobel mujuji
 
PPTX
Introducing type script
Remo Jansen
 
PPTX
jQuery
Dileep Mishra
 
PDF
Cassandra Introduction & Features
DataStax Academy
 
PPTX
HBase and HDFS: Understanding FileSystem Usage in HBase
enissoz
 
PPTX
Node.js Express
Eyal Vardi
 
TypeScript Best Practices
felixbillon
 
Dart presentation
Lucas Leal
 
JAVASCRIPT PPT [Autosaved].pptx
AchieversIT
 
Angular tutorial
Rohit Gupta
 
Java script
Sadeek Mohammed
 
Angular 9
Raja Vishnu
 
JavaScript Tutorial
Bui Kiet
 
Stability Patterns for Microservices
pflueras
 
Spring ppt
Mumbai Academisc
 
Javascript Basic
Kang-min Liu
 
XSS Magic tricks
GarethHeyes
 
Groovy presentation
Manav Prasad
 
JavaScript
Vidyut Singhania
 
Html forms
nobel mujuji
 
Introducing type script
Remo Jansen
 
Cassandra Introduction & Features
DataStax Academy
 
HBase and HDFS: Understanding FileSystem Usage in HBase
enissoz
 
Node.js Express
Eyal Vardi
 

Similar to Blazor - the successor of angular/react/vue? (20)

PDF
Blazor web apps
Rajesh Kolla
 
PPTX
Blazor - An Introduction
JamieTaylor112
 
PPTX
Blazor.pptx
ssuserb1d1a2
 
PPTX
Blazor
Sandun Perera
 
PPTX
A Gentle Introduction to Blazor
Jose Javier Columbie
 
PPTX
Full stack web development with c# and web assembly - Blazor.Net
Ruwantha Ratnayake
 
PDF
Blazor - The New Silverlight?
Christian Nagel
 
PPTX
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Fwdays
 
PPTX
Goodbye JavaScript Hello Blazor
Ed Charbeneau
 
PPTX
Visual studio2019 launchevent_may25_blazor_presentation_net_bc_user_group_by_...
ashishpd
 
PPTX
Modernizing Web Apps with .NET 6.pptx
Ed Charbeneau
 
PPTX
Modernizing Web Apps with .NET 6.pptx
Ed Charbeneau
 
PDF
Blazor in Action 1st Edition Chris Sainty
idelmomunure
 
PDF
Blazor in Action 1st Edition Chris Sainty
khakontovo
 
PDF
Learning Blazor (Fourth Early Release) David Pine
zapatruca
 
PPTX
What Is Blazor? A Complete Guide to Getting Started
simonedaniels3
 
PPTX
Blazor Full-Stack
Ed Charbeneau
 
PPTX
.NET Fest 2018. Dino Esposito. ASP.NET Blazor—the C# Angular or the return of...
NETFest
 
PPTX
"Hands-on development experience using wasm Blazor", Furdak Vladyslav.pptx
Fwdays
 
PPTX
Blazor into
hari krish
 
Blazor web apps
Rajesh Kolla
 
Blazor - An Introduction
JamieTaylor112
 
Blazor.pptx
ssuserb1d1a2
 
A Gentle Introduction to Blazor
Jose Javier Columbie
 
Full stack web development with c# and web assembly - Blazor.Net
Ruwantha Ratnayake
 
Blazor - The New Silverlight?
Christian Nagel
 
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Fwdays
 
Goodbye JavaScript Hello Blazor
Ed Charbeneau
 
Visual studio2019 launchevent_may25_blazor_presentation_net_bc_user_group_by_...
ashishpd
 
Modernizing Web Apps with .NET 6.pptx
Ed Charbeneau
 
Modernizing Web Apps with .NET 6.pptx
Ed Charbeneau
 
Blazor in Action 1st Edition Chris Sainty
idelmomunure
 
Blazor in Action 1st Edition Chris Sainty
khakontovo
 
Learning Blazor (Fourth Early Release) David Pine
zapatruca
 
What Is Blazor? A Complete Guide to Getting Started
simonedaniels3
 
Blazor Full-Stack
Ed Charbeneau
 
.NET Fest 2018. Dino Esposito. ASP.NET Blazor—the C# Angular or the return of...
NETFest
 
"Hands-on development experience using wasm Blazor", Furdak Vladyslav.pptx
Fwdays
 
Blazor into
hari krish
 
Ad

Recently uploaded (20)

PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Ad

Blazor - the successor of angular/react/vue?

  • 1. Browser + Razor = Blazor SPA with C# only Robert Szachnowski
  • 2. Agenda 2 1. History of client-side web development. 2. What is blazor? Framework’s features. 3. How blazor works – architecture. 4. C# vs AngularJS. • AngularJS elements. • Blazor’scomponent power. • Components. • Layouts. 5. Look in the code. 6. Materials.
  • 3. History of client-side web development 3 1 2 3
  • 4. What is that Blazor? 4 Blazoris a single-page web app framework built on .NET that runs in the browser with WebAssembly.Running .NET in the browser is made possibleby a relatively new standardized web technology called WebAssembly.WebAssemblyis a "portable, size- and load-time-efficient format suitable for compilation to the web." Code compiled to WebAssemblycan run in any browser at native speeds.To run .NET binaries in a web browser, we use a .NET runtime (specificallyMono) that has been compiled to WebAssembly.
  • 5. 5 Blazor Razor has its roots on the serverwhere 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.
  • 6. 6How is it compiled? .cshtml example
  • 7. Blazor features 7 • A component model for building composableUI • Routing • Layouts • Forms and validation • Dependency injection • JavaScript interop • Publishing and app size trimming • Livereloadingin the browser during development • Server-siderendering • Full .NET debuggingboth in browsers and in the IDE • Rich IntelliSenseand tooling • Abilityto run on older (non-WebAssembly) browsers via asm.js Existing and planned
  • 8. 8
  • 9. What dependencies are in the browser? 9 BROWSER Lorem ipsum Blazor & Javascript dependencies Mono.js & mono.wasm runtime Application DLL’s in IL code
  • 12. C# vs AngularJS Comparing Blazor features to Javascript framework’s
  • 13. 13AngularJS elements Comparing to list of many different elements in the AngularJS framework, creators of Blazor want to simplifythe whole workflow, adjust to the .net world and don’t make it the same as this framework. They want to make it better. Source: https://www.slideshare.net/ThoughtWorks/angular-js-introduction-by-tania-gonzales
  • 15. Components Components in Blazorare equivalent of controllers in the AngularJS. Main difference is that to the component is attached template which is „UI” for code. „Components are flexibleand lightweight, and they can be nested, reused,and shared between projects.” We can cast our component in other templates as well. It similar to directive in angularJS. The main difference in this case is that components can be called only with specified HTML tag and not like in the JS framework – as attributes of HTML tag. Component C# code can be nested in the template but can be taken to the code-behind class as well. If we do this then our class can be inherited in more than one template (if we 15
  • 16. Layouts Technically, a layout is just another Blazorcomponent. A layout is defined in a Razor template or in C# code and can contain data binding, dependencyinjection, and other ordinary features of components. Two additional aspects turn a component into a layout: 16 The layout component must inherit from BlazorLayoutComponen t. BlazorLayoutComponen t defines a Body property that contains the content to be @Body syntax located in the template can allow layout to be base layout for components or layouts (nesting).
  • 17. Look in the code... 17 Source: https://github.com/rafek1241/blazor-first-approach
  • 18. Thank you for reading 18 Materials that were used in this presentation: - Blazor.net - Learn-blazor.com - Github.com/aspnet/Blazor Resources: - https://blazor.net/community.html