SlideShare a Scribd company logo
ASP .NET Model View ControllerUniversity “Al.I.Cuza”, IasiFaculty of Computer ScienceEldorinaAlergusAndreeaJipa
The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model
the view
the controller. Models. Model objects are the parts of the application that implement the logic for the application's data domain. Often, model objects retrieve and store model state in a database. For example, a Product object might retrieve information from a database, operate on it, and then write updated information back to a Products table in SQL ServerViews are the components that display the application's user interface (UI). Typically, this UI is created from the model data. An example would be an edit view of a Products table that displays text boxes, drop-down lists, and check boxes based on the current state of a Products object.In ASP.NET the view is the set of web pages presented by a web application.
Controllers The controller is the object that allows the manipulation of the view. Usually many applications implement Model-Controller tiers that contain the business logic along with the necessary code to manipulate a user interface. In an ASP.NET application the controller is implicitly represented by the code-behind or the server side code that generates the HTML presented to the user.A basic diagram that would help us understand the specific parts that implement the MVC architecture in an ASP.NET application is presented below:
How does ASP .NET MVC looks like?
ASP .NET MVC project specific directory architectureApp_Data 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 requires the names of all controller to end with Controller.
Models stores classes that handle application business logic.
Scripts is the folder for script files. By default, it contains AJAX script files and the JQuery library.
Views is the recommended location for views. It my contain .aspx, .ascx, .master and other files that are related to rendering views.Advantages of an MVC-Based Web ApplicationIt makes it easier to manage complexity by dividing an application into the model, the view, and the controller.
It does not use view state or server-based forms. This makes the MVC framework ideal for developers who want full control over the behavior of an application.

More Related Content

PPT
ASP .net MVC
PPTX
Asp.net mvc presentation by Nitin Sawant
PPT
MSDN - ASP.NET MVC
PDF
ASP.NET MVC 3
PPT
ASP.NET MVC Presentation
PPT
MVC ppt presentation
PPTX
ASP .NET MVC - best practices
PPT
Asp.net mvc
ASP .net MVC
Asp.net mvc presentation by Nitin Sawant
MSDN - ASP.NET MVC
ASP.NET MVC 3
ASP.NET MVC Presentation
MVC ppt presentation
ASP .NET MVC - best practices
Asp.net mvc

What's hot (20)

PPTX
ASP .NET MVC Introduction & Guidelines
PPTX
Asp.net MVC training session
PPT
CTTDNUG ASP.NET MVC
PPTX
Getting started with MVC 5 and Visual Studio 2013
PPTX
ASP.NET MVC 5 - EF 6 - VS2015
PPTX
ASP.NET MVC Presentation
PPSX
Asp.net mvc
PPTX
ASP.NET MVC for Begineers
PPTX
Introduction to ASP.NET MVC
PPTX
MVC 6 Introduction
PPT
MVC Architecture in ASP.Net By Nyros Developer
PPTX
What's new in asp.net mvc 4
PDF
Asp.net mvc basic introduction
PPTX
Introduction to mvc architecture
PPTX
ASP .Net MVC 5
PPT
Silver Light By Nyros Developer
PPTX
Asp.net mvc 5 course module 1 overview
ODP
Mvc
PPTX
ASP.NET MVC.
 
PDF
Dot net interview questions and asnwers
ASP .NET MVC Introduction & Guidelines
Asp.net MVC training session
CTTDNUG ASP.NET MVC
Getting started with MVC 5 and Visual Studio 2013
ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC Presentation
Asp.net mvc
ASP.NET MVC for Begineers
Introduction to ASP.NET MVC
MVC 6 Introduction
MVC Architecture in ASP.Net By Nyros Developer
What's new in asp.net mvc 4
Asp.net mvc basic introduction
Introduction to mvc architecture
ASP .Net MVC 5
Silver Light By Nyros Developer
Asp.net mvc 5 course module 1 overview
Mvc
ASP.NET MVC.
 
Dot net interview questions and asnwers
Ad

Similar to ASP .NET MVC (20)

