SlideShare a Scribd company logo
1 of 13
Introduction to Asp.Net MVC
Session -2
Agenda
• Asp.Net MVC Application Folders
• Configuration Files
• Asp.net MVC Pipeline
• Routing
• Action Method : Return Types
Application Folders
• App_Data
– It is used to store database file (SQL DB)
• App_Start
– It contains all the configuration files for some
application level settings.
– All these settings are registered in
Application_Start method of Global.asax.cs file.
• Content
– It is used to store Style sheets (CSS) / Themes.
• Controller
– It contains all the controller classes.
– We should use suffix “Controller” with every
controller name
• Images
– It is to store all the images for our application.
Application Folders
• Models
– It is used to store model classes for our application
– It could be DTO, Entities (Ado.net / Hibernate), BO
• Scripts
– It contains all the javaScript libraries / files.
– By Default we get some Jquery libraries in this folder.
• Views
– It contains all the Html markup files (Webform or Razor) of our application
– It contains one folder for each controller
– Share folder : It is used to store which are common between
controllers(Master Page)
Configuration Files
• These are available in App_Start Folder
– BundleConfig
– FilterConfig
– RouteConfig
– WebApiConfig
• These are core configuration file that are
applicable for entire MVC application &
registered in global.asax.cs :
Bundle Config
• It is used to create & register bundles for
JavaScript & CSS files.
Filter Config
• It is used to register Global Asp.Net MVC filters. These are
applied to every action & controllers. By default it registers
HandleErrorAttribute filter.
Route Config
• It is used to register route patterns for our MVC Application.
By default it registers a route with name as “Default”.
WebApiConfig
• It does the following two things
– Registration of Web Api routes.
– Configuration settings for Web Api
Asp.Net MVC Pipeline
2. Routing Engine
Route Table
Find Matching Route
1. HTTP Request
Not Found Found
3. HTTP 404
Not Found
3. Controller 4. Model
5. View Engine
Found
(aspx/cshtml)
6. View
HTTP
Response
Routing
• Routing is specified in RouteConfig File
– We must have at least one route definition.
– In the above template we have a route names as Default.
– The curly braces items are RouteParameters.
– It is used for :
• Controller Matching
• Action Matching
• Action Parameter Matching
Action Method : Return Types
• Action Result
– Its an abstract class. There are several sub types derived from
this abstract class :
• ViewResult
– It renders a specified view.
• PartialViewResult
– It renders a specified partial view.
• JSONResult
– -It serializes a object into JSON format.
• JavaScriptResult
– Returns a Javascript code to execute on client side
• ContentResult
– It writes content to response. It does not require any view to show content.
• FileContentResult
– It returns a file to the client
Action Result : Example

More Related Content

What's hot

Codeigniter Training Part3
Codeigniter Training Part3Codeigniter Training Part3
Codeigniter Training Part3Weerayut Hongsa
 
Alfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankAlfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankPiergiorgio Lucidi
 
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...apidays
 
Implementing portlets using Web Scripts
Implementing portlets using Web ScriptsImplementing portlets using Web Scripts
Implementing portlets using Web ScriptsPiergiorgio Lucidi
 
Asp introduction
Asp introductionAsp introduction
Asp introductionSireesh K
 
Skillwise - Advanced web application development
Skillwise - Advanced web application developmentSkillwise - Advanced web application development
Skillwise - Advanced web application developmentSkillwise Group
 
ESB integration for node.js
ESB integration for node.js ESB integration for node.js
ESB integration for node.js SÎNICĂ Alboaie
 
Ruby on Rails industry trends
Ruby on Rails industry trendsRuby on Rails industry trends
Ruby on Rails industry trendsSumanth krishna
 
Data science at scale with Kafka and Flink (Razorpay)
Data science at scale with Kafka and Flink (Razorpay)Data science at scale with Kafka and Flink (Razorpay)
Data science at scale with Kafka and Flink (Razorpay)KafkaZone
 
1. deploying an asp.net web application
1. deploying an asp.net web application1. deploying an asp.net web application
1. deploying an asp.net web applicationPramod Rathore
 
Entity Framework Core 1.x/2.x Advanced
Entity Framework Core 1.x/2.x AdvancedEntity Framework Core 1.x/2.x Advanced
Entity Framework Core 1.x/2.x AdvancedChristian Nagel
 
