SlideShare a Scribd company logo
Building Modern Web Applications
with ASP.NET 5
Brij Bhushan Mishra | @code_wala
About Me
Brij Bhushan Mishra
- Microsoft MVP - ASP.NET/IIS (4 Times)
- Architect/Consultant
- Blogger/Author/Speaker
- http://codewala.net
- @code_wala
- brij.mishra@outlook.com
3
ASP.NET 5???
4
Agenda
• Introduction
• Middleware
• Dependency Injection
• Configuration
• View Component
• Lots of Demos
• Conclusion
5
ASP.NET 5
10
Hello ASP.NET 5
Demo
15
Where is my HTTP Pipeline?
HTTP Pipeline
HTTPModule 1
HTTPModule 2
HTTPModule 3
HTTPModule n
HTTP Handler
Request Response
.
.
.
1
• Application_BeginRequest
2
• Application_AuthenticateRequest
3
• Application_AuthorizeRequest
7
• Application_PreRequestHandlerExecute
8
•Handler executes the request
9
•Application_PostRequestHandlerExecute
10
• Application_ReleaseRequestCache
11
• Application_UpdateRequestCache
12
• Application_EndRequest
1
• Application_BeginRequest
2
• Application_AuthenticateRequest
3
• Application_AuthorizeRequest
Middleware
Pass through components that form a pipeline between
a server and application to inspect, route, or modify
request and response messages for a specific purpose.
It’s same as a HTTP Module
Middleware
Processes the HTTPContext items
HTTPContext
_next
_next(httpcontext)
_next(httpcontext)
Middleware Chaining
Middleware1 Middleware2 Middleware3 Middleware4
Request
Response
25
Let’s add some middlewares
35
Demo
Dependency Injection
How?
• Startup class has one more method to register the
dependencies.
• These can be injected via property or constructor in
any component.
• ConfigureServices
– Instance
– Transient
– Scoped
– Singleton
Time to inject dependencies
Demo
45
Demo
Where are Config files
Where are configuration files
Earlier
• *.config files at different levels
• System.Configuration namespace to play with config
files
Now
• These are not supported
• Lightweight that works on Cloud
• Different configuration in different environment
What we get
• Light-weight
• Should work same everywhere, cloud optimized
• Have different configuration instance for different
sub system like Identity, MVC, Razor
• Able to load configuration from diff sources
• Instantiated and Initialized in application itself
• Supports
– Json, xml,ini, environment variables, command line
Add entry in Config
Demo
55
Demo
View Component
• A simple replacement for child actions
• Can be used instead Partial Views as well
• Easy separation of concerns and testable
• Provide the power of asynchrony
• Contains two parts
– A class that inherits from ViewComponent
– A razor view which calls VC method
- http://codewala.net
- @code_wala
- brij.mishra@outlook.com

More Related Content

PPTX
Building rest services using aspnetwebapi
PPTX
10 tips to make your ASP.NET Apps Faster
PPTX
Getting Started with ASP.NET 5
PPTX
ASP.NET MVC 4
PPTX
ASP.NET MVC 4 Overview
PDF
ITT Flisol 2013
PPTX
A Gentle Introduction to Blazor
PPTX
Improving Perceived Page Performance with ASP.NET Web API and AJAX
Building rest services using aspnetwebapi
10 tips to make your ASP.NET Apps Faster
Getting Started with ASP.NET 5
ASP.NET MVC 4
ASP.NET MVC 4 Overview
ITT Flisol 2013
A Gentle Introduction to Blazor
Improving Perceived Page Performance with ASP.NET Web API and AJAX

What's hot (20)

PPTX
Host, deploy & scale Blazor Server Apps
PPTX
ASP.NET Brief History
KEY
SGCE 2012 Lightning Talk-Single Page Interface
PDF
TDD a REST API With Node.js and MongoDB
PPTX
Building solutions with the SharePoint Framework - introduction
PPTX
Web Application Frameworks (WAF)
PPTX
Lap Around ASP.NET MVC 5
PDF
Flask introduction
PPTX
Building solutions with the SharePoint Framework - deep-dive
PPTX
Azure Serverless Conf
PPTX
Angular4 kickstart
PPT
Real World Rails Deployment
PDF
Introduction to ASP.NET MVC
PPTX
MOKA .Net Study Week 02
PDF
Using Chat Automation - ChatOps
PPTX
ASP.NET MVC - Latest & Greatest So Far
PPTX
Introduction to asp.net
PDF
Getting Started with WordPress JSON REST API
PPTX
Evolution / History of ASP.NET
PPTX
Javascript & Jquery
Host, deploy & scale Blazor Server Apps
ASP.NET Brief History
SGCE 2012 Lightning Talk-Single Page Interface
TDD a REST API With Node.js and MongoDB
Building solutions with the SharePoint Framework - introduction
Web Application Frameworks (WAF)
Lap Around ASP.NET MVC 5
Flask introduction
Building solutions with the SharePoint Framework - deep-dive
Azure Serverless Conf
Angular4 kickstart
Real World Rails Deployment
Introduction to ASP.NET MVC
MOKA .Net Study Week 02
Using Chat Automation - ChatOps
ASP.NET MVC - Latest & Greatest So Far
Introduction to asp.net
Getting Started with WordPress JSON REST API
Evolution / History of ASP.NET
Javascript & Jquery
Ad

