SlideShare a Scribd company logo
Inside ASP.NET MVC framework Alexander Beletsky, E-conomic http://beletsky.net @alexbeletsky
ASP.NET MVC is cool! Why?
Hey, it's open source See what happens behind the curtain Improve your knowledge Learn from best Super fun
ASP.NET or ASP.NET MVC  ? Have you heard such question?
ASP.NET is foundation Request processing engine Pushing request thought pipeline Pipeline consists of Modules And ends with Handler
MvcHanlder - heart of ASP.NET MVC Implements IHttpAsyncHandler, IHttpHandler Creates the ControllerFactory Execute the controller
Show me the code
Who is responsible for calling MvcHander?
Here comes Routing Included in framework 3.5 SP1 Implements recomendations by Jakob Nielsen Save us of URL re-writing module Provides decoupling of URL and page
Route = URL + Constraints + IRouteHanlder
Show me the code
ControllerBuilder & ControllerFactory ControllerBuilder creates ControllerFactory ControllerFactory creates Controller
Difference in MVC2  and MVC3 MVC2 ControllerBuilder creates factory "directly" MVC3 ControllerBuilder uses SingleServiceResolver SingleServiceResolver depends on IDependencyResolver
Show me the code
IDependencyResolver Bridge between ASP.NET MVC and IoC container Very simple interface Introduce extensibility for many entities
Show me the code
Controller Execution Get the name of the Action from Route Call ControllerActionInvoker to Invoke action
Filters Authorization filters – Implements the IAuthorizationFilter attribute. Action filters – Implements the IActionFilter attribute. Result filters – Implements the IResultFilter attribute. Exception filters – Implements the IExceptionFilter attribute.
Why use filters? DRY code AOP principles in action Better reuse Clean code MVC3 introduces global filters
Show me the code
Action Results ViewResult - Represents HTML and markup. EmptyResult - Represents no result. RedirectResult - Represents a redirection to a new URL. JsonResult - Represents a JavaScript Object Notation result that can be used in an AJAX application. JavaScriptResult - Represents a JavaScript script. ContentResult - Represents a text result. FileContentResult - Represents a downloadable file (with the binary content). FilePathResult - Represents a downloadable file (with a path). FileStreamResult - Represents a downloadable file (with a file stream).
Action Result rendering Extract view name from Route Find view associated with with Route & Action Result Render the view
THANK YOU! http://www.beletsky.net/search/label/InsideMVC twitter: @alexbeletsky

More Related Content

PPT
Asynchronous Programming in C# - Part 1
ODP
Gatling - Stress test tool
PDF
Asynchronous programming in .net 4.5 with c#
PDF
Day3_Part 2_Apache_JMeter_Config_Elements
PPT
Recapture Disk Space in Agile PLM
PPTX
Flask & Flask-restx
PPTX
Java 8 concurrency abstractions
PPTX
Functional Reactive Endpoints using Spring 5
Asynchronous Programming in C# - Part 1
Gatling - Stress test tool
Asynchronous programming in .net 4.5 with c#
Day3_Part 2_Apache_JMeter_Config_Elements
Recapture Disk Space in Agile PLM
Flask & Flask-restx
Java 8 concurrency abstractions
Functional Reactive Endpoints using Spring 5

What's hot (20)

PDF
Pretenders talk at PyconUK 2012
PPTX
Azure Durable Functions
PPTX
Mule esb - How to use Idempotent Filters in 5 minutes
PPT
Conejo Architecture
PPTX
Creating custom transformer
PPTX
Running SQL from a Groovy Event Handler in Agile PLM
PDF
February'16 SDG - Spring'16 new features
PPTX
Puppet At Twitter - Puppet Camp Silicon Valley
PPTX
Asynchronous Programming in ASP.NET
PPTX
React gsg presentation with ryan jung & elias malik
DOCX
Compensation
PDF
September SDG - Lightning
PPT
Create a custom AutoNumber source
PPTX
inline function
PPTX
From Web Developer to Hardware Developer
PPT
Monitoring Agile PLM with JConsole
PDF
React js t3 - es6
PPTX
Exploring the details of APEX sessions
PDF
Angular 2 observables
Pretenders talk at PyconUK 2012
Azure Durable Functions
Mule esb - How to use Idempotent Filters in 5 minutes
Conejo Architecture
Creating custom transformer
Running SQL from a Groovy Event Handler in Agile PLM
February'16 SDG - Spring'16 new features
Puppet At Twitter - Puppet Camp Silicon Valley
Asynchronous Programming in ASP.NET
React gsg presentation with ryan jung & elias malik
Compensation
September SDG - Lightning
Create a custom AutoNumber source
inline function
From Web Developer to Hardware Developer
Monitoring Agile PLM with JConsole
React js t3 - es6
Exploring the details of APEX sessions
Angular 2 observables
Ad