How to double .net code value
How to double .net code valueHow to double .net code value
How to double .net code valuejavOnet
 
Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021sumitahuja94
 
Generic repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity FrameworkGeneric repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity FrameworkMd. Mahedee Hasan
 

What's hot (20)

Codeigniter Training Part3
Codeigniter Training Part3Codeigniter Training Part3
Codeigniter Training Part3
 
Alfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankAlfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European Bank
 
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
 
Flux and React.js
Flux and React.jsFlux and React.js
Flux and React.js
 
Implementing portlets using Web Scripts
Implementing portlets using Web ScriptsImplementing portlets using Web Scripts
Implementing portlets using Web Scripts
 
Asp introduction
Asp introductionAsp introduction
Asp introduction
 
Flux architecture
Flux architectureFlux architecture
Flux architecture
 
ASP.NET MVC overview
ASP.NET MVC overviewASP.NET MVC overview
ASP.NET MVC overview
 
Flux
FluxFlux
Flux
 
Skillwise - Advanced web application development
Skillwise - Advanced web application developmentSkillwise - Advanced web application development
Skillwise - Advanced web application development
 
ESB integration for node.js
ESB integration for node.js ESB integration for node.js
ESB integration for node.js
 
Ruby on Rails industry trends
Ruby on Rails industry trendsRuby on Rails industry trends
Ruby on Rails industry trends
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Data science at scale with Kafka and Flink (Razorpay)
Data science at scale with Kafka and Flink (Razorpay)Data science at scale with Kafka and Flink (Razorpay)
Data science at scale with Kafka and Flink (Razorpay)
 
1. deploying an asp.net web application
1. deploying an asp.net web application1. deploying an asp.net web application
1. deploying an asp.net web application
 
Entity Framework Core 1.x/2.x Advanced
Entity Framework Core 1.x/2.x AdvancedEntity Framework Core 1.x/2.x Advanced
Entity Framework Core 1.x/2.x Advanced
 
How to double .net code value
How to double .net code valueHow to double .net code value
How to double .net code value
 
Web forms Overview Presentation
Web forms Overview PresentationWeb forms Overview Presentation
Web forms Overview Presentation
 
Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021
 
Generic repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity FrameworkGeneric repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity Framework
 

Viewers also liked

Legislacion Educativa
Legislacion Educativa Legislacion Educativa
Legislacion Educativa Enmanuel Tineo
 
Apresentação1
Apresentação1Apresentação1
Apresentação1robsonscs
 
Московские сезоны. Возможности
Московские сезоны. ВозможностиМосковские сезоны. Возможности
Московские сезоны. ВозможностиMoscowSeasons
 
Sri Lanka Rainwater Harvesting
Sri Lanka Rainwater HarvestingSri Lanka Rainwater Harvesting
Sri Lanka Rainwater HarvestingK9T
 
Presentation Plan Made Simple
Presentation Plan Made SimplePresentation Plan Made Simple
Presentation Plan Made Simplestoryboardguru
 
Ex. Kultur
Ex. KulturEx. Kultur
Ex. KulturCatUlv
 
Scientific Committee on Problems of the Environment
Scientific Committee on Problems of the EnvironmentScientific Committee on Problems of the Environment
Scientific Committee on Problems of the EnvironmentMahesh Yekula
 
Agricultural Breakfast Autumn 2016
Agricultural Breakfast Autumn 2016Agricultural Breakfast Autumn 2016
Agricultural Breakfast Autumn 2016Jamie Giles
 
Mecanica automotriz-basica
Mecanica automotriz-basicaMecanica automotriz-basica
Mecanica automotriz-basicajonathan vega
 
Tecnicas de Investigacion
Tecnicas de InvestigacionTecnicas de Investigacion
Tecnicas de InvestigacionTensor
 
Introduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC FrameworksIntroduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC FrameworksGerald Krishnan
 
Inviter des connaissances dans un groupe sur LinkedIn
Inviter des connaissances dans un groupe sur LinkedInInviter des connaissances dans un groupe sur LinkedIn
Inviter des connaissances dans un groupe sur LinkedInNathalie Agbagla
 
