SlideShare a Scribd company logo
1 of 15
MVC ASP .Net VS 2010 Jayant Jindal jayantjindal@hotmail.com
Key Take Aways… Why MVC? What is MVC? How to Implement MVC? ASP .Net VS 2010 MVC Enhancements…
Why MVC? Easier code maintenance and support. Supports automated unit testing tools such as NUnit, MBUnit,... Decouple business and presentation application layers. Web-based thin-client application. User interface logic tends to change more frequently than business logic.
Patterns… Page Controller Pattern ,[object Object]
Each page has a code-behind class.
URL requested by the client is directly handled by individual pages.
All page code is in the code-behind files.
By default, ASP.NET is page controller based.,[object Object]
MVC is based on a front controller design.
Centralized controller instead of multiple controllers.
Trap all client requests, and controller decides which view or .aspx to render.Client Request Central Controller MyPage2 ASPX HTML View MyPage1 ASPX HTML View
What is MVC? ,[object Object]
View: This refers to the UI components that will show the model data.Controller: This controls when to change the view, based on user actions. MVC design is not a replacement to the n-tier architecture. The model, the view, and the controller are not related directly to the layers, or to the physical tiers; they are logical components that operate together in a certain pattern.
Basics of MVC ,[object Object],Controller is associated with the view, allowing to change views independent of the controller. View depends on the model, and is updated when the model's state has changed. Controller View Model
REST: Representation State Transfer Architectural pattern used to identify and fetch resources from networked systems. e.g. www. Sharing of resources via unique identifiers. No need to check for a page postback. Foll. code is not supported in REST approach: btnSave_Cick() 	{ Response.Redirect("~/MyPage.aspx"); 	}

More Related Content

What's hot

MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentationBhavin Shah
 
MVC architecture by Mohd.Awais on 18th Aug, 2017
MVC architecture by Mohd.Awais on 18th Aug, 2017MVC architecture by Mohd.Awais on 18th Aug, 2017
MVC architecture by Mohd.Awais on 18th Aug, 2017Innovation Studio
 
Asp.net MVC training session
Asp.net MVC training sessionAsp.net MVC training session
Asp.net MVC training sessionHrichi Mohamed
 
Asp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin SawantAsp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin SawantNitin Sawant
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCAnton Krasnoshchok
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentationivpol
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC PresentationVolkan Uzun
 
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 DeveloperNyros Technologies
 
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 - VS2015Hossein Zahed
 
Difference between MVC 3, 4, 5 and 6
Difference between MVC 3, 4, 5 and 6Difference between MVC 3, 4, 5 and 6
Difference between MVC 3, 4, 5 and 6Bhaumik Patel
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architectureravindraquicsolv
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.Ni
 

What's hot (20)

MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 
MVC architecture by Mohd.Awais on 18th Aug, 2017
MVC architecture by Mohd.Awais on 18th Aug, 2017MVC architecture by Mohd.Awais on 18th Aug, 2017
MVC architecture by Mohd.Awais on 18th Aug, 2017
 
Asp.net MVC training session
Asp.net MVC training sessionAsp.net MVC training session
Asp.net MVC training session
 
Asp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin SawantAsp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin Sawant
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Asp 1a-aspnetmvc
Asp 1a-aspnetmvcAsp 1a-aspnetmvc
Asp 1a-aspnetmvc
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
What is MVC?
What is MVC?What is MVC?
What is MVC?
 
MSDN - ASP.NET MVC
MSDN - ASP.NET MVCMSDN - ASP.NET MVC
MSDN - ASP.NET MVC
 
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 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
Asp.net mvcAsp.net mvc
Asp.net mvc
 
MVC
MVCMVC
MVC
 
Difference between MVC 3, 4, 5 and 6
Difference between MVC 3, 4, 5 and 6Difference between MVC 3, 4, 5 and 6
Difference between MVC 3, 4, 5 and 6
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
MVC Framework
MVC FrameworkMVC Framework
MVC Framework
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
 

Similar to Mvc 4 0_jayant_jindal_28082010

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 servicesAaron Jacobson
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handsonPrashant 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 rttLanvige Jiang
 
Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0Shiju Varghese
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET PresentationRasel Khan
 
