Building reliable applications with React, C#, and Azure

Maurice De Beijer [MVP]
Maurice De Beijer [MVP]The Problem Solver at ABL - The Problem Solver
© ABL - The Problem Solver 1
Topics
 JavaScript versusTypeScript
 Hosting
 Test-driven development
 API types and updates
 Runtime errors
© ABL - The Problem Solver 2
Opinions
Ahead 
© ABL - The Problem Solver 3
Swiss
Cheese
Model
© ABL - The Problem Solver 4
 Maurice de Beijer
 The Problem Solver
 Microsoft MVP
 Freelance lead/developer/instructor
 Twitter: @mauricedb
 Web: http://www.TheProblemSolver.nl
 E-mail: maurice.de.beijer@gmail.com
5
© ABL - The Problem Solver
The React
Newsletter
© ABL - The Problem Solver 6
JavaScript versusTypeScript
© ABL - The Problem Solver 7
TypeScript
© ABL - The Problem Solver 8
Language
features
 Type Unions
 Tuples
 OptionalChaining
 Nullish Coalescing operator
© ABL - The Problem Solver 9
JS Doc  Annotate your JavaScript with JS Doc types
 If you made the mistake of not starting withTypeScript 
© ABL - The Problem Solver 10
MappedTypes
 type RT = Readonly<T>
 type PT = Partial<T>
 type MyProps = React.ComponentProps<typeof MyComponent>
 type Returns = ReturnType<typeof someFunction>;
 type Args = Parameters<typeof someFunction>
© ABL - The Problem Solver 11
ES Modules  Named imports instead of import default
 Better with tooling and discoverability
© ABL - The Problem Solver 12
React and
import default
© ABL - The Problem Solver 13
ESBuild
© ABL - The Problem Solver 14
Hosting the front-end
During development
© ABL - The Problem Solver 15
Vite
© ABL - The Problem Solver 16
Hosting the front-end
In production
© ABL - The Problem Solver 17
Azure Blob
Storage
© ABL - The Problem Solver 18
AzureCDN
© ABL - The Problem Solver 19
Routing Rules
© ABL - The Problem Solver 20
Deploy
From
GitHub
© ABL - The Problem Solver 21
Test-Driven Development
© ABL - The Problem Solver 22
The traditional
testing
pyramid
Manual
End to End
Integration testing
Unit testing
Both windows
are fine
Source
A sturdy latch
Source
A better
testing
pyramid for
the web
Manual
End to End
Integration testing
Unit testing
Cypress
© ABL - The Problem Solver 27
Testing
Front & Back
End
© ABL - The Problem Solver 28
Intercepting
AJAX
Requests
© ABL - The Problem Solver 29
APITypes andUpdates
© ABL - The Problem Solver 30
OpenAPI
© ABL - The Problem Solver 31
Swashbuckle
for the
Azure Function
© ABL - The Problem Solver 32
NSwag
Generates
TypeScript
Interfaces
© ABL - The Problem Solver 33
APIVersion
© ABL - The Problem Solver 34
Required
ValueTypes
© ABL - The Problem Solver 35
ValidateAPI
 Validate all data that crosses an external boundary
 User input
 Data from an API
© ABL - The Problem Solver 36
Type Mapping
© ABL - The Problem Solver 37
Long living
clients
 Some users never close their browser
 The same old version of the SPA can remain active
 Even when a newer version is available on the server
 Send the client version the server with each AJAX request
© ABL - The Problem Solver 38
Checking the
version
© ABL - The Problem Solver 39
AJAX requests
 The public internet is unreliable
 Some requests will fail for random reasons
 Use a retry policy to handle network errors
© ABL - The Problem Solver 40
Retry Policy
© ABL - The Problem Solver 41
Runtime errors
© ABL - The Problem Solver 42
Runtime errors
 Runtime errors need to be tracked
 There is no code without bugs 
 Features like LocalStorage will be disabled for some users
 Services like Azure Application Insights works well
 Tracks unhandled exceptions
 Add an Error Boundary and track component errors
© ABL - The Problem Solver 43
Runtime errors
© ABL - The Problem Solver 44
Application
Insights
© ABL - The Problem Solver 45
Application
Insights
© ABL - The Problem Solver 46
Conclusion
 TypeScript is a must have
 For any serious development
 Use BLOB storage & CDN
 Easy, fast and cheap hosting
 Test-driven development prevents bugs
 Use an End to End tool like Cypress
 API types and updates
 Automate the client types
 Always validate the incoming data
 Runtime errors will happen
 Make sure you track them