UNDERSTANDING INDUSTRIAL PROCESSES, MEASUREMENT & CONTROLS
UNDERSTANDING INDUSTRIAL PROCESSES, MEASUREMENT & CONTROLSUNDERSTANDING INDUSTRIAL PROCESSES, MEASUREMENT & CONTROLS
UNDERSTANDING INDUSTRIAL PROCESSES, MEASUREMENT & CONTROLSA. V. Rajabahadur
 

Viewers also liked (15)

Legislacion Educativa
Legislacion Educativa Legislacion Educativa
Legislacion Educativa
 
Apresentação1
Apresentação1Apresentação1
Apresentação1
 
Московские сезоны. Возможности
Московские сезоны. ВозможностиМосковские сезоны. Возможности
Московские сезоны. Возможности
 
Sri Lanka Rainwater Harvesting
Sri Lanka Rainwater HarvestingSri Lanka Rainwater Harvesting
Sri Lanka Rainwater Harvesting
 
My prezi
My preziMy prezi
My prezi
 
Presentation Plan Made Simple
Presentation Plan Made SimplePresentation Plan Made Simple
Presentation Plan Made Simple
 
Ex. Kultur
Ex. KulturEx. Kultur
Ex. Kultur
 
Mi album de fotos
Mi album de fotosMi album de fotos
Mi album de fotos
 
Scientific Committee on Problems of the Environment
Scientific Committee on Problems of the EnvironmentScientific Committee on Problems of the Environment
Scientific Committee on Problems of the Environment
 
Agricultural Breakfast Autumn 2016
Agricultural Breakfast Autumn 2016Agricultural Breakfast Autumn 2016
Agricultural Breakfast Autumn 2016
 
Mecanica automotriz-basica
Mecanica automotriz-basicaMecanica automotriz-basica
Mecanica automotriz-basica
 
Tecnicas de Investigacion
Tecnicas de InvestigacionTecnicas de Investigacion
Tecnicas de Investigacion
 
Introduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC FrameworksIntroduction to Using PHP & MVC Frameworks
Introduction to Using PHP & MVC Frameworks
 
Inviter des connaissances dans un groupe sur LinkedIn
Inviter des connaissances dans un groupe sur LinkedInInviter des connaissances dans un groupe sur LinkedIn
Inviter des connaissances dans un groupe sur LinkedIn
 
UNDERSTANDING INDUSTRIAL PROCESSES, MEASUREMENT & CONTROLS
UNDERSTANDING INDUSTRIAL PROCESSES, MEASUREMENT & CONTROLSUNDERSTANDING INDUSTRIAL PROCESSES, MEASUREMENT & CONTROLS
UNDERSTANDING INDUSTRIAL PROCESSES, MEASUREMENT & CONTROLS
 

Similar to Introduction to Asp.Net MVC Architecture and Fundamentals

Asp 1-mvc introduction
Asp 1-mvc introductionAsp 1-mvc introduction
Asp 1-mvc introductionFajar Baskoro
 
Using MVC with Kentico 8
Using MVC with Kentico 8Using MVC with Kentico 8
Using MVC with Kentico 8Thomas Robbins
 
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Sam Brannen
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handsonPrashant Kumar
 
Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Sam Brannen
 
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam BrannenSpring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam BrannenJAX London
 
(ATS6-DEV03) Building an Enterprise Web Solution with AEP
(ATS6-DEV03) Building an Enterprise Web Solution with AEP(ATS6-DEV03) Building an Enterprise Web Solution with AEP
(ATS6-DEV03) Building an Enterprise Web Solution with AEPBIOVIA
 
MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_HourDilip Patel
 
MVCL pattern, web flow, code flow, request and response in OpenCart
MVCL pattern, web flow, code flow, request and response in OpenCartMVCL pattern, web flow, code flow, request and response in OpenCart
MVCL pattern, web flow, code flow, request and response in OpenCartSelf
 
ASP.NET MVC_Routing_Authentication_Aurhorization.pdf
ASP.NET MVC_Routing_Authentication_Aurhorization.pdfASP.NET MVC_Routing_Authentication_Aurhorization.pdf
ASP.NET MVC_Routing_Authentication_Aurhorization.pdfsetit72024
 
Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012Dimitri de Putte
 
ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!Fioriela Bego
 
ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!Commit Software Sh.p.k.
 
Apikit from command line
Apikit from command lineApikit from command line
Apikit from command linefedefortin
 
.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6aminmesbahi
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service BIOVIA
 

Similar to Introduction to Asp.Net MVC Architecture and Fundamentals (20)

