You are on page 1of 46

Modern Web Apps with

ASP.NET Core
Erick Kurniawan
erick@actual-training.com
• Education
• M.Kom, Gadjah Mada University
• Research Fellow, HKUST (Hongkong University Science
And Technology)
• Research Fellow, Hongkong University Science & Technology
• Research Fellow, Gonzaga University, Spokane, WA, USA

• Works
• IT Consultant & Trainer @Actual Training
• Koordinator Pendidikan & Pelatihan Asosiasi Cloud
Computing Indonesia

• Awards
• Microsoft MVP (Most Valuable Professional) 2009 - 2019
• Nokia Developer Champion

• Certification
• Microsoft Certified Technology Specialist
• Microsoft Certified Professional Developer
• Microsoft Certified Trainer
Books
Actual Training
• Training
• Consulting
• Custom Development
• IT Professional Service
Evolution
T
EN
RR .NET Framework
CU

INTEGRATED PIPELINE ASP.NET

Web Web
MVC API
Forms

AD HOC
system.web
OWIN
IIS
RE
TU .NET Framework
FU

ASP.NET

MVC
OWIN

INTEGRATION
WEB SERVER
Changes
• Tight coupling between ASP.NET and IIS
• Presented as a big win only a few years ago

• Platform dependence
• Windows only

• System.web is legacy code


• Devised back in 1997
Migration?
Challenges Opportunities
 MVC only • X-platform
 C# only • Improved API
 New API • Same MVC paradigm
 New hosting model
 No IIS-centrism
 New .NET FX

YOU DECIDE.
ASP.NET CORE has a nice programming
interface and an interesting set of new
programming features.
Migration Facts
• Find out who moved the cheese
• ASP.NET CORE has a high cost of setup
• Costs tend to zero over time

• Find out why they moved the cheese


• Some good reasons
• Some "other" reasons
Good Reasons
• New runtime environment
• Unification of ASP.NET and WebAPI pipelines
• Old system.web dropped
• Memory footprint

• All web app services decoupled to interfaces


• Authentication
• Static files management
• Exception handling and logging
Microsoft’s Motivation
• Taking more people to the cloud
• Loyal customers moved already to Azure or are
likely to do it
• What about other perspective customers?
• Oh yes, they’re using Mac computers and Linux …
There’s not much left that
can be added to ASP.NET

• Battle-tested, well-known and stable


• Room for small improvements
– Razor
– DI
– Azure integration
– Pipeline customization
.
NET Standard
1.0, 1.1, 1.2, 1.3, 1.4, 1.5,
1.6
https://...

JS
Blazor
• Build client-side web UI with .NET instead of JavaScript
• Write reusable web UI components with C# and Razor
• Share .NET code with both the client and the server
• Call into JavaScript libraries & browser APIs as needed

C#
How Blazor WebAssembly works

https://...

Razor Components
.NET
DOM
WebAssembly
Blazor on client or server
Blazor WebAssembly Blazor Server

https://... https...

.NET Core
Razor Components
DOM
.NET SignalR DOM
WebAssembly Razor Components
.NET

May 2020 .NET Core 3.0


Blazor on client or server
Blazor WebAssembly Blazor Server
Pro: Pro:
- True SPA, full interactivity - Smaller download size, faster load time
- Utilize client resources - Running on fully featured .NET runtime
- Supports offline, static sites, - Code never leaves the server
PWA scenarios - Simplified architecture

Con: Con:
- Larger download size - Latency
- Requires WebAssembly - No offline support
- Still in preview - Consumes more server resources
May 2020 .NET Core 3.0
Get started with Blazor
• Go to https://blazor.net
• Install .NET Core 3.0
• Install the Blazor WebAssembly template
• (Windows) Install Visual Studio 2019 16.3
• (Mac/Linux) Install Visual Studio Code with the C#
extension
Blazor .NET
Build your own pizza store UI with Blazor

https://aka.ms/blazorworkshop
“Telerik UI for Blazor components have been built from the ground-up
to ensure you experience shorter development cycles, quick iterations
and cut time to market”
https://www.telerik.com/blazor-ui

“DevExpress UI for Blazor ships with 12 UI components (including a Data


Grid, Pivot Grid, Charts and Scheduler) so you can design rich user
experiences for both Blazor server-side and Blazor client-side
platforms.”
https://www.devexpress.com/blazor

“The Syncfusion ASP.NET Core Blazor Components library is the only


suite that you will ever need to build an application, containing over 60
high-performance, lightweight, modular, and responsive UI controls in a
single package.”
https://www.syncfusion.com/blazor-components
Radzen – Blazor WYSIWYG designer & UI components
The “Awesome Blazor” community
• https://aka.ms/awesomeblazor
• Free open-source components & JS interop libraries
• Lots of fun sample Blazor apps
• Articles, videos, blogs, and other learning materials
• Chat with the Blazor community on Gitter:
https://gitter.im/aspnet/blazor
• Thank you, Simon and Chris!
Summary
• Blazor Server now available with .NET Core 3.0
• Build full-stack web apps with C# and .NET
• Rich component model and UI framework
• Integrates with existing ASP.NET Core apps
• Blazor WebAssembly coming in May 2020

You might also like