Viewers also liked (19)

PPTX
Building Mobile Web Applications using ASP.NET MVC
PPTX
Asp.Net MVC overview
PPT
Inside ASP.NET MVC framework
PDF
Indy Tech Fest 2008 - ASP.NET MVC
PPSX
Asp.net mvc
PPT
Introduction To Asp.Net Mvc
PPTX
ASP.NET MVC and Entity Framework 4
PPT
ASP .net MVC
PPT
Introduction to ASP.NET MVC
PPTX
ASP.NET MVC
PPTX
Asp.Net MVC Intro
PPTX
Development In ASP.NET by Tanzim Saqib
PPTX
Introduction to ASP.NET MVC
PPT
Introduction To ASP.NET MVC
PPTX
Walther Aspnet4
PPTX
ASP.NET MVC Reading July 2009
PDF
Composite Modeling with FiberSim
PPTX
3-TIER ARCHITECTURE IN ASP.NET MVC
Building Mobile Web Applications using ASP.NET MVC
Asp.Net MVC overview
Inside ASP.NET MVC framework
Indy Tech Fest 2008 - ASP.NET MVC
Asp.net mvc
Introduction To Asp.Net Mvc
ASP.NET MVC and Entity Framework 4
ASP .net MVC
Introduction to ASP.NET MVC
ASP.NET MVC
Asp.Net MVC Intro
Development In ASP.NET by Tanzim Saqib
Introduction to ASP.NET MVC
Introduction To ASP.NET MVC
Walther Aspnet4
ASP.NET MVC Reading July 2009
Composite Modeling with FiberSim
3-TIER ARCHITECTURE IN ASP.NET MVC
Ad

Similar to Inside asp.net mvc framework (20)

PDF
Mvc interview questions – deep dive jinal desai
PPTX
Asp.net mvc
PPTX
ASP.NET MVC controllers
PDF
Asp.Net MVC Framework Design Pattern
PDF
ASP.NET MVC 2.0
PPTX
Asp.net mvc presentation by Nitin Sawant
PPT
CTTDNUG ASP.NET MVC
PPT
ASP.net MVC CodeCamp Presentation
PPS
Introduction To Mvc
PPT
ASP.NET MVC introduction
PPTX
Developing ASP.NET Applications Using the Model View Controller Pattern
PPTX
ASP.MVC Training
PPTX
MVC Training Part 1
PPTX
Hanselman lipton asp_connections_ams304_mvc
PPTX
PPTX
Chapter4.pptx
PPTX
Asp.Net Mvc
PDF
ASP.NET MVC_Routing_Authentication_Aurhorization.pdf
PPTX
Introduction to ASP.Net MVC
PPTX
How to get full power from WebApi
Mvc interview questions – deep dive jinal desai
Asp.net mvc
ASP.NET MVC controllers
Asp.Net MVC Framework Design Pattern
ASP.NET MVC 2.0
Asp.net mvc presentation by Nitin Sawant
CTTDNUG ASP.NET MVC
ASP.net MVC CodeCamp Presentation
Introduction To Mvc
ASP.NET MVC introduction
Developing ASP.NET Applications Using the Model View Controller Pattern
ASP.MVC Training
MVC Training Part 1
Hanselman lipton asp_connections_ams304_mvc
Chapter4.pptx
Asp.Net Mvc
ASP.NET MVC_Routing_Authentication_Aurhorization.pdf
Introduction to ASP.Net MVC
How to get full power from WebApi

More from Ciklum Ukraine (20)

