SlideShare a Scribd company logo
Seminar
On
MVC
Created By
Dipika Wadhvani
What is MVC
Introduction
 Model View Controller or MVC as it is
popularly called, is a software design pattern
for developing web applications.
 MVC is one of three ASP.NET programming
models.
 Model–view–controller (MVC) is a software
architecture pattern which separates the
representation of information from the user's
interaction with it .
History of MVC
 Presented by Trygve Reenskaug in 1979
 First used in the Smalltalk-80 framework
 Used in making Apple interfaces (Lisa and Macintosh
MVC uses
Smalltalk’s MVC implementation inspired
many other GUI frameworks such as:
 The NEXTSTEP and OPENSTEP
development environments encourage the
use of MVC.
 Cocoa and GNUstep, based on these
technologies, also use MVC.
 Microsoft Foundation Classes (MFC) (also
called Document/View architecture)
 Java Swing
 The Qt Toolkit (since Qt4 Release).
Parts of MVC
 A Model View Controller pattern is made
up of the following three parts:
 Model
 View 
 Controller
The MVC model defines web
applications with 3 logic
layers:
The business layer (Model
logic)
The display layer (View logic)
The input control (Controller
logic)
Ppt of Basic MVC Structure
Model
 The model is responsible for managing the
data of the application.
 It responds to the request from the view
and it also responds to instructions from
the controller to update itself
 It is the lowest level of the pattern which
is responsible for maintaining data.
 The Model represents the application core
(for instance a list of database records).
 It is also called the domain layer
View
 The View displays the data (the database records).
 A view requests information from the model, that it needs to generate an
output representation.
 It presents data in a particular format like JSP, ASP, PHP.
 MVC is often seen in web applications, where the view is the HTML page.
Controller
 The Controller is the part of the application that
handles user interaction.
 Typically controllers read data from a view, control user
input, and send input data to the model.
 It handles the input, typically user actions and may
invoke changes on the model and view.
Workflow in MVC
Though MVC comes in di erent flavours, theff
control flow generally works as follows:
1. The user interacts with the user interface in
some way (e.g., user presses a button)
2. A controller handles the input event from the
user interface, often via a registered handler or
callback.
3. The controller accesses the model, possibly
updating it in a way appropriate to the user’s
action (e.g., controller updates user’s shopping
cart).
4. A view uses the model to generate an appropriate user interface (e.g., view
produces a screen listing the shopping cart contents).
The view gets its own data from the model. The model has no direct
knowledge of the view.
5. The user interface waits for further user interactions, which begins the
cycle anew.
Dependence hierarchy
 There is usually a kind of hierarchy in the MVC pattern.
 The Model knows only about itself.
 That is, the source code of the Model has no references
to either the View or Controller.
 The View however, knows about the Model. It will poll the Model about
the state, to know what to display.
 That way, the View can display something that is based on what the Model
has done.
 But the View knows nothing about the Controller.
 The Controller knows about both the Model and
the View.
  Take an example from a game: If you click on
the "fire" button on the mouse, the Controller
knows what fire function in the Model to call.
 If you press the button for switching between
first and third person, the Controller knows
what function in the View to call to request the
display change.
Why dependence hierarchy is used?
 The reason to keep it this way is to minimize dependencies.
 No matter how the View class is modified, the Model will still work.
 Even if the system is moved from a desktop operating system to a smart
phone, the Model can be moved with no changes.
 But the View probably needs to be updated, as will the Controller.
Use in web applications
 Although originally developed for personal
computing, Model View Controller has been
widely adapted as an architecture for World
Wide Web applications in all major programming
languages.
 Several commercial and
noncommercial application frameworks have
been created that enforce the pattern.
 These frameworks vary in their interpretations,
mainly in the way that the MVC responsibilities
are divided between the client and server
 Early web MVC frameworks took a thin
client approach that placed almost the entire
model, view and controller logic on the
server.
 In this approach, the client sends either
hyperlink requests or form input to the
controller and then receives a complete and
updated web page from the view; the model
exists entirely on the server.
 As client technologies have matured,
frameworks such as JavaScript
MVC and Backbone have been created that
allow the MVC components to execute partly
on the client
Working of MVC in web
application
Web forms vs. MVC
 The MVC programming model is a lighter alternative to
traditional ASP.NET (Web Forms).
 It is a lightweight, highly testable framework,
integrated with all existing ASP.NET features, such as
Master Pages, Security, and Authentication.
Advantages
 Clear separation between presentation logic and
business logic.
 Each object in mvc have distinct responsibilities.
 parallel development
 easy to maintain and future enhancements
 All objects and classes are independent of each other.
Disadvantages
 Increased complexity
 Inefficiency of data access in view
 Difficulty of using MVC with modern user interface too.
 For parallel development there is a needed multiple
programmers.
 Knowledge on multiple technologies is required. 
Example
 The Observer pattern allows the BankAccount class to
notify multiple views without minimal information.
 Observers can register themselves with their Subjects.
No strings attached!
Observer Class Diagram
Observable
+addObserver(Observer)
+deleteObserver(Observer)
+notifyObservers(Object)
#hasChanged() : boolean
#setChanged()
Observer
+update(Observable,
Object)
AccountView
+update(Observable,
Object)
BankAccount
+widthdraw(double) : long
+deposit(double) : long
+getBalance() : double
SummaryView
+update(Observable,
Object)
Transactions Happen!
Controller BankAccount AccountView SummaryView
deposit()
setChanged()
notifyObservers()
update()
update()
getBalance()
getBalance()
Thank You..!!!

More Related Content

What's hot (20)

PPT
What Is Php
AVC
 
PPTX
Design Pattern - MVC, MVP and MVVM
Mudasir Qazi
 
PPT
MVC ppt presentation
Bhavin Shah
 
PPTX
Workshop spring session 2 - La persistance au sein des applications Java
Antoine Rey
 
PPTX
Asp.net MVC training session
Hrichi Mohamed
 
PPTX
Angular
Mahmoud Nbet
 
PPTX
Introduction to Angularjs
Manish Shekhawat
 
PPTX
Component lifecycle hooks in Angular 2.0
Eyal Vardi
 
PDF
Asp.net mvc basic introduction
Bhagath Gopinath
 
PPT
WPF
Vishwa Mohan
 
PPTX
MVC Framework
Ashton Feller
 
PPTX
MVVM ( Model View ViewModel )
Ahmed Emad
 
PDF
MVC architecture
Emily Bauman
 
PPT
ASP .net MVC
Divya Sharma
 
PPT
Introduction To PHP
Shweta A
 
PDF
ASP.NET Core MVC with EF Core code first
Md. Aftab Uddin Kajal
 
PPTX
Apresentação mvc
leopp
 
PPTX
Solid principles
Monica Rodrigues
 
PPTX
ASP.NET MVC Presentation
Volkan Uzun
 
What Is Php
AVC
 
Design Pattern - MVC, MVP and MVVM
Mudasir Qazi
 
MVC ppt presentation
Bhavin Shah
 
Workshop spring session 2 - La persistance au sein des applications Java
Antoine Rey
 
Asp.net MVC training session
Hrichi Mohamed
 
Angular
Mahmoud Nbet
 
Introduction to Angularjs
Manish Shekhawat
 
Component lifecycle hooks in Angular 2.0
Eyal Vardi
 
Asp.net mvc basic introduction
Bhagath Gopinath
 
MVC Framework
Ashton Feller
 
MVVM ( Model View ViewModel )
Ahmed Emad
 
MVC architecture
Emily Bauman
 
ASP .net MVC
Divya Sharma
 
Introduction To PHP
Shweta A
 
ASP.NET Core MVC with EF Core code first
Md. Aftab Uddin Kajal
 
Apresentação mvc
leopp
 
Solid principles
Monica Rodrigues
 
ASP.NET MVC Presentation
Volkan Uzun
 

Viewers also liked (20)

PDF
ITFT- Applet in java
Atul Sehdev
 
PPT
Java applet
Arati Gadgil
 
PPTX
Java Programming- Introduction to Java Applet Programs
Trinity Dwarka
 
PPTX
6.applet programming in java
Deepak Sharma
 
PPT
Java swing
Nataraj Dg
 
PPTX
Applet java
Jorge Luis Tinoco
 
PPT
Java Swing
Shraddha
 
PDF
java swing tutorial for beginners(java programming tutorials)
Daroko blog(www.professionalbloggertricks.com)
 
PPT
Java applets
lopjuan
 
PPT
Applet life cycle
myrajendra
 
PPT
java swing
vannarith
 
PDF
MVC Seminar Presantation
Abhishek Yadav
 
ODP
Why Use MVC?
Jesse Anderson
 
PPT
Why MVC?
Wayne Tun Myint
 
PPS
Java applets
Srinath Dhayalamoorthy
 
PPTX
Applet progming
VIKRANTHMALLIKARJUN
 
PPTX
Android ppt
Prasadbharatiyudu
 
PPTX
Java Swing
Komal Gandhi
 
PPT
Swing components & MVC Architecture
Dhrumil Patel
 
ITFT- Applet in java
Atul Sehdev
 
Java applet
Arati Gadgil
 
Java Programming- Introduction to Java Applet Programs
Trinity Dwarka
 
6.applet programming in java
Deepak Sharma
 
Java swing
Nataraj Dg
 
Applet java
Jorge Luis Tinoco
 
Java Swing
Shraddha
 
java swing tutorial for beginners(java programming tutorials)
Daroko blog(www.professionalbloggertricks.com)
 
Java applets
lopjuan
 
Applet life cycle
myrajendra
 
java swing
vannarith
 
MVC Seminar Presantation
Abhishek Yadav
 
Why Use MVC?
Jesse Anderson
 
Why MVC?
Wayne Tun Myint
 
Applet progming
VIKRANTHMALLIKARJUN
 
Android ppt
Prasadbharatiyudu
 
Java Swing
Komal Gandhi
 
Swing components & MVC Architecture
Dhrumil Patel
 
Ad

Similar to Ppt of Basic MVC Structure (20)

PPT
Mvc 130330091359-phpapp01
Jennie Gajjar
 
ODP
Mvc
abhigad
 
DOCX
IntroductionToMVC
Akhil Mittal
 
PDF
MVC in PHP
Vineet Kumar Saini
 
PPT
MVC(Model View Controller),Web,Enterprise,Mobile
naral
 
PDF
Task 2 - Educational Article – Model View Controller (MVC)
Shubham Goenka
 
PPT
Web engineering - MVC
Nosheen Qamar
 
PPTX
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
QuickwayInfoSystems3
 
PPTX
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
QuickwayInfoSystems3
 
PDF
MVC
Ravi Bansal
 
PDF
Mvc Architecture in a web based application
OnGraph Technologies Pvt. Ltd.
 
PPTX
Model View Controller ext4
Pankaj Avhad
 
PPT
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
PPTX
ASP .NET MVC
eldorina
 
PDF
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
CrimsonpublishersPRSP
 
PPT
Code Camp 06 Model View Presenter Architecture
bitburner93
 
PPTX
Technoligent providing custom ASP.NET MVC development services
Aaron Jacobson
 
ODP
Model View Controller
Madhukar Kumar
 
PPTX
Asp.net c# MVC-5 Training-Day-1 of Day-9
AHM Pervej Kabir
 
Mvc 130330091359-phpapp01
Jennie Gajjar
 
Mvc
abhigad
 
IntroductionToMVC
Akhil Mittal
 
MVC in PHP
Vineet Kumar Saini
 
MVC(Model View Controller),Web,Enterprise,Mobile
naral
 
Task 2 - Educational Article – Model View Controller (MVC)
Shubham Goenka
 
Web engineering - MVC
Nosheen Qamar
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
QuickwayInfoSystems3
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
QuickwayInfoSystems3
 
Mvc Architecture in a web based application
OnGraph Technologies Pvt. Ltd.
 
Model View Controller ext4
Pankaj Avhad
 
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
ASP .NET MVC
eldorina
 
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
CrimsonpublishersPRSP
 
Code Camp 06 Model View Presenter Architecture
bitburner93
 
Technoligent providing custom ASP.NET MVC development services
Aaron Jacobson
 
Model View Controller
Madhukar Kumar
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
AHM Pervej Kabir
 
Ad

Recently uploaded (20)

PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 

Ppt of Basic MVC Structure

  • 3. Introduction  Model View Controller or MVC as it is popularly called, is a software design pattern for developing web applications.  MVC is one of three ASP.NET programming models.  Model–view–controller (MVC) is a software architecture pattern which separates the representation of information from the user's interaction with it .
  • 4. History of MVC  Presented by Trygve Reenskaug in 1979  First used in the Smalltalk-80 framework  Used in making Apple interfaces (Lisa and Macintosh
  • 5. MVC uses Smalltalk’s MVC implementation inspired many other GUI frameworks such as:  The NEXTSTEP and OPENSTEP development environments encourage the use of MVC.  Cocoa and GNUstep, based on these technologies, also use MVC.  Microsoft Foundation Classes (MFC) (also called Document/View architecture)  Java Swing  The Qt Toolkit (since Qt4 Release).
  • 6. Parts of MVC  A Model View Controller pattern is made up of the following three parts:  Model  View   Controller
  • 7. The MVC model defines web applications with 3 logic layers: The business layer (Model logic) The display layer (View logic) The input control (Controller logic)
  • 9. Model  The model is responsible for managing the data of the application.  It responds to the request from the view and it also responds to instructions from the controller to update itself  It is the lowest level of the pattern which is responsible for maintaining data.  The Model represents the application core (for instance a list of database records).  It is also called the domain layer
  • 10. View  The View displays the data (the database records).  A view requests information from the model, that it needs to generate an output representation.  It presents data in a particular format like JSP, ASP, PHP.  MVC is often seen in web applications, where the view is the HTML page.
  • 11. Controller  The Controller is the part of the application that handles user interaction.  Typically controllers read data from a view, control user input, and send input data to the model.  It handles the input, typically user actions and may invoke changes on the model and view.
  • 12. Workflow in MVC Though MVC comes in di erent flavours, theff control flow generally works as follows: 1. The user interacts with the user interface in some way (e.g., user presses a button) 2. A controller handles the input event from the user interface, often via a registered handler or callback. 3. The controller accesses the model, possibly updating it in a way appropriate to the user’s action (e.g., controller updates user’s shopping cart).
  • 13. 4. A view uses the model to generate an appropriate user interface (e.g., view produces a screen listing the shopping cart contents). The view gets its own data from the model. The model has no direct knowledge of the view. 5. The user interface waits for further user interactions, which begins the cycle anew.
  • 14. Dependence hierarchy  There is usually a kind of hierarchy in the MVC pattern.  The Model knows only about itself.  That is, the source code of the Model has no references to either the View or Controller.
  • 15.  The View however, knows about the Model. It will poll the Model about the state, to know what to display.  That way, the View can display something that is based on what the Model has done.  But the View knows nothing about the Controller.
  • 16.  The Controller knows about both the Model and the View.   Take an example from a game: If you click on the "fire" button on the mouse, the Controller knows what fire function in the Model to call.  If you press the button for switching between first and third person, the Controller knows what function in the View to call to request the display change.
  • 17. Why dependence hierarchy is used?  The reason to keep it this way is to minimize dependencies.  No matter how the View class is modified, the Model will still work.  Even if the system is moved from a desktop operating system to a smart phone, the Model can be moved with no changes.  But the View probably needs to be updated, as will the Controller.
  • 18. Use in web applications  Although originally developed for personal computing, Model View Controller has been widely adapted as an architecture for World Wide Web applications in all major programming languages.  Several commercial and noncommercial application frameworks have been created that enforce the pattern.  These frameworks vary in their interpretations, mainly in the way that the MVC responsibilities are divided between the client and server
  • 19.  Early web MVC frameworks took a thin client approach that placed almost the entire model, view and controller logic on the server.  In this approach, the client sends either hyperlink requests or form input to the controller and then receives a complete and updated web page from the view; the model exists entirely on the server.  As client technologies have matured, frameworks such as JavaScript MVC and Backbone have been created that allow the MVC components to execute partly on the client
  • 20. Working of MVC in web application
  • 21. Web forms vs. MVC  The MVC programming model is a lighter alternative to traditional ASP.NET (Web Forms).  It is a lightweight, highly testable framework, integrated with all existing ASP.NET features, such as Master Pages, Security, and Authentication.
  • 22. Advantages  Clear separation between presentation logic and business logic.  Each object in mvc have distinct responsibilities.  parallel development  easy to maintain and future enhancements  All objects and classes are independent of each other.
  • 23. Disadvantages  Increased complexity  Inefficiency of data access in view  Difficulty of using MVC with modern user interface too.  For parallel development there is a needed multiple programmers.  Knowledge on multiple technologies is required. 
  • 24. Example  The Observer pattern allows the BankAccount class to notify multiple views without minimal information.  Observers can register themselves with their Subjects. No strings attached!
  • 25. Observer Class Diagram Observable +addObserver(Observer) +deleteObserver(Observer) +notifyObservers(Object) #hasChanged() : boolean #setChanged() Observer +update(Observable, Object) AccountView +update(Observable, Object) BankAccount +widthdraw(double) : long +deposit(double) : long +getBalance() : double SummaryView +update(Observable, Object)
  • 26. Transactions Happen! Controller BankAccount AccountView SummaryView deposit() setChanged() notifyObservers() update() update() getBalance() getBalance()