Asp 1-mvc introduction
Asp 1-mvc introductionAsp 1-mvc introduction
Asp 1-mvc introduction
 
Using MVC with Kentico 8
Using MVC with Kentico 8Using MVC with Kentico 8
Using MVC with Kentico 8
 
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handson
 
Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011
 
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam BrannenSpring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
 
(ATS6-DEV03) Building an Enterprise Web Solution with AEP
(ATS6-DEV03) Building an Enterprise Web Solution with AEP(ATS6-DEV03) Building an Enterprise Web Solution with AEP
(ATS6-DEV03) Building an Enterprise Web Solution with AEP
 
Introduction to CakePHP
Introduction to CakePHPIntroduction to CakePHP
Introduction to CakePHP
 
Introduction to CakePHP
Introduction to CakePHPIntroduction to CakePHP
Introduction to CakePHP
 
MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_Hour
 
MVCL pattern, web flow, code flow, request and response in OpenCart
MVCL pattern, web flow, code flow, request and response in OpenCartMVCL pattern, web flow, code flow, request and response in OpenCart
MVCL pattern, web flow, code flow, request and response in OpenCart
 
ASP.NET MVC_Routing_Authentication_Aurhorization.pdf
ASP.NET MVC_Routing_Authentication_Aurhorization.pdfASP.NET MVC_Routing_Authentication_Aurhorization.pdf
ASP.NET MVC_Routing_Authentication_Aurhorization.pdf
 
Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012
 
12 Introduction to Rails
12 Introduction to Rails12 Introduction to Rails
12 Introduction to Rails
 
ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!
 
ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
 
Apikit from command line
Apikit from command lineApikit from command line
Apikit from command line
 
.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Introduction to Asp.Net MVC Architecture and Fundamentals

  • 1. Introduction to Asp.Net MVC Session -2
  • 2. Agenda • Asp.Net MVC Application Folders • Configuration Files • Asp.net MVC Pipeline • Routing • Action Method : Return Types
  • 3. Application Folders • App_Data – It is used to store database file (SQL DB) • App_Start – It contains all the configuration files for some application level settings. – All these settings are registered in Application_Start method of Global.asax.cs file. • Content – It is used to store Style sheets (CSS) / Themes. • Controller – It contains all the controller classes. – We should use suffix “Controller” with every controller name • Images – It is to store all the images for our application.
  • 4. Application Folders • Models – It is used to store model classes for our application – It could be DTO, Entities (Ado.net / Hibernate), BO • Scripts – It contains all the javaScript libraries / files. – By Default we get some Jquery libraries in this folder. • Views – It contains all the Html markup files (Webform or Razor) of our application – It contains one folder for each controller – Share folder : It is used to store which are common between controllers(Master Page)
  • 5. Configuration Files • These are available in App_Start Folder – BundleConfig – FilterConfig – RouteConfig – WebApiConfig • These are core configuration file that are applicable for entire MVC application & registered in global.asax.cs :
  • 6. Bundle Config • It is used to create & register bundles for JavaScript & CSS files.
  • 7. Filter Config • It is used to register Global Asp.Net MVC filters. These are applied to every action & controllers. By default it registers HandleErrorAttribute filter.
  • 8. Route Config • It is used to register route patterns for our MVC Application. By default it registers a route with name as “Default”.
  • 9. WebApiConfig • It does the following two things – Registration of Web Api routes. – Configuration settings for Web Api
  • 10. Asp.Net MVC Pipeline 2. Routing Engine Route Table Find Matching Route 1. HTTP Request Not Found Found 3. HTTP 404 Not Found 3. Controller 4. Model 5. View Engine Found (aspx/cshtml) 6. View HTTP Response
  • 11. Routing • Routing is specified in RouteConfig File – We must have at least one route definition. – In the above template we have a route names as Default. – The curly braces items are RouteParameters. – It is used for : • Controller Matching • Action Matching • Action Parameter Matching
  • 12. Action Method : Return Types • Action Result – Its an abstract class. There are several sub types derived from this abstract class : • ViewResult – It renders a specified view. • PartialViewResult – It renders a specified partial view. • JSONResult – -It serializes a object into JSON format. • JavaScriptResult – Returns a Javascript code to execute on client side • ContentResult – It writes content to response. It does not require any view to show content. • FileContentResult – It returns a file to the client
  • 13. Action Result : Example