SlideShare a Scribd company logo
1 of 18
Presented By:
Krishna Patel
Khushbu Bhakta
Bhumika Chauhan
Introduction to ASP.NET MVC
Agenda
2
 Introduction
 Choosing between webform & MVC
 How MVC Work?
 Creating Model
 Creating Controller
 Creating View
 Advantages
 Disadvantages
Introduction
 MVC is one of three ASP.NET
Programming Model.
 MVC stands for Model View Controller-
the names of the three major
components of this style of application
Development
 Model
 View
 Controller
3
Introduction
 Model refers to a data model,which is something
that you can use to perform create
,read,update,delete(CRUD) operation on your
application data.
 View is what is present to user.[Display Data]
 Controllers are code file that bridge between
views and models.It read data from view,control
user input and send input data to the model
4
Choosing between MVC & WebForm
 MVC is not replacing WebForms. Both these
development models exist and can be used to
develop ASP.NET applications.MVC Web Form
MVC is a lightweight and follow
MVC (Model, View, Controller)
pattern based development
model.
follows a traditional event driven
development model.
follow customizable syntax (Razor
as default)
follows Web Forms Syntax.
In MVC, Views and logic are kept
separately.
In Asp.Net Web Form, Web
Forms(ASPX) i.e. views are tightly
coupled to Code
behind(ASPX.CS) i.e. logic.
MVC has Layouts for consistent Web Form has Master Pages for5
How MVC Work???
Step 1
Incoming request directed to Controller
Request
6
How MVC Work???
Step 2
Controller processes request and forms a data Model
Model
7
How MVC Work???
Step 3
Model is passed to View
Controller
8
How MVC Work???
Step 4
View transforms Model into appropriate output format
Controller
9
How MVC Work???

Step 5
Response is rendered [deliver]
Response
Controller
View
10
Creating Model
 DataModel.emdx :-
This XML file defines the
schema for your data model
 DataModel.Designer.cs:-
This is C# code file
containing
the mapping object of your data model.
11
Creating Controller
 Controller process requests and determine which
view should be returned to the client.
Ex:
public ActionResult Index()
{
Db_MVC db=new Db_MVC();
return view(db.user);
}
12
Creating view
 Right click any where in code for the contoller
index
method ,and select add view option
13
Advantages of MVC
 SoC – Separation of Concerns
Separation of Concern is one of the core
advantages of ASP.NET MVC . The MVC
framework provides a clean separation of the UI
, Business Logic , Model or Data.
 More Control
The ASP.NET MVC framework provides more
control over the HTML , JavaScript and CSS
than the traditional Web Forms.
14
Advantages of MVC
 Testability
ASP.NET MVC framework provides better
testability of the Web Application and good
support for the test driven development too.
 Lightweight
ASP.NET MVC framework doesn’t use View
State and thus reduces the bandwidth of the
requests to an extent.
15
Advantages of MVC
 Full features of ASP.NET
One of the key advantages of using ASP.NET
MVC is that it is built on top of ASP.NET
framework and hence most of the features of the
ASP.NET like membership providers , roles etc
can still be used.
16
Disadvantages of MVC
17
 HTML & CSS skills must be revive
MVC requires the developer to understand how
the client-side code and HTML all play together
 MVC is still "relatively" new
18

More Related Content

What's hot

What's hot (20)

MVC architecture
MVC architectureMVC architecture
MVC architecture
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
 
Model View Controller(MVC)
Model View Controller(MVC)Model View Controller(MVC)
Model View Controller(MVC)
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
 
MVC Framework
MVC FrameworkMVC Framework
MVC Framework
 
Why Use MVC?
Why Use MVC?Why Use MVC?
Why Use MVC?
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 
Mvc
MvcMvc
Mvc
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
 
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 Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Android Data Binding Support Library
Android Data Binding Support LibraryAndroid Data Binding Support Library
Android Data Binding Support Library
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 
Just a View: An Introduction To Model-View-Controller Pattern
Just a View:  An Introduction To Model-View-Controller PatternJust a View:  An Introduction To Model-View-Controller Pattern
Just a View: An Introduction To Model-View-Controller Pattern
 
Jsp with mvc
Jsp with mvcJsp with mvc
Jsp with mvc
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
 
MVC - In Details
MVC - In DetailsMVC - In Details
MVC - In Details
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
 

Similar to Intro ASP MVC

ASP.NET MVC Fundamental
ASP.NET MVC FundamentalASP.NET MVC Fundamental
ASP.NET MVC Fundamental
ldcphuc
 

Similar to Intro ASP MVC (20)

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
 
Asp.net Mvc Introduction
Asp.net Mvc IntroductionAsp.net Mvc Introduction
Asp.net Mvc Introduction
 
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
 