© ABL - The Problem Solver 47
Maurice de Beijer
@mauricedb
maurice.de.beijer
@gmail.com
© ABL - The Problem Solver 48
1 of 48

Recommended

Building large and scalable mission critical applications with React by
Building large and scalable mission critical applications with ReactBuilding large and scalable mission critical applications with React
Building large and scalable mission critical applications with ReactMaurice De Beijer [MVP]
196 views57 slides
I am hooked on React by
I am hooked on ReactI am hooked on React
I am hooked on ReactMaurice De Beijer [MVP]
642 views37 slides
Building Reliable Applications Using React, .NET & Azure by
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureMaurice De Beijer [MVP]
152 views56 slides
Jenkins as the Test Reporting Framework by
Jenkins as the Test Reporting FrameworkJenkins as the Test Reporting Framework
Jenkins as the Test Reporting FrameworkNitin Sharma
1.9K views24 slides
Testing lightning components feb 15th 2018 by
Testing lightning components feb 15th 2018Testing lightning components feb 15th 2018
Testing lightning components feb 15th 2018Richard Clark
312 views43 slides
Story Testing Approach for Enterprise Applications using Selenium Framework by
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkOleksiy Rezchykov
3.8K views32 slides

More Related Content

What's hot

Adventures with Microservices by
Adventures with MicroservicesAdventures with Microservices
Adventures with MicroservicesAnand Agrawal
5K views43 slides
Unit Testing Asp.net and Asp.net MVC by
Unit Testing Asp.net and Asp.net MVCUnit Testing Asp.net and Asp.net MVC
Unit Testing Asp.net and Asp.net MVCGil Zilberfeld
817 views6 slides
Alexey Kupriyanenko "Release Early, Often, Stable" by
Alexey Kupriyanenko "Release Early, Often, Stable"Alexey Kupriyanenko "Release Early, Often, Stable"
Alexey Kupriyanenko "Release Early, Often, Stable"Fwdays
260 views64 slides
How to Build Single Page HTML5 Apps that Scale by
How to Build Single Page HTML5 Apps that ScaleHow to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that ScalePhil Leggetter
1.5K views65 slides
140 releases per month by
140 releases per month140 releases per month
140 releases per monthManuel Vacelet
678 views12 slides
Tests for Every Branch Using CircleCI and Sauce Labs to Continuously Test CS ... by
Tests for Every Branch Using CircleCI and Sauce Labs to Continuously Test CS ...Tests for Every Branch Using CircleCI and Sauce Labs to Continuously Test CS ...
Tests for Every Branch Using CircleCI and Sauce Labs to Continuously Test CS ...Sauce Labs
645 views97 slides

What's hot(20)

Adventures with Microservices by Anand Agrawal
Adventures with MicroservicesAdventures with Microservices
Adventures with Microservices
Anand Agrawal5K views
Unit Testing Asp.net and Asp.net MVC by Gil Zilberfeld
Unit Testing Asp.net and Asp.net MVCUnit Testing Asp.net and Asp.net MVC
Unit Testing Asp.net and Asp.net MVC
Gil Zilberfeld817 views
Alexey Kupriyanenko "Release Early, Often, Stable" by Fwdays
Alexey Kupriyanenko "Release Early, Often, Stable"Alexey Kupriyanenko "Release Early, Often, Stable"
Alexey Kupriyanenko "Release Early, Often, Stable"
Fwdays260 views
How to Build Single Page HTML5 Apps that Scale by Phil Leggetter
How to Build Single Page HTML5 Apps that ScaleHow to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that Scale
Phil Leggetter1.5K views
Tests for Every Branch Using CircleCI and Sauce Labs to Continuously Test CS ... by Sauce Labs
Tests for Every Branch Using CircleCI and Sauce Labs to Continuously Test CS ...Tests for Every Branch Using CircleCI and Sauce Labs to Continuously Test CS ...
Tests for Every Branch Using CircleCI and Sauce Labs to Continuously Test CS ...
Sauce Labs645 views
Canadian Cloud Summit 2022 - SharePoint Framework Tests Introduction by Laurent Sittler
Canadian Cloud Summit 2022 - SharePoint Framework Tests IntroductionCanadian Cloud Summit 2022 - SharePoint Framework Tests Introduction
Canadian Cloud Summit 2022 - SharePoint Framework Tests Introduction
Laurent Sittler131 views
Rspec and Capybara Intro Tutorial at RailsConf 2013 by Brian Sam-Bodden
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
Brian Sam-Bodden29.7K views
Test & Dynamics CRM - extremeCRM Berlin 2012 by Wael Hamze
Test & Dynamics CRM - extremeCRM Berlin 2012Test & Dynamics CRM - extremeCRM Berlin 2012
Test & Dynamics CRM - extremeCRM Berlin 2012
Wael Hamze337 views
How to write better tests with Test Driven Development by Alex Hoffman
How to write better tests with Test Driven DevelopmentHow to write better tests with Test Driven Development
How to write better tests with Test Driven Development
Alex Hoffman20 views
Using REST with VSTS and TFS by Jeff Bramwell
Using REST with VSTS and TFSUsing REST with VSTS and TFS
Using REST with VSTS and TFS
Jeff Bramwell1.4K views
Building Extensions in VSTS and TFS by Jeff Bramwell
Building Extensions in VSTS and TFSBuilding Extensions in VSTS and TFS
Building Extensions in VSTS and TFS
Jeff Bramwell1.1K views
Continuous Delivery for Dynamics 365/CRM by Wael Hamze
Continuous Delivery for Dynamics 365/CRMContinuous Delivery for Dynamics 365/CRM
Continuous Delivery for Dynamics 365/CRM
Wael Hamze1.7K views
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014) by Alvaro Sanchez-Mariscal
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
TRAX technical highlights by ESUG
TRAX technical highlightsTRAX technical highlights
TRAX technical highlights
ESUG171 views
Testing CRM from a 360 View - extremeCRM Rome 2013 by Wael Hamze
Testing CRM from a 360 View - extremeCRM Rome 2013Testing CRM from a 360 View - extremeCRM Rome 2013
Testing CRM from a 360 View - extremeCRM Rome 2013
Wael Hamze280 views