PDF
"How keep normal blood pressure using TDD" By Roman Loparev
PDF
"Through the three circles of the it hell" by Roman Liashenko
PDF
Alex Pazhyn: Google_Material_Design
PPTX
Introduction to amazon web services for developers
PPTX
Your 1st Apple watch Application
PDF
Test Driven Development
PPTX
Back to the future: ux trends 2015
PPTX
Developing high load systems using C++
PPTX
Collection view layout
PPTX
Introduction to auto layout
PDF
Groovy on Android
PDF
Unit Testing: Special Cases
PPTX
Material design
PPTX
Kanban development
PPTX
Mobile sketching
PDF
More UX in our life
PDF
Model-View-Controller: Tips&Tricks
PDF
Unit Tesing in iOS
PDF
Future of Outsourcing report published in The Times featuring Ciklum's CEO To...
PDF
Михаил Попчук "Cкрытые резервы команд или 1+1=3"
"How keep normal blood pressure using TDD" By Roman Loparev
"Through the three circles of the it hell" by Roman Liashenko
Alex Pazhyn: Google_Material_Design
Introduction to amazon web services for developers
Your 1st Apple watch Application
Test Driven Development
Back to the future: ux trends 2015
Developing high load systems using C++
Collection view layout
Introduction to auto layout
Groovy on Android
Unit Testing: Special Cases
Material design
Kanban development
Mobile sketching
More UX in our life
Model-View-Controller: Tips&Tricks
Unit Tesing in iOS
Future of Outsourcing report published in The Times featuring Ciklum's CEO To...
Михаил Попчук "Cкрытые резервы команд или 1+1=3"

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Approach and Philosophy of On baking technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
KodekX | Application Modernization Development
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
MYSQL Presentation for SQL database connectivity
PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Building Integrated photovoltaic BIPV_UPV.pdf
Spectral efficient network and resource selection model in 5G networks
Encapsulation_ Review paper, used for researhc scholars
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Approach and Philosophy of On baking technology
Network Security Unit 5.pdf for BCA BBA.
20250228 LYD VKU AI Blended-Learning.pptx
KodekX | Application Modernization Development
NewMind AI Monthly Chronicles - July 2025
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)
CIFDAQ's Market Insight: SEC Turns Pro Crypto
MYSQL Presentation for SQL database connectivity
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
The Rise and Fall of 3GPP – Time for a Sabbatical?

Inside asp.net mvc framework

  • 1. Inside ASP.NET MVC framework Alexander Beletsky, E-conomic http://beletsky.net @alexbeletsky
  • 2. ASP.NET MVC is cool! Why?
  • 3. Hey, it's open source See what happens behind the curtain Improve your knowledge Learn from best Super fun
  • 4. ASP.NET or ASP.NET MVC  ? Have you heard such question?
  • 5. ASP.NET is foundation Request processing engine Pushing request thought pipeline Pipeline consists of Modules And ends with Handler
  • 6. MvcHanlder - heart of ASP.NET MVC Implements IHttpAsyncHandler, IHttpHandler Creates the ControllerFactory Execute the controller
  • 7. Show me the code
  • 8. Who is responsible for calling MvcHander?
  • 9. Here comes Routing Included in framework 3.5 SP1 Implements recomendations by Jakob Nielsen Save us of URL re-writing module Provides decoupling of URL and page
  • 10. Route = URL + Constraints + IRouteHanlder
  • 11. Show me the code
  • 12. ControllerBuilder & ControllerFactory ControllerBuilder creates ControllerFactory ControllerFactory creates Controller
  • 13. Difference in MVC2  and MVC3 MVC2 ControllerBuilder creates factory "directly" MVC3 ControllerBuilder uses SingleServiceResolver SingleServiceResolver depends on IDependencyResolver
  • 14. Show me the code
  • 15. IDependencyResolver Bridge between ASP.NET MVC and IoC container Very simple interface Introduce extensibility for many entities
  • 16. Show me the code
  • 17. Controller Execution Get the name of the Action from Route Call ControllerActionInvoker to Invoke action
  • 18. Filters Authorization filters – Implements the IAuthorizationFilter attribute. Action filters – Implements the IActionFilter attribute. Result filters – Implements the IResultFilter attribute. Exception filters – Implements the IExceptionFilter attribute.
  • 19. Why use filters? DRY code AOP principles in action Better reuse Clean code MVC3 introduces global filters
  • 20. Show me the code
  • 21. Action Results ViewResult - Represents HTML and markup. EmptyResult - Represents no result. RedirectResult - Represents a redirection to a new URL. JsonResult - Represents a JavaScript Object Notation result that can be used in an AJAX application. JavaScriptResult - Represents a JavaScript script. ContentResult - Represents a text result. FileContentResult - Represents a downloadable file (with the binary content). FilePathResult - Represents a downloadable file (with a path). FileStreamResult - Represents a downloadable file (with a file stream).
  • 22. Action Result rendering Extract view name from Route Find view associated with with Route & Action Result Render the view