Avigma Tech LLC- Why the MVC pattern so popular?
Avigma Tech LLC- Why the MVC pattern so popular?Avigma Tech LLC- Why the MVC pattern so popular?
Avigma Tech LLC- Why the MVC pattern so popular?
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Spring Framework-II
Spring Framework-IISpring Framework-II
Spring Framework-II
 
Top 40 MVC Interview Questions and Answers | Edureka
Top 40 MVC Interview Questions and Answers | EdurekaTop 40 MVC Interview Questions and Answers | Edureka
Top 40 MVC Interview Questions and Answers | Edureka
 
Programming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVCProgramming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVC
 
Introduction to ASP.NET Core MVC and the MVC Pattern.pptx
Introduction to ASP.NET Core MVC and the MVC Pattern.pptxIntroduction to ASP.NET Core MVC and the MVC Pattern.pptx
Introduction to ASP.NET Core MVC and the MVC Pattern.pptx
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
 
ASP.NET MVC Fundamental
ASP.NET MVC FundamentalASP.NET MVC Fundamental
ASP.NET MVC Fundamental
 
Principles of MVC for PHP Developers
Principles of MVC for PHP DevelopersPrinciples of MVC for PHP Developers
Principles of MVC for PHP Developers
 
MVC 4
MVC 4MVC 4
MVC 4
 
MVC
MVCMVC
MVC
 
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
 
Mvc part 1
Mvc part 1Mvc part 1
Mvc part 1
 
Web tier-framework-mvc
Web tier-framework-mvcWeb tier-framework-mvc
Web tier-framework-mvc
 
IntroductionToMVC
IntroductionToMVCIntroductionToMVC
IntroductionToMVC
 
ASP.Net | Sabin Saleem
ASP.Net | Sabin SaleemASP.Net | Sabin Saleem
ASP.Net | Sabin Saleem
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 

Intro ASP MVC

  • 1. Presented By: Krishna Patel Khushbu Bhakta Bhumika Chauhan Introduction to ASP.NET MVC
  • 2. Agenda 2  Introduction  Choosing between webform & MVC  How MVC Work?  Creating Model  Creating Controller  Creating View  Advantages  Disadvantages
  • 3. Introduction  MVC is one of three ASP.NET Programming Model.  MVC stands for Model View Controller- the names of the three major components of this style of application Development  Model  View  Controller 3
  • 4. Introduction  Model refers to a data model,which is something that you can use to perform create ,read,update,delete(CRUD) operation on your application data.  View is what is present to user.[Display Data]  Controllers are code file that bridge between views and models.It read data from view,control user input and send input data to the model 4
  • 5. Choosing between MVC & WebForm  MVC is not replacing WebForms. Both these development models exist and can be used to develop ASP.NET applications.MVC Web Form MVC is a lightweight and follow MVC (Model, View, Controller) pattern based development model. follows a traditional event driven development model. follow customizable syntax (Razor as default) follows Web Forms Syntax. In MVC, Views and logic are kept separately. In Asp.Net Web Form, Web Forms(ASPX) i.e. views are tightly coupled to Code behind(ASPX.CS) i.e. logic. MVC has Layouts for consistent Web Form has Master Pages for5
  • 6. How MVC Work??? Step 1 Incoming request directed to Controller Request 6
  • 7. How MVC Work??? Step 2 Controller processes request and forms a data Model Model 7
  • 8. How MVC Work??? Step 3 Model is passed to View Controller 8
  • 9. How MVC Work??? Step 4 View transforms Model into appropriate output format Controller 9
  • 10. How MVC Work???  Step 5 Response is rendered [deliver] Response Controller View 10
  • 11. Creating Model  DataModel.emdx :- This XML file defines the schema for your data model  DataModel.Designer.cs:- This is C# code file containing the mapping object of your data model. 11
  • 12. Creating Controller  Controller process requests and determine which view should be returned to the client. Ex: public ActionResult Index() { Db_MVC db=new Db_MVC(); return view(db.user); } 12
  • 13. Creating view  Right click any where in code for the contoller index method ,and select add view option 13
  • 14. Advantages of MVC  SoC – Separation of Concerns Separation of Concern is one of the core advantages of ASP.NET MVC . The MVC framework provides a clean separation of the UI , Business Logic , Model or Data.  More Control The ASP.NET MVC framework provides more control over the HTML , JavaScript and CSS than the traditional Web Forms. 14
  • 15. Advantages of MVC  Testability ASP.NET MVC framework provides better testability of the Web Application and good support for the test driven development too.  Lightweight ASP.NET MVC framework doesn’t use View State and thus reduces the bandwidth of the requests to an extent. 15
  • 16. Advantages of MVC  Full features of ASP.NET One of the key advantages of using ASP.NET MVC is that it is built on top of ASP.NET framework and hence most of the features of the ASP.NET like membership providers , roles etc can still be used. 16
  • 17. Disadvantages of MVC 17  HTML & CSS skills must be revive MVC requires the developer to understand how the client-side code and HTML all play together  MVC is still "relatively" new
  • 18. 18