Similar to Building reliable applications with React, C#, and Azure

Practice TypeScript Techniques Building React Server Components App by
Practice TypeScript Techniques Building React Server Components AppPractice TypeScript Techniques Building React Server Components App
Practice TypeScript Techniques Building React Server Components AppMaurice De Beijer [MVP]
4 views79 slides
Building high-performance web applications with Preact by
Building high-performance web applications with PreactBuilding high-performance web applications with Preact
Building high-performance web applications with PreactMaurice De Beijer [MVP]
443 views38 slides
Why I am hooked on the future of React by
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of ReactMaurice De Beijer [MVP]
358 views36 slides
Continuous Deployment of your Application @SpringOne by
Continuous Deployment of your Application @SpringOneContinuous Deployment of your Application @SpringOne
Continuous Deployment of your Application @SpringOneciberkleid
491 views172 slides
Continuous Deployment of your Application @JUGtoberfest by
Continuous Deployment of your Application @JUGtoberfestContinuous Deployment of your Application @JUGtoberfest
Continuous Deployment of your Application @JUGtoberfestMarcin Grzejszczak
1.5K views93 slides
Continuous Deployment To The Cloud @DevoxxPL 2017 by
Continuous Deployment To The Cloud @DevoxxPL 2017 Continuous Deployment To The Cloud @DevoxxPL 2017
Continuous Deployment To The Cloud @DevoxxPL 2017 Marcin Grzejszczak
1.3K views93 slides

Similar to Building reliable applications with React, C#, and Azure(20)

