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

PPTX
.Net Core
PDF
Introduction to ASP.NET Core
PDF
Spring annotation
PPTX
State management in react applications (Statecharts)
PPTX
Spring boot
PPTX
React hooks
PPTX
PDF
Introduction to Spring Framework
.Net Core
Introduction to ASP.NET Core
Spring annotation
State management in react applications (Statecharts)
Spring boot
React hooks
Introduction to Spring Framework

What's hot (20)

PPTX
PPTX
React state
PPTX
Introduction to HTML+CSS+Javascript.pptx
PPTX
Introduction to React JS for beginners
PDF
ReactJS presentation
PDF
React Js Simplified
PDF
Introduction to Redux
PDF
WEB DEVELOPMENT USING REACT JS
PPTX
React JS - A quick introduction tutorial
ODP
An Introduction to Vuejs
PDF
Angular Advanced Routing
PDF
VueJS Introduction
PPT
Vue.js Getting Started
PPTX
Express js
PDF
Dot Net Core
PPTX
Angular 2.0 forms
PPTX
Spring Framework
PDF
React
PDF
React JS - Introduction
PPTX
ReactJS presentation.pptx
React state
Introduction to HTML+CSS+Javascript.pptx
Introduction to React JS for beginners
ReactJS presentation
React Js Simplified
Introduction to Redux
WEB DEVELOPMENT USING REACT JS
React JS - A quick introduction tutorial
An Introduction to Vuejs
Angular Advanced Routing
VueJS Introduction
Vue.js Getting Started
Express js
Dot Net Core
Angular 2.0 forms
Spring Framework
React
React JS - Introduction
ReactJS presentation.pptx
Ad

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

PDF
Blazor web apps
PPTX
Blazor - An Introduction
PPTX
Blazor.pptx
PPTX
A Gentle Introduction to Blazor
PPTX
Full stack web development with c# and web assembly - Blazor.Net
PDF
Blazor - The New Silverlight?
PPTX
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
PPTX
Goodbye JavaScript Hello Blazor
PPTX
Visual studio2019 launchevent_may25_blazor_presentation_net_bc_user_group_by_...
PPTX
Modernizing Web Apps with .NET 6.pptx
PPTX
Modernizing Web Apps with .NET 6.pptx
PDF
Blazor in Action 1st Edition Chris Sainty
PDF
Blazor in Action 1st Edition Chris Sainty
PDF
Learning Blazor (Fourth Early Release) David Pine
PPTX
What Is Blazor? A Complete Guide to Getting Started
PPTX
Blazor Full-Stack
PPTX
.NET Fest 2018. Dino Esposito. ASP.NET Blazor—the C# Angular or the return of...
PPTX
"Hands-on development experience using wasm Blazor", Furdak Vladyslav.pptx
PPTX
Blazor into
PPTX
Blazor and more.pptx
Blazor web apps
Blazor - An Introduction
Blazor.pptx
A Gentle Introduction to Blazor
Full stack web development with c# and web assembly - Blazor.Net
Blazor - The New Silverlight?
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Goodbye JavaScript Hello Blazor
Visual studio2019 launchevent_may25_blazor_presentation_net_bc_user_group_by_...
Modernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptx
Blazor in Action 1st Edition Chris Sainty
Blazor in Action 1st Edition Chris Sainty
Learning Blazor (Fourth Early Release) David Pine
What Is Blazor? A Complete Guide to Getting Started
Blazor Full-Stack
.NET Fest 2018. Dino Esposito. ASP.NET Blazor—the C# Angular or the return of...
"Hands-on development experience using wasm Blazor", Furdak Vladyslav.pptx
Blazor into
Blazor and more.pptx
Ad

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Transforming Manufacturing operations through Intelligent Integrations
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
PDF
cuic standard and advanced reporting.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Chapter 2 Digital Image Fundamentals.pdf
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Empathic Computing: Creating Shared Understanding
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
KodekX | Application Modernization Development
Chapter 3 Spatial Domain Image Processing.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Transforming Manufacturing operations through Intelligent Integrations
Advanced methodologies resolving dimensionality complications for autism neur...
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
cuic standard and advanced reporting.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
GamePlan Trading System Review: Professional Trader's Honest Take
Chapter 2 Digital Image Fundamentals.pdf
Sensors and Actuators in IoT Systems using pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Empathic Computing: Creating Shared Understanding
20250228 LYD VKU AI Blended-Learning.pptx
Big Data Technologies - Introduction.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Reach Out and Touch Someone: Haptics and Empathic Computing

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