MVC From Beginner to Advance in Indian Style by - Indiandotnet
MVC From Beginner to Advance in Indian Style by - IndiandotnetMVC From Beginner to Advance in Indian Style by - Indiandotnet
MVC From Beginner to Advance in Indian Style by - IndiandotnetIndiandotnet
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe
 
ASP.Net | Sabin Saleem
ASP.Net | Sabin SaleemASP.Net | Sabin Saleem
ASP.Net | Sabin SaleemSaBin SaleEm
 
ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)Hatem Hamad
 
Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Naresh Chintalcheru
 
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 netneha sharma
 
New Features of ASP.NET 4.0
New Features of ASP.NET 4.0New Features of ASP.NET 4.0
New Features of ASP.NET 4.0Buu Nguyen
 
Asp.net Mvc Introduction
Asp.net Mvc IntroductionAsp.net Mvc Introduction
Asp.net Mvc IntroductionVishal Sharma
 

Similar to Mvc 4 0_jayant_jindal_28082010 (20)

Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
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
 
MVC 4
MVC 4MVC 4
MVC 4
 
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
 
Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
MVC From Beginner to Advance in Indian Style by - Indiandotnet
MVC From Beginner to Advance in Indian Style by - IndiandotnetMVC From Beginner to Advance in Indian Style by - Indiandotnet
MVC From Beginner to Advance in Indian Style by - Indiandotnet
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
 
ASP.Net | Sabin Saleem
ASP.Net | Sabin SaleemASP.Net | Sabin Saleem
ASP.Net | Sabin Saleem
 
Session 1
Session 1Session 1
Session 1
 
Intro ASP MVC
Intro ASP MVCIntro ASP MVC
Intro ASP MVC
 
ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)
 
Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC
 
Jinal desai .net
Jinal desai .netJinal desai .net
Jinal desai .net
 
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
 
MVC 6 Introduction
MVC 6 IntroductionMVC 6 Introduction
MVC 6 Introduction
 
New Features of ASP.NET 4.0
New Features of ASP.NET 4.0New Features of ASP.NET 4.0
New Features of ASP.NET 4.0
 
Asp.net Mvc Introduction
Asp.net Mvc IntroductionAsp.net Mvc Introduction
Asp.net Mvc Introduction
 

More from Rishu Mehra

I Unlock Joy! - ITM Gurgaon
I Unlock Joy! - ITM GurgaonI Unlock Joy! - ITM Gurgaon
I Unlock Joy! - ITM GurgaonRishu Mehra
 
What is Microsoft Student Partner Program?
What is Microsoft Student Partner Program?What is Microsoft Student Partner Program?
What is Microsoft Student Partner Program?Rishu Mehra
 
all you need to know about windows phone
all you need to know about windows phoneall you need to know about windows phone
all you need to know about windows phoneRishu Mehra
 
Blurring the difference of Web & Native Apps with HTML 5 & IE 9
Blurring the difference of Web & Native Apps with HTML 5  & IE 9Blurring the difference of Web & Native Apps with HTML 5  & IE 9
Blurring the difference of Web & Native Apps with HTML 5 & IE 9Rishu Mehra
 
Windows Phone 7: Interfacing
Windows Phone 7: InterfacingWindows Phone 7: Interfacing
Windows Phone 7: InterfacingRishu Mehra
 
Hello, windows phone!
Hello, windows phone!Hello, windows phone!
Hello, windows phone!Rishu Mehra
 
Windows Phone 7 Applications with Silverlight
Windows Phone 7 Applications with SilverlightWindows Phone 7 Applications with Silverlight
Windows Phone 7 Applications with SilverlightRishu Mehra
 
Windows Phone 7: Silverlight
Windows Phone 7: SilverlightWindows Phone 7: Silverlight
Windows Phone 7: SilverlightRishu Mehra
 
SharePoint 2010 for IT Pros
SharePoint 2010 for IT ProsSharePoint 2010 for IT Pros
SharePoint 2010 for IT ProsRishu Mehra
 
SharePoint 2010 for Devs
SharePoint 2010 for DevsSharePoint 2010 for Devs
SharePoint 2010 for DevsRishu Mehra
 
