WebTechnology With .NET Unit-1
WebTechnology With .NET Unit-1
with .NET
Introduction
Dharmendra Bhatti 1
Web
Dharmendra Bhatti 2
History
Dharmendra Bhatti 3
History
l2016 ASP.NET Core
l2017 ASP.NET Core 2.0
l2019 ASP.NET Core 3.0 (ONLY supports
.NET Core NOT .NET Framework)
l2020 ASP.NET Core 5.0
l2021 ASP.NET Core 6.0
l2022 ASP.NET Core 7.0
Dharmendra Bhatti 4
.NET Framework
Dharmendra Bhatti 5
Dharmendra Bhatti 6
.NET Core
Dharmendra Bhatti 7
Everything is NuGet
Dharmendra Bhatti 8
Dharmendra Bhatti 9
Dharmendra Bhatti 10
.NET
Dharmendra Bhatti 11
.NET
Dharmendra Bhatti 12
Dharmendra Bhatti 13
ASP.NET Core
lOpen Source
lCross Platform
lDependency Injection
lCloud Friendly
lFaster
Dharmendra Bhatti 14
Dharmendra Bhatti 17
Dharmendra Bhatti 18
Server rendered UI
Dharmendra Bhatti 19
Server rendered UI
lBenefits:
¡The client requirements are minimal because
the server does the work of logic and page
generation:
lGreat for low-end devices and low-bandwidth
connections.
lAllows for a broad range of browser versions at the
client.
lQuick initial page load times.
lMinimal to no JavaScript to pull to the client.
Dharmendra Bhatti 20
Server rendered UI
lBenefits:
¡Flexibility of access to protected server
resources:
lDatabase access.
lAccess to secrets, such as values for API calls to
Azure storage.
Dharmendra Bhatti 21
Server rendered UI
lDrawbacks:
¡The cost of compute and memory use are
concentrated on the server, rather than each
client.
Dharmendra Bhatti 22
Client rendered UI
Dharmendra Bhatti 23
Client rendered UI
lBenefits:
¡Allows for rich interactivity that is nearly instant,
without requiring a round trip to the server. UI
event handling and logic run locally on the
user's device with minimal latency.
Dharmendra Bhatti 24
Client rendered UI
lBenefits:
¡Can be designed to run in a disconnected
mode. Updates to the client-side model are
eventually synchronized back to the server
once a connection is re-established.
¡Reduced server load and cost, the work is
offloaded to the client. Many client rendered
apps can also be hosted as static websites.
¡Takes advantage of the capabilities of the
user’s device.
Dharmendra Bhatti 25
Client rendered UI
lDrawbacks:
¡Code for the logic has to be downloaded and
executed on the client, adding to the initial load
time.
Dharmendra Bhatti 26
lServer Rendered
¡ASP.NET Core MVC
¡ASP.NET Core Razor Pages
¡Blazor Server
l
Client Rendered
¡Blazor WebAssembly
Dharmendra Bhatti 27
Dharmendra Bhatti 28
Dharmendra Bhatti 29
Dharmendra Bhatti 30
Blazor Server
Blazor WebAssembly
Dharmendra Bhatti 33
Blazor WebAssembly
Dharmendra Bhatti 35
Dharmendra Bhatti 36
lOr
Dharmendra Bhatti 37
Dharmendra Bhatti 38
Dharmendra Bhatti 39
Dharmendra Bhatti 40
Dharmendra Bhatti 41
Dharmendra Bhatti 42
lOr
Dharmendra Bhatti 44
Understanding Endpoints
Understanding Endpoints
Understanding Endpoints
Dharmendra Bhatti 47
Understanding Endpoints
Dharmendra Bhatti 48
Understanding Routes
Dharmendra Bhatti 49
Dharmendra Bhatti 50
Dharmendra Bhatti 51
Dharmendra Bhatti 52
Dharmendra Bhatti 53
lRendering a view
Dharmendra Bhatti 54
Dharmendra Bhatti 55
lMyView.cshtml file:
¡@model string
¡@{
¡ Layout = null;
¡}
¡…
Dharmendra Bhatti 56
Dharmendra Bhatti 57
PartyInvites
Dharmendra Bhatti 58
PartyInvites
Dharmendra Bhatti 59
PartyInvites
Dharmendra Bhatti 60
PartyInvites
Dharmendra Bhatti 61
Dharmendra Bhatti 62
PartyInvites
Dharmendra Bhatti 63
Dharmendra Bhatti 64
Dharmendra Bhatti 65
Dharmendra Bhatti 66
Dharmendra Bhatti 67
Dharmendra Bhatti 68
Dharmendra Bhatti 69
Dharmendra Bhatti 70
Dharmendra Bhatti 71
Dharmendra Bhatti 72
Dharmendra Bhatti 73
Dharmendra Bhatti 74
Dharmendra Bhatti 75
Dharmendra Bhatti 76
Dharmendra Bhatti 77
Dharmendra Bhatti 78
Dharmendra Bhatti 79
Dharmendra Bhatti 80
Storing Responses
Dharmendra Bhatti 81
Dharmendra Bhatti 82
Dharmendra Bhatti 83
Dharmendra Bhatti 84
l...
l<div>Click <a asp-
action="ListResponses">here</a> to see
who is coming.</div>
l...
Dharmendra Bhatti 85
Dharmendra Bhatti 86
Dharmendra Bhatti 87
Dharmendra Bhatti 88
Dharmendra Bhatti 89
Dharmendra Bhatti 90
Adding Validation
Dharmendra Bhatti 91
Adding Validation
Dharmendra Bhatti 92
Adding Validation
Dharmendra Bhatti 93
Validation Successful?
Dharmendra Bhatti 94
Dharmendra Bhatti 95
Dharmendra Bhatti 96
Dharmendra Bhatti 97
Dharmendra Bhatti 98
Dharmendra Bhatti 99
lProblem:
¡overall appearance of the application
is poor
lSolution:
¡Client-side library Bootstrap
Questions ???