SlideShare a Scribd company logo
ASP.NET MVCASP.NET MVC
[M[Modelodel VViewiew CController (MVC)ontroller (MVC)
applications by using theapplications by using the
ASP.NET frameworkASP.NET framework]
Taranjeet Singh
www.ptlsolution.co
m
What is ASP.NET MVC?
Saying simply, ASP.NET MVC is a new
framework from Microsoft that sites over
standard ASP.NET engine.
ASP.NET
ASP.NET MVC
ASP.NET MVC Features
What new does ASP.NET MVC bring in
terms of web architecture?
1. Clear separation of logic: Model, View, Controller
2. Test-Driven Development
3. Full control over HTML and JavaScript
4. Friendly URLs
Model + View + Controller = MVC
ASP.NET MVC provides an alternative to
the ASP.NET “Web Forms” pattern for
creating MVC-based Web applications.
Model
ControllerView
Model objects implement the
logic for the application's
data domain. Often, model
objects retrieve and store the
app state in a database.
Controllers handle
user interaction, work
with the model, and
select a view to render
that displays UI
Views display the
application's user
interface (UI). Typically,
this UI is created from
the model data.
Request
ControllerController
ControllerController
Model
ControllerController
ViewView
ControllerController
ViewView
Response
ControllerController
ViewView
Full control over HTML & JS
In ASP.NET MVC, designed HTML & JS
pages are not more messed up with
“postbacks” and “ViewStates”, which is
specific for “Web-forms” pattern.
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPaA8FDzhjYjBhZjA0ODYyMTM2NBgGBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUhY3RsMDAkaGVhZGVyJHVjTWFp
bk1lbnUkc2VhcmNoQnRuBTdjdGwwMCRNYWluQ29udGVudCRycHRWaWRlbyRjdGwwMyRwcmVzZW50YXRpb25DYXJkJG11bHRp" />
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
Friendly URLs
MVC binds web paths to the logical URLs
rather than to the physical files.
C:InetpubwwwrootWebSiteProducts.aspx
http://www.website.com/Products.aspx?name=Meat
http://www.website.com/Products/Meat
Physical location:
ASP.NET style:
MVC style:
Routing
R => the hidden characterMVC + R
1. Maps incoming URLs to the application and routes them to the right
Controller’s Action method to execute them
2. Happens in RegisterRoutes function in the global.asax file
Routing
Don’t settle for…
/ProductsDetails.aspx?CategoryID=123
When you can easily have…
/Product/Details/123/
Or whatever else makes sense…
Routing
To customize routing rules
How does ASP.NET MVC looks like?
ASP.NET MVC installs a new type of web
project into VS2013.
How does ASP.NET MVC looks like?
A newly created project has an ASP.NET
MVC specific directory structure.
App_Data folder is the physical store for data.
Content folder keeps files such as scripts, CSS, images, and so on.
Controllers folder is the location for controllers. The MVC framework
requires the names of all controllers to end with "Controller"—for
example, HomeController, LoginController, or ProductController.
Models stores classes that handle application business logic.
Scripts folder is for script files that support the application. By
default, this folder contains AJAX script files and the JQuery library.
Views is the recommended location for views. Views use .aspx,
.ascx, and .master files, in addition to any other files that are related
to rendering views.
Logic UI
Test-Driven Development
Since the UI is completely separated from
the business logic, it’s now easy to write
Unit Tests for the ASP.NET MVC
application.
Controller
Unit Tests that cover
User Actions and Data Model
User Interface Data Objects
Conclusion
ASP.NET MVC supports pure MVC pattern, the
same development pattern Rails are based on.
The advantages of ASP.NET MVC applications:
1. It makes it easier to manage complexity by dividing an application into
the model, the view, and the controller.
2. It does not use view state or server-based forms.
3. It uses a Front Controller pattern that processes Web application
requests through a single controller. This enables you to design an
application that supports a rich routing infrastructure with friendly
URLs.
4. It provides better support for test-driven development (TDD).
5. It works well for Web applications that are supported by large teams of
developers and Web designers who need a high degree of control
over the application behavior.
Web Links to Additional Resources
• http://www.asp.net/mvc - official site
• http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-
framework-part-1.aspx - development basics on ASP.NET MVC
• http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-
framework-part-2-url-routing.aspx - URL routing used in ASP.NET
MVC
• http://weblogs.asp.net/scottgu/archive/2007/12/06/asp-net-mvc-
framework-part-3-passing-viewdata-from-controllers-to-views.aspx
- interaction between Controllers and Views
• http://weblogs.asp.net/scottgu/archive/2007/12/09/asp-net-mvc-
framework-part-4-handling-form-edit-and-post-scenarios.aspx -
managing form input data
Asp.net mvc

More Related Content

What's hot

Mvc
MvcMvc
Mvc
abhigad
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC eldorina
 
Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introduction
Bhagath Gopinath
 
Dot net interview questions and asnwers
Dot net interview questions and asnwersDot net interview questions and asnwers
Dot net interview questions and asnwers
kavinilavuG
 
MVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros DeveloperMVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros Developer
Nyros Technologies
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
Ni
 
ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015
Hossein Zahed
 
Asp.net MVC training session
Asp.net MVC training sessionAsp.net MVC training session
Asp.net MVC training session
Hrichi Mohamed
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
Volkan Uzun
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
ivpol
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
Er. Kamal Bhusal
 
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazingMortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
Tom Walker
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
Asp 1a-aspnetmvc
Asp 1a-aspnetmvcAsp 1a-aspnetmvc
Asp 1a-aspnetmvc
Fajar Baskoro
 
What is MVC?
What is MVC?What is MVC?
What is MVC?
Dominique Cimafranca
 
Mvc fundamental
Mvc fundamentalMvc fundamental
Mvc fundamental
Nguyễn Thành Phát
 

What's hot (20)

Mvc
MvcMvc
Mvc
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC
 
Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introduction
 
Dot net interview questions and asnwers
Dot net interview questions and asnwersDot net interview questions and asnwers
Dot net interview questions and asnwers
 
MVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros DeveloperMVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros Developer
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
 
ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015
 
Asp.net MVC training session
Asp.net MVC training sessionAsp.net MVC training session
Asp.net MVC training session
 
MVC 4
MVC 4MVC 4
MVC 4
 
MVC Framework
MVC FrameworkMVC Framework
MVC Framework
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazingMortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
Asp 1a-aspnetmvc
Asp 1a-aspnetmvcAsp 1a-aspnetmvc
Asp 1a-aspnetmvc
 
What is MVC?
What is MVC?What is MVC?
What is MVC?
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
Mvc fundamental
Mvc fundamentalMvc fundamental
Mvc fundamental
 

Viewers also liked

Online assignment
Online assignment Online assignment
Online assignment
lekshmyrajan91
 
How I Define Living Globally
How I Define Living GloballyHow I Define Living Globally
How I Define Living Globallyraye23
 
Poligonal (construccion de redes)
Poligonal (construccion de redes)Poligonal (construccion de redes)
Poligonal (construccion de redes)
Carlita Bonita
 
Kti linda wati
Kti linda watiKti linda wati
Kti linda wati
KTIMELDAWATI
 
WT Volleyball Game Notes (9-10-15)
WT Volleyball Game Notes (9-10-15)WT Volleyball Game Notes (9-10-15)
WT Volleyball Game Notes (9-10-15)
West Texas A&M
 
Zuni stone
Zuni stoneZuni stone
Zuni stone
Katie Lawson
 
Marilee Welch Resume 2015
Marilee Welch Resume 2015Marilee Welch Resume 2015
Marilee Welch Resume 2015Marilee Welch
 
Multimedia
Multimedia Multimedia
Multimedia
Mustafa_Sabuwala
 
Amor y amistad
Amor y amistadAmor y amistad
Amor y amistad
yeimygil01
 
VAMSI KRISHNA RAJULAPUDI_Resume_Scripting
VAMSI KRISHNA RAJULAPUDI_Resume_ScriptingVAMSI KRISHNA RAJULAPUDI_Resume_Scripting
VAMSI KRISHNA RAJULAPUDI_Resume_ScriptingVAMSI R
 
“Bon símptoma”. De moment, 13 morts als bous al carrer en un sol estiu.
“Bon símptoma”.  De moment, 13 morts als bous al carrer en un sol estiu.“Bon símptoma”.  De moment, 13 morts als bous al carrer en un sol estiu.
“Bon símptoma”. De moment, 13 morts als bous al carrer en un sol estiu.
Jesús Frare Garcia
 
PS1_2014_2012B5A7521P_2012B5A7848P_2012B4A7958H
PS1_2014_2012B5A7521P_2012B5A7848P_2012B4A7958HPS1_2014_2012B5A7521P_2012B5A7848P_2012B4A7958H
PS1_2014_2012B5A7521P_2012B5A7848P_2012B4A7958HSaurabh Kumar
 
C -users-mmusa-desktop-exams-final exam (1)
C -users-mmusa-desktop-exams-final exam (1)C -users-mmusa-desktop-exams-final exam (1)
C -users-mmusa-desktop-exams-final exam (1)
Saad Darras
 
On Dadaji - Vol II
On Dadaji - Vol II On Dadaji - Vol II
On Dadaji - Vol II
Truth Within
 
Tema 1 propaganda15
Tema 1 propaganda15Tema 1 propaganda15
Tema 1 propaganda15
Xosé Baamonde
 
Day4 honors curriculum-advising
Day4   honors curriculum-advisingDay4   honors curriculum-advising
Day4 honors curriculum-advising
Seth Porter, MA, MLIS
 

Viewers also liked (17)

Online assignment
Online assignment Online assignment
Online assignment
 
How I Define Living Globally
How I Define Living GloballyHow I Define Living Globally
How I Define Living Globally
 
Poligonal (construccion de redes)
Poligonal (construccion de redes)Poligonal (construccion de redes)
Poligonal (construccion de redes)
 
Kti linda wati
Kti linda watiKti linda wati
Kti linda wati
 
WT Volleyball Game Notes (9-10-15)
WT Volleyball Game Notes (9-10-15)WT Volleyball Game Notes (9-10-15)
WT Volleyball Game Notes (9-10-15)
 
Zuni stone
Zuni stoneZuni stone
Zuni stone
 
Marilee Welch Resume 2015
Marilee Welch Resume 2015Marilee Welch Resume 2015
Marilee Welch Resume 2015
 
Multimedia
Multimedia Multimedia
Multimedia
 
Amor y amistad
Amor y amistadAmor y amistad
Amor y amistad
 
VAMSI KRISHNA RAJULAPUDI_Resume_Scripting
VAMSI KRISHNA RAJULAPUDI_Resume_ScriptingVAMSI KRISHNA RAJULAPUDI_Resume_Scripting
VAMSI KRISHNA RAJULAPUDI_Resume_Scripting
 
“Bon símptoma”. De moment, 13 morts als bous al carrer en un sol estiu.
“Bon símptoma”.  De moment, 13 morts als bous al carrer en un sol estiu.“Bon símptoma”.  De moment, 13 morts als bous al carrer en un sol estiu.
“Bon símptoma”. De moment, 13 morts als bous al carrer en un sol estiu.
 
engagement 9_10_15
engagement 9_10_15engagement 9_10_15
engagement 9_10_15
 
PS1_2014_2012B5A7521P_2012B5A7848P_2012B4A7958H
PS1_2014_2012B5A7521P_2012B5A7848P_2012B4A7958HPS1_2014_2012B5A7521P_2012B5A7848P_2012B4A7958H
PS1_2014_2012B5A7521P_2012B5A7848P_2012B4A7958H
 
C -users-mmusa-desktop-exams-final exam (1)
C -users-mmusa-desktop-exams-final exam (1)C -users-mmusa-desktop-exams-final exam (1)
C -users-mmusa-desktop-exams-final exam (1)
 
On Dadaji - Vol II
On Dadaji - Vol II On Dadaji - Vol II
On Dadaji - Vol II
 
Tema 1 propaganda15
Tema 1 propaganda15Tema 1 propaganda15
Tema 1 propaganda15
 
Day4 honors curriculum-advising
Day4   honors curriculum-advisingDay4   honors curriculum-advising
Day4 honors curriculum-advising
 

Similar to Asp.net mvc

ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
Rasel Khan
 
Technoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development servicesTechnoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development services
Aaron Jacobson
 
Aspnetmvc 1
Aspnetmvc 1Aspnetmvc 1
Aspnetmvc 1
Fajar Baskoro
 
An overview of microsoft mvc dot net
An overview of microsoft mvc dot netAn overview of microsoft mvc dot net
An overview of microsoft mvc dot net
neha sharma
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handson
Prashant Kumar
 
Head first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rttHead first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rtt
Lanvige Jiang
 
Mvc Brief Overview
Mvc Brief OverviewMvc Brief Overview
Mvc Brief Overview
rainynovember12
 
Asp.net mvc 5 course module 1 overview
Asp.net mvc 5 course   module 1 overviewAsp.net mvc 5 course   module 1 overview
Asp.net mvc 5 course module 1 overview
Sergey Seletsky
 
Struts(mrsurwar) ppt
Struts(mrsurwar) pptStruts(mrsurwar) ppt
Struts(mrsurwar) ppt
mrsurwar
 
Asp.net Mvc Introduction
Asp.net Mvc IntroductionAsp.net Mvc Introduction
Asp.net Mvc Introduction
Vishal Sharma
 
ASP.NET MVC Fundamental
ASP.NET MVC FundamentalASP.NET MVC Fundamental
ASP.NET MVC Fundamentalldcphuc
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9
AHM Pervej Kabir
 
MVC 6 Introduction
MVC 6 IntroductionMVC 6 Introduction
MVC 6 Introduction
Sudhakar Sharma
 
Simple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnanSimple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnan
Gigin Krishnan
 
Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Rishu Mehra
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013
Thomas Robbins
 

Similar to Asp.net mvc (20)

Jinal desai .net
Jinal desai .netJinal desai .net
Jinal desai .net
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
Technoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development servicesTechnoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development services
 
Aspnetmvc 1
Aspnetmvc 1Aspnetmvc 1
Aspnetmvc 1
 
An overview of microsoft mvc dot net
An overview of microsoft mvc dot netAn overview of microsoft mvc dot net
An overview of microsoft mvc dot net
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handson
 
Head first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rttHead first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rtt
 
Mvc Brief Overview
Mvc Brief OverviewMvc Brief Overview
Mvc Brief Overview
 
Asp.net mvc 5 course module 1 overview
Asp.net mvc 5 course   module 1 overviewAsp.net mvc 5 course   module 1 overview
Asp.net mvc 5 course module 1 overview
 
Struts(mrsurwar) ppt
Struts(mrsurwar) pptStruts(mrsurwar) ppt
Struts(mrsurwar) ppt
 
Asp.net Mvc Introduction
Asp.net Mvc IntroductionAsp.net Mvc Introduction
Asp.net Mvc Introduction
 
ASP.NET MVC Fundamental
ASP.NET MVC FundamentalASP.NET MVC Fundamental
ASP.NET MVC Fundamental
 
Mvc
MvcMvc
Mvc
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9
 
MVC 6 Introduction
MVC 6 IntroductionMVC 6 Introduction
MVC 6 Introduction
 
Intro ASP MVC
Intro ASP MVCIntro ASP MVC
Intro ASP MVC
 
Simple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnanSimple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnan
 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - Introduction
 
Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013
 

Recently uploaded

A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 

Recently uploaded (20)

A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 

Asp.net mvc

  • 1. ASP.NET MVCASP.NET MVC [M[Modelodel VViewiew CController (MVC)ontroller (MVC) applications by using theapplications by using the ASP.NET frameworkASP.NET framework] Taranjeet Singh www.ptlsolution.co m
  • 2. What is ASP.NET MVC? Saying simply, ASP.NET MVC is a new framework from Microsoft that sites over standard ASP.NET engine. ASP.NET ASP.NET MVC
  • 3. ASP.NET MVC Features What new does ASP.NET MVC bring in terms of web architecture? 1. Clear separation of logic: Model, View, Controller 2. Test-Driven Development 3. Full control over HTML and JavaScript 4. Friendly URLs
  • 4. Model + View + Controller = MVC ASP.NET MVC provides an alternative to the ASP.NET “Web Forms” pattern for creating MVC-based Web applications. Model ControllerView Model objects implement the logic for the application's data domain. Often, model objects retrieve and store the app state in a database. Controllers handle user interaction, work with the model, and select a view to render that displays UI Views display the application's user interface (UI). Typically, this UI is created from the model data.
  • 10. Full control over HTML & JS In ASP.NET MVC, designed HTML & JS pages are not more messed up with “postbacks” and “ViewStates”, which is specific for “Web-forms” pattern. <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPaA8FDzhjYjBhZjA0ODYyMTM2NBgGBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUhY3RsMDAkaGVhZGVyJHVjTWFp bk1lbnUkc2VhcmNoQnRuBTdjdGwwMCRNYWluQ29udGVudCRycHRWaWRlbyRjdGwwMyRwcmVzZW50YXRpb25DYXJkJG11bHRp" /> <script type="text/javascript"> //<![CDATA[ var theForm = document.forms['aspnetForm']; function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); } } //]]> </script>
  • 11. Friendly URLs MVC binds web paths to the logical URLs rather than to the physical files. C:InetpubwwwrootWebSiteProducts.aspx http://www.website.com/Products.aspx?name=Meat http://www.website.com/Products/Meat Physical location: ASP.NET style: MVC style:
  • 12. Routing R => the hidden characterMVC + R 1. Maps incoming URLs to the application and routes them to the right Controller’s Action method to execute them 2. Happens in RegisterRoutes function in the global.asax file
  • 13. Routing Don’t settle for… /ProductsDetails.aspx?CategoryID=123 When you can easily have… /Product/Details/123/ Or whatever else makes sense…
  • 15. How does ASP.NET MVC looks like? ASP.NET MVC installs a new type of web project into VS2013.
  • 16. How does ASP.NET MVC looks like? A newly created project has an ASP.NET MVC specific directory structure. App_Data folder is the physical store for data. Content folder keeps files such as scripts, CSS, images, and so on. Controllers folder is the location for controllers. The MVC framework requires the names of all controllers to end with "Controller"—for example, HomeController, LoginController, or ProductController. Models stores classes that handle application business logic. Scripts folder is for script files that support the application. By default, this folder contains AJAX script files and the JQuery library. Views is the recommended location for views. Views use .aspx, .ascx, and .master files, in addition to any other files that are related to rendering views.
  • 18. Test-Driven Development Since the UI is completely separated from the business logic, it’s now easy to write Unit Tests for the ASP.NET MVC application. Controller Unit Tests that cover User Actions and Data Model User Interface Data Objects
  • 19. Conclusion ASP.NET MVC supports pure MVC pattern, the same development pattern Rails are based on. The advantages of ASP.NET MVC applications: 1. It makes it easier to manage complexity by dividing an application into the model, the view, and the controller. 2. It does not use view state or server-based forms. 3. It uses a Front Controller pattern that processes Web application requests through a single controller. This enables you to design an application that supports a rich routing infrastructure with friendly URLs. 4. It provides better support for test-driven development (TDD). 5. It works well for Web applications that are supported by large teams of developers and Web designers who need a high degree of control over the application behavior.
  • 20. Web Links to Additional Resources • http://www.asp.net/mvc - official site • http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc- framework-part-1.aspx - development basics on ASP.NET MVC • http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc- framework-part-2-url-routing.aspx - URL routing used in ASP.NET MVC • http://weblogs.asp.net/scottgu/archive/2007/12/06/asp-net-mvc- framework-part-3-passing-viewdata-from-controllers-to-views.aspx - interaction between Controllers and Views • http://weblogs.asp.net/scottgu/archive/2007/12/09/asp-net-mvc- framework-part-4-handling-form-edit-and-post-scenarios.aspx - managing form input data