Ado.net entity framework_4.0
Ado.net entity framework_4.0Ado.net entity framework_4.0
Ado.net entity framework_4.0Rishu Mehra
 
SQL Server 2008 R2 - Implementing High Availabilitty
SQL Server 2008 R2 - Implementing High AvailabilittySQL Server 2008 R2 - Implementing High Availabilitty
SQL Server 2008 R2 - Implementing High AvailabilittyRishu Mehra
 
Microsoft India Academic Initiatives
Microsoft India Academic InitiativesMicrosoft India Academic Initiatives
Microsoft India Academic InitiativesRishu Mehra
 
Microsoft Community Tools
Microsoft Community ToolsMicrosoft Community Tools
Microsoft Community ToolsRishu Mehra
 
Visual studio 2010
Visual studio 2010Visual studio 2010
Visual studio 2010Rishu Mehra
 
Microsoft CTD & User Groups
Microsoft CTD & User GroupsMicrosoft CTD & User Groups
Microsoft CTD & User GroupsRishu Mehra
 
.Net Performance by Bijoy Singhal
.Net Performance by Bijoy Singhal.Net Performance by Bijoy Singhal
.Net Performance by Bijoy SinghalRishu Mehra
 
Uploading Data From Microsoft Excel - Microsoft SLQ Server 2008 (by Rakesh Mi...
Uploading Data From Microsoft Excel - Microsoft SLQ Server 2008 (by Rakesh Mi...Uploading Data From Microsoft Excel - Microsoft SLQ Server 2008 (by Rakesh Mi...
Uploading Data From Microsoft Excel - Microsoft SLQ Server 2008 (by Rakesh Mi...Rishu Mehra
 

More from Rishu Mehra (20)

I Unlock Joy! - ITM Gurgaon
I Unlock Joy! - ITM GurgaonI Unlock Joy! - ITM Gurgaon
I Unlock Joy! - ITM Gurgaon
 
What is Microsoft Student Partner Program?
What is Microsoft Student Partner Program?What is Microsoft Student Partner Program?
What is Microsoft Student Partner Program?
 
all you need to know about windows phone
all you need to know about windows phoneall you need to know about windows phone
all you need to know about windows phone
 
Blurring the difference of Web & Native Apps with HTML 5 & IE 9
Blurring the difference of Web & Native Apps with HTML 5  & IE 9Blurring the difference of Web & Native Apps with HTML 5  & IE 9
Blurring the difference of Web & Native Apps with HTML 5 & IE 9
 
Lync Server
Lync ServerLync Server
Lync Server
 
Office365
Office365Office365
Office365
 
Windows Phone 7: Interfacing
Windows Phone 7: InterfacingWindows Phone 7: Interfacing
Windows Phone 7: Interfacing
 
Hello, windows phone!
Hello, windows phone!Hello, windows phone!
Hello, windows phone!
 
Windows Phone 7 Applications with Silverlight
Windows Phone 7 Applications with SilverlightWindows Phone 7 Applications with Silverlight
Windows Phone 7 Applications with Silverlight
 
Windows Phone 7: Silverlight
Windows Phone 7: SilverlightWindows Phone 7: Silverlight
Windows Phone 7: Silverlight
 
SharePoint 2010 for IT Pros
SharePoint 2010 for IT ProsSharePoint 2010 for IT Pros
SharePoint 2010 for IT Pros
 
SharePoint 2010 for Devs
SharePoint 2010 for DevsSharePoint 2010 for Devs
SharePoint 2010 for Devs
 
Ado.net entity framework_4.0
Ado.net entity framework_4.0Ado.net entity framework_4.0
Ado.net entity framework_4.0
 
SQL Server 2008 R2 - Implementing High Availabilitty
SQL Server 2008 R2 - Implementing High AvailabilittySQL Server 2008 R2 - Implementing High Availabilitty
SQL Server 2008 R2 - Implementing High Availabilitty
 
Microsoft India Academic Initiatives
Microsoft India Academic InitiativesMicrosoft India Academic Initiatives
Microsoft India Academic Initiatives
 
Microsoft Community Tools
Microsoft Community ToolsMicrosoft Community Tools
Microsoft Community Tools
 
Visual studio 2010
Visual studio 2010Visual studio 2010
Visual studio 2010
 
Microsoft CTD & User Groups
Microsoft CTD & User GroupsMicrosoft CTD & User Groups
Microsoft CTD & User Groups
 
.Net Performance by Bijoy Singhal
.Net Performance by Bijoy Singhal.Net Performance by Bijoy Singhal
.Net Performance by Bijoy Singhal
 
Uploading Data From Microsoft Excel - Microsoft SLQ Server 2008 (by Rakesh Mi...
Uploading Data From Microsoft Excel - Microsoft SLQ Server 2008 (by Rakesh Mi...Uploading Data From Microsoft Excel - Microsoft SLQ Server 2008 (by Rakesh Mi...
Uploading Data From Microsoft Excel - Microsoft SLQ Server 2008 (by Rakesh Mi...
 

Mvc 4 0_jayant_jindal_28082010

  • 1. MVC ASP .Net VS 2010 Jayant Jindal jayantjindal@hotmail.com
  • 2. Key Take Aways… Why MVC? What is MVC? How to Implement MVC? ASP .Net VS 2010 MVC Enhancements…
  • 3. Why MVC? Easier code maintenance and support. Supports automated unit testing tools such as NUnit, MBUnit,... Decouple business and presentation application layers. Web-based thin-client application. User interface logic tends to change more frequently than business logic.
  • 4.
  • 5. Each page has a code-behind class.
  • 6. URL requested by the client is directly handled by individual pages.
  • 7. All page code is in the code-behind files.
  • 8.
  • 9. MVC is based on a front controller design.
  • 10. Centralized controller instead of multiple controllers.
  • 11. Trap all client requests, and controller decides which view or .aspx to render.Client Request Central Controller MyPage2 ASPX HTML View MyPage1 ASPX HTML View
  • 12.
  • 13. View: This refers to the UI components that will show the model data.Controller: This controls when to change the view, based on user actions. MVC design is not a replacement to the n-tier architecture. The model, the view, and the controller are not related directly to the layers, or to the physical tiers; they are logical components that operate together in a certain pattern.
  • 14.
  • 15. REST: Representation State Transfer Architectural pattern used to identify and fetch resources from networked systems. e.g. www. Sharing of resources via unique identifiers. No need to check for a page postback. Foll. code is not supported in REST approach: btnSave_Cick() { Response.Redirect("~/MyPage.aspx"); }
  • 16. ASP.NET MVC Framework In MVC framework, URL routing is used. URLs are used based on the settings in a config file. e.g.: http://localhost/customer/list/ instead of traditional URL like: http://localhost/CustomerList.aspx ASPX pages are kind of view engine, nothing else. ASP.NET MVC framework is not a replacement or upgrade of web forms, but merely another way of programming.
  • 17.
  • 18. MVC Framework model:CustomerList.aspx processed by ASP.NET runtime and HTML returned to IIS Client browser requests URL http://myapp/CustomerList.aspx IIS Client browser requests URL http://myapp/Customer/List ASP.NET runtime IIS Controller Class Model Class View (ASPX)
  • 19. MVC 2.0 Enhancements Includes ASP.NET MVC 2 framework. Strongly Typed Html Helpers: view model level error instead of all validation Errors ASP.NET MVC 1 : <%= Html.TextBox(“ClassId”, Model.ClassId) %> ASP.NET MVC 2 : <%= Html.TextBoxFor(model => model.ClassId) %> Model Validation: Validation logic is always enforced on the server, and if needed can be done on client via JavaScript.
  • 20. MVC 2.0 Framework Enhancements Areas Support:Group controllers and views into sections. Data-Annotation Attribute Validation Support: Enable to perform validation by adding one or more attributes. (Add References: Microsoft.Web.Mvc.DataAnnotations.dll and System.ComponentModel.DataAnnotations.dll assemblies. E.g.:
  • 21. MVC 2.0 Framework Enhancements using System.ComponentModel; Using System.ComponentModel.DataAnnotations; namespace MvcApplication1.Models {public class Product {public int Id { get; set; } [Required] [StringLength(10)] public string Name { get; set; } [DisplayName("Price")] [Required] [RegularExpression(@"^?+(({2}))?$")] public decimal UnitPrice { get; set; } }}
  • 22.