Similar to Building Modern Web Applications with ASP.NET5 (6)

PPTX
Asp.net 5 cloud
PPTX
ASP.NET 5
PPTX
Asp.net 5 the new kid on the block
PPTX
Microsoft ASP.NET 5 - The new kid on the block
PPTX
Understanding ASP.NET Under The Cover - Miguel A. Castro
PPTX
ASP.NET Core Demos Part 2
Asp.net 5 cloud
ASP.NET 5
Asp.net 5 the new kid on the block
Microsoft ASP.NET 5 - The new kid on the block
Understanding ASP.NET Under The Cover - Miguel A. Castro
ASP.NET Core Demos Part 2
Ad

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Cloud computing and distributed systems.
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Electronic commerce courselecture one. Pdf
PDF
Transforming Manufacturing operations through Intelligent Integrations
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
PDF
KodekX | Application Modernization Development
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Advanced IT Governance
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Sensors and Actuators in IoT Systems using pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Per capita expenditure prediction using model stacking based on satellite ima...
MYSQL Presentation for SQL database connectivity
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Cloud computing and distributed systems.
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Dropbox Q2 2025 Financial Results & Investor Presentation
Electronic commerce courselecture one. Pdf
Transforming Manufacturing operations through Intelligent Integrations
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
Spectral efficient network and resource selection model in 5G networks
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Advanced methodologies resolving dimensionality complications for autism neur...
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
KodekX | Application Modernization Development
GamePlan Trading System Review: Professional Trader's Honest Take
Advanced IT Governance
20250228 LYD VKU AI Blended-Learning.pptx
Sensors and Actuators in IoT Systems using pdf
“AI and Expert System Decision Support & Business Intelligence Systems”

Building Modern Web Applications with ASP.NET5

  • 1. Building Modern Web Applications with ASP.NET 5 Brij Bhushan Mishra | @code_wala
  • 2. About Me Brij Bhushan Mishra - Microsoft MVP - ASP.NET/IIS (4 Times) - Architect/Consultant - Blogger/Author/Speaker - http://codewala.net - @code_wala - [email protected]
  • 3. 3
  • 5. Agenda • Introduction • Middleware • Dependency Injection • Configuration • View Component • Lots of Demos • Conclusion 5
  • 8. Where is my HTTP Pipeline?
  • 9. HTTP Pipeline HTTPModule 1 HTTPModule 2 HTTPModule 3 HTTPModule n HTTP Handler Request Response . . . 1 • Application_BeginRequest 2 • Application_AuthenticateRequest 3 • Application_AuthorizeRequest 7 • Application_PreRequestHandlerExecute 8 •Handler executes the request 9 •Application_PostRequestHandlerExecute 10 • Application_ReleaseRequestCache 11 • Application_UpdateRequestCache 12 • Application_EndRequest 1 • Application_BeginRequest 2 • Application_AuthenticateRequest 3 • Application_AuthorizeRequest
  • 10. Middleware Pass through components that form a pipeline between a server and application to inspect, route, or modify request and response messages for a specific purpose. It’s same as a HTTP Module
  • 11. Middleware Processes the HTTPContext items HTTPContext _next _next(httpcontext) _next(httpcontext)
  • 12. Middleware Chaining Middleware1 Middleware2 Middleware3 Middleware4 Request Response 25
  • 13. Let’s add some middlewares 35 Demo
  • 15. How? • Startup class has one more method to register the dependencies. • These can be injected via property or constructor in any component. • ConfigureServices – Instance – Transient – Scoped – Singleton
  • 16. Time to inject dependencies Demo 45 Demo
  • 18. Where are configuration files Earlier • *.config files at different levels • System.Configuration namespace to play with config files Now • These are not supported • Lightweight that works on Cloud • Different configuration in different environment
  • 19. What we get • Light-weight • Should work same everywhere, cloud optimized • Have different configuration instance for different sub system like Identity, MVC, Razor • Able to load configuration from diff sources • Instantiated and Initialized in application itself • Supports – Json, xml,ini, environment variables, command line
  • 20. Add entry in Config Demo 55 Demo
  • 21. View Component • A simple replacement for child actions • Can be used instead Partial Views as well • Easy separation of concerns and testable • Provide the power of asynchrony • Contains two parts – A class that inherits from ViewComponent – A razor view which calls VC method

Editor's Notes

  • #11: Event based model Fully composable