PPTX
Session 1
PPTX
Technoligent providing custom ASP.NET MVC development services
PPTX
Model view controller (mvc)
PPT
Asp.net mvc
PPTX
Introduction to ASP.Net MVC
PDF
Aspnetmvc 1
PDF
Asp 1a-aspnetmvc
PPS
Introduction To Mvc
PPT
Asp.net,mvc
PDF
Applying Domain Driven Design on Asp.net MVC – Part 1: Asp.net MVC
PPTX
ASP.NET MVC Fundamental
PDF
ASP.Net | Sabin Saleem
PPTX
ASPNet MVC series for beginers part 1
PPTX
Asp net mvc series for beginers part 1
PPTX
ASP.NET Presentation
PPTX
Programming is Fun with ASP.NET MVC
PPTX
Asp.net With mvc handson
KEY
Introduction to ASP.NET MVC
PPTX
4. Introduction to ASP.NET MVC - Part I
Session 1
Technoligent providing custom ASP.NET MVC development services
Model view controller (mvc)
Asp.net mvc
Introduction to ASP.Net MVC
Aspnetmvc 1
Asp 1a-aspnetmvc
Introduction To Mvc
Asp.net,mvc
Applying Domain Driven Design on Asp.net MVC – Part 1: Asp.net MVC
ASP.NET MVC Fundamental
ASP.Net | Sabin Saleem
ASPNet MVC series for beginers part 1
Asp net mvc series for beginers part 1
ASP.NET Presentation
Programming is Fun with ASP.NET MVC
Asp.net With mvc handson
Introduction to ASP.NET MVC
4. Introduction to ASP.NET MVC - Part I
Ad

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPT
Teaching material agriculture food technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Machine learning based COVID-19 study performance prediction
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Cloud computing and distributed systems.
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation theory and applications.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
A Presentation on Artificial Intelligence
PDF
KodekX | Application Modernization Development
PDF
Modernizing your data center with Dell and AMD
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Empathic Computing: Creating Shared Understanding
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Per capita expenditure prediction using model stacking based on satellite ima...
Dropbox Q2 2025 Financial Results & Investor Presentation
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Teaching material agriculture food technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
20250228 LYD VKU AI Blended-Learning.pptx
Machine learning based COVID-19 study performance prediction
The AUB Centre for AI in Media Proposal.docx
Cloud computing and distributed systems.
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation theory and applications.pdf
Approach and Philosophy of On baking technology
A Presentation on Artificial Intelligence
KodekX | Application Modernization Development
Modernizing your data center with Dell and AMD
Agricultural_Statistics_at_a_Glance_2022_0.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto

ASP .NET MVC

  • 1. ASP .NET Model View ControllerUniversity “Al.I.Cuza”, IasiFaculty of Computer ScienceEldorinaAlergusAndreeaJipa
  • 2. The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model
  • 4. the controller. Models. Model objects are the parts of the application that implement the logic for the application's data domain. Often, model objects retrieve and store model state in a database. For example, a Product object might retrieve information from a database, operate on it, and then write updated information back to a Products table in SQL ServerViews are the components that display the application's user interface (UI). Typically, this UI is created from the model data. An example would be an edit view of a Products table that displays text boxes, drop-down lists, and check boxes based on the current state of a Products object.In ASP.NET the view is the set of web pages presented by a web application.
  • 5. Controllers The controller is the object that allows the manipulation of the view. Usually many applications implement Model-Controller tiers that contain the business logic along with the necessary code to manipulate a user interface. In an ASP.NET application the controller is implicitly represented by the code-behind or the server side code that generates the HTML presented to the user.A basic diagram that would help us understand the specific parts that implement the MVC architecture in an ASP.NET application is presented below:
  • 6. How does ASP .NET MVC looks like?
  • 7. ASP .NET MVC project specific directory architectureApp_Data is the physical store for data.
  • 8. Content folder keeps files such as scripts, CSS, images and so on.
  • 9. Controllers folder is the location for controllers. The MVC requires the names of all controller to end with Controller.
  • 10. Models stores classes that handle application business logic.
  • 11. Scripts is the folder for script files. By default, it contains AJAX script files and the JQuery library.
  • 12. Views is the recommended location for views. It my contain .aspx, .ascx, .master and other files that are related to rendering views.Advantages of an MVC-Based Web ApplicationIt makes it easier to manage complexity by dividing an application into the model, the view, and the controller.
  • 13. It does not use view state or server-based forms. This makes the MVC framework ideal for developers who want full control over the behavior of an application.
  • 14. 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.Advantages of an MVC-Based Web ApplicationIt provides better support for test-driven development (TDD).TDD is an evolutionary approach to development which combines test-first development where you write a test before you write just enough production code to fulfill that test and refactoring.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 behaviorPossible problems with ASP .NET MVCProblems may appear when testing the application. Especially the GUI and the code-behind classes in a page controller based model, is very difficult to test because the only way to test something like a button click's code-behind event handler is to click the button itself! This means that if we put more and more code in code-behind classes (which inevitably becomes the case in large web applications with lots of UI controls), we will not be able to run unit tests on the UI code.
  • 15. Possible problems with ASP .NET MVCSo the only way to test the application would be to manually test the GUI. The page controller based design does not support unit testing, and we would not be able to use automated unit testing tools such as NUnit, MBUnit and so on (which we can easily use to test the other layers such as BLL and DAL).