Continuous Deployment of your Application @SpringOne by ciberkleid
Continuous Deployment of your Application @SpringOneContinuous Deployment of your Application @SpringOne
Continuous Deployment of your Application @SpringOne
ciberkleid491 views
Continuous Deployment of your Application @JUGtoberfest by Marcin Grzejszczak
Continuous Deployment of your Application @JUGtoberfestContinuous Deployment of your Application @JUGtoberfest
Continuous Deployment of your Application @JUGtoberfest
Marcin Grzejszczak1.5K views
Continuous Deployment To The Cloud @DevoxxPL 2017 by Marcin Grzejszczak
Continuous Deployment To The Cloud @DevoxxPL 2017 Continuous Deployment To The Cloud @DevoxxPL 2017
Continuous Deployment To The Cloud @DevoxxPL 2017
Marcin Grzejszczak1.3K views
Continuous Deployment to the cloud by VMware Tanzu
Continuous Deployment to the cloudContinuous Deployment to the cloud
Continuous Deployment to the cloud
VMware Tanzu341 views
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress by Maurice De Beijer [MVP]
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressSurati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Increasing velocity via serless semantics by Kfir Bloch
Increasing velocity via serless semanticsIncreasing velocity via serless semantics
Increasing velocity via serless semantics
Kfir Bloch239 views
Improving the Quality of Existing Software by Steven Smith
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
Steven Smith1.7K views
Legacy On Premise Apps Got You Down? No Problem - DevOps for All by Muly Gottlieb
Legacy On Premise Apps Got You Down? No Problem - DevOps for AllLegacy On Premise Apps Got You Down? No Problem - DevOps for All
Legacy On Premise Apps Got You Down? No Problem - DevOps for All
Muly Gottlieb626 views
Continuous Deployment of your Application @jSession#5 by Marcin Grzejszczak
Continuous Deployment of your Application @jSession#5Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5
Marcin Grzejszczak1.2K views
Modernizing Web Apps with .NET 6.pptx by Ed Charbeneau
Modernizing Web Apps with .NET 6.pptxModernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptx
Ed Charbeneau65 views
Modernizing Web Apps with .NET 6.pptx by Ed Charbeneau
Modernizing Web Apps with .NET 6.pptxModernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptx
Ed Charbeneau106 views
Improving the Quality of Existing Software - DevIntersection April 2016 by Steven Smith
Improving the Quality of Existing Software - DevIntersection April 2016Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016
Steven Smith1.3K views
Metrics-Driven Devops: Delivering High Quality Software Faster! by Dynatrace
Metrics-Driven Devops: Delivering High Quality Software Faster! Metrics-Driven Devops: Delivering High Quality Software Faster!
Metrics-Driven Devops: Delivering High Quality Software Faster!
Dynatrace824 views
Get Mapped: Using Value Stream Mapping to Create a DevOps Adoption Roadmap by IBM UrbanCode Products
Get Mapped: Using Value Stream Mapping to Create a DevOps Adoption RoadmapGet Mapped: Using Value Stream Mapping to Create a DevOps Adoption Roadmap
Get Mapped: Using Value Stream Mapping to Create a DevOps Adoption Roadmap

More from Maurice De Beijer [MVP]

A foolproof Way to Estimate a Software Project by
A foolproof Way to Estimate a Software ProjectA foolproof Way to Estimate a Software Project
A foolproof Way to Estimate a Software ProjectMaurice De Beijer [MVP]
36 views40 slides
Build reliable Svelte applications using Cypress by
Build reliable Svelte applications using CypressBuild reliable Svelte applications using Cypress
Build reliable Svelte applications using CypressMaurice De Beijer [MVP]
252 views26 slides
Building Reliable Applications Using React, .NET & Azure by
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureMaurice De Beijer [MVP]
248 views63 slides
Concurrent Rendering Adventures in React 18 by
Concurrent Rendering Adventures in React 18Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Maurice De Beijer [MVP]
260 views72 slides
Why I am hooked on the future of React by
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of ReactMaurice De Beijer [MVP]
175 views44 slides
Building reliable web applications using Cypress by
Building reliable web applications using CypressBuilding reliable web applications using Cypress
Building reliable web applications using CypressMaurice De Beijer [MVP]
194 views52 slides

More from Maurice De Beijer [MVP](20)

Recently uploaded

Igniting Next Level Productivity with AI-Infused Data Integration Workflows by
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
225 views86 slides
Data-centric AI and the convergence of data and model engineering: opportunit... by
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...Paolo Missier
34 views40 slides
Special_edition_innovator_2023.pdf by
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdfWillDavies22
16 views6 slides
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV by
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTVSplunk
88 views20 slides
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...NUS-ISS
28 views70 slides

Recently uploaded(20)

Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software225 views
Data-centric AI and the convergence of data and model engineering: opportunit... by Paolo Missier
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...
Paolo Missier34 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2216 views
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV by Splunk
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV
Splunk88 views
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by NUS-ISS
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
NUS-ISS28 views
Combining Orchestration and Choreography for a Clean Architecture by ThomasHeinrichs1
Combining Orchestration and Choreography for a Clean ArchitectureCombining Orchestration and Choreography for a Clean Architecture
Combining Orchestration and Choreography for a Clean Architecture
ThomasHeinrichs169 views
Transcript: The Details of Description Techniques tips and tangents on altern... by BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada130 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab15 views
RADIUS-Omnichannel Interaction System by RADIUS
RADIUS-Omnichannel Interaction SystemRADIUS-Omnichannel Interaction System
RADIUS-Omnichannel Interaction System
RADIUS15 views
DALI Basics Course 2023 by Ivory Egg
DALI Basics Course  2023DALI Basics Course  2023
DALI Basics Course 2023
Ivory Egg14 views
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price15 views
handbook for web 3 adoption.pdf by Liveplex
handbook for web 3 adoption.pdfhandbook for web 3 adoption.pdf
handbook for web 3 adoption.pdf
Liveplex19 views
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum... by NUS-ISS
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
NUS-ISS34 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada121 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb12 views

Building reliable applications with React, C#, and Azure