SlideShare una empresa de Scribd logo
1 de 4
Enterprise Resource Planning
© Departmentof Information Technology, University Of The Punjab, Gujranwala
Campus. 1
University of the Punjab
Gujranwala Campus
Name: Ayesha Maqsood
Roll No: BT14013
Class: BS-IT 7th
SEM (M)
Assignment: MVC, MVP and MVVM
Submitted To: Sir Zahid Mughal
Enterprise Resource Planning
© Departmentof Information Technology, University Of The Punjab, Gujranwala
Campus. 2
Difference between MVC, MVP and MVVM
MVC, MVP and MVVM are most popular design patterns where MVC stands for Model-
View-Controller, MVP stands for Model-View-Presenter and MVVC stands for Model-View-
ViewModel. All these design patterns help developing applications that are loosely coupled, easy
to test and maintain.
MVC Design Pattern:
MVC design patterns divides application into three major aspects: Model, View and
Controller.
Model: represents collection of classes that define business logics i.e. business model and
data model. It also defines business rules for data as how a data can be altered or
manipulated.
View: represents User Interface components like HTML, CSS, jQuery etc. It displays the
data coming from controller as outcome. This also changes model in user interface.
Controller: It acts as bridge between model and view and processes incoming request from
user. It gets request from user via the View, then process user’s data through Model, and
passing back the result to View.
Properties:
 Input is directed at the controller first, not the view.
 There is one-to-many relationship between the Controller. That’s because a single
controller may select different views to be rendered based on the operation being executed.
 There is one way arrow from Controller to View. This is because the view doesn’t have
any knowledge of or reference to the Controller.
 The controller does pass back the Model, so there is knowledge between the View and the
expected Model being passed into it, but not the Controller serving it up.
 It limited support to Unit testing.
 It uses where the connection between view and the rest of program is not always available.
 There is loose coupling between Model and the View.
Enterprise Resource Planning
© Departmentof Information Technology, University Of The Punjab, Gujranwala
Campus. 3
 This pattern is used by well-known frameworks such as Ruby on Rails, Apple iOS
Development, ASP.NET MVC, etc.
MVP Design Pattern:
The MVP stands for Model-View-Presenter, this pattern is similar to the MVC pattern,
wherein the controller is replaced by the presenter. This pattern divides an application into three
major aspects: Model, View, and Presenter.
Model: The Model represents a collection of classes that explains the business model and
the data model. It also defines the business rules for data means as how the data can be
altered and manipulated.
View: The View represents the UI components like CSS, jQuery, html etc. It is only
responsible for displaying the data that is received from the presenter as the result. This
also transforms the model(s) into UI.
Presenter: The Presenter is responsible for handling all UI events on behalf of the view.
This receive input from users via the View, then process the user's data with the help of
Model and passing the results back to the View. Unlike view and controller, view and
presenter are completely decoupled from each other’s and communicate to each other’s by
an interface.
Properties:
 The input begins with the view, not the Presenter.
 There is one-to-one mapping between the view and the associated presenter means one
View is mapped to one Presenter.
 The view holds a reference to the Presenter. The presenter is also reacting to events
triggered from the View, so its aware of the View its associated with.
 The Presenter updates the view based on the requested action it performs on the Model,
but the View is not Model aware.
 It highly supports Unit testing.
 It uses where binding via a data context is not possible.
 View is more loosely coupled to the model. The presenter is responsible for binding the
model to the view.
 This pattern is used by frameworks such as for ASP.NET Web Forms applications.
Enterprise Resource Planning
© Departmentof Information Technology, University Of The Punjab, Gujranwala
Campus. 4
MVVM Design Pattern:
MVVM stands for Model-View-View Model. This pattern supports two-way data binding
between view and View model. This enables automatic propagation of changes, within the state of
view model to the View. Typically, the view model uses the observer pattern to notify changes in
the view model to model. This pattern divides an application into three major aspects: Model,
View, and View-Model.
Model: The Model represents a collection of classes that explains the business model and
the data model. It also defines the business rules for data means as how the data can be
altered and manipulated.
View: The View represents the UI components like CSS, jQuery, html etc. It is only
responsible for displaying the data that is received from the presenter as the result. This
also transforms the model(s) into UI.
View-Model: The View Model is responsible for exposing methods, commands, and other
properties that helps to maintain the state of the view, manipulate the model as the result
of actions on the view, and trigger events in the view itself.
Properties:
 Input begins with the view, not View Model.
 There is many-to-one relationship between View and View Model means many view can
be mapped to one View Model.
 View has no idea about the Model in MVVM pattern, this is because, as far as the View
knows, it Model is the ‘View Model’ (hence its name).
 There is rich communication between the View and View Model, isolating the View from
having to know anything about what’s really happening behind the scenes.
 It goes hand-in-hand with Unit testing.
 It uses where binding via a data context is possible.
 MVVM promotes separate concerns between view, user interaction logic, behavior and
model that leads to its loose coupling. By this, you can easily replace view without affecting
View Model.
 This pattern is used by frameworks such as WPF, Caliburn, Silverlight, nRoute, and more.

Más contenido relacionado

Similar a Mvc, mvp & mvvm (erp)

MVVM presentation
MVVM presentationMVVM presentation
MVVM presentationInova LLC
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMMudasir Qazi
 
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and WorkingIRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and WorkingIRJET Journal
 
MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )Ahmed Emad
 
Android DesignArchitectures.pptx
Android DesignArchitectures.pptxAndroid DesignArchitectures.pptx
Android DesignArchitectures.pptxSafnaSaff1
 
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.pptxQuickwayInfoSystems3
 
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.pptxQuickwayInfoSystems3
 
Code Camp 06 Model View Presenter Architecture
Code Camp 06   Model View Presenter ArchitectureCode Camp 06   Model View Presenter Architecture
Code Camp 06 Model View Presenter Architecturebitburner93
 
mvc development company in UK.
mvc development company in UK.mvc development company in UK.
mvc development company in UK.Techrishblogger
 
Mvvw patterns
Mvvw patternsMvvw patterns
Mvvw patternseleksdev
 
Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Shubham Goenka
 
Design patterns in android
Design patterns in androidDesign patterns in android
Design patterns in androidZahra Heydari
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobilenaral
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC StructureDipika Wadhvani
 

Similar a Mvc, mvp & mvvm (erp) (20)

MVVM presentation
MVVM presentationMVVM presentation
MVVM presentation
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
 
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and WorkingIRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
 
MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )
 
Android DesignArchitectures.pptx
Android DesignArchitectures.pptxAndroid DesignArchitectures.pptx
Android DesignArchitectures.pptx
 
Design pattern
Design patternDesign pattern
Design pattern
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Mvc, mvp, mvvm...
Mvc, mvp, mvvm...Mvc, mvp, mvvm...
Mvc, mvp, mvvm...
 
MVC in PHP
MVC in PHPMVC in PHP
MVC in PHP
 
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
 
Lecture10 oopj
Lecture10 oopjLecture10 oopj
Lecture10 oopj
 
Code Camp 06 Model View Presenter Architecture
Code Camp 06   Model View Presenter ArchitectureCode Camp 06   Model View Presenter Architecture
Code Camp 06 Model View Presenter Architecture
 
mvc development company in UK.
mvc development company in UK.mvc development company in UK.
mvc development company in UK.
 
Mvvw patterns
Mvvw patternsMvvw patterns
Mvvw patterns
 
Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)
 
Design patterns in android
Design patterns in androidDesign patterns in android
Design patterns in android
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
 
Mvc Architecture in a web based application
Mvc Architecture in a web based applicationMvc Architecture in a web based application
Mvc Architecture in a web based application
 

Más de Ayesha Maqsood

Más de Ayesha Maqsood (6)

T-SQL & Triggers
T-SQL & TriggersT-SQL & Triggers
T-SQL & Triggers
 
online privacy
online privacyonline privacy
online privacy
 
Child labor in Pakistan
Child labor in PakistanChild labor in Pakistan
Child labor in Pakistan
 
Perception
PerceptionPerception
Perception
 
Frame relay
Frame relayFrame relay
Frame relay
 
Precis writing
Precis writingPrecis writing
Precis writing
 

Último

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Mvc, mvp & mvvm (erp)

  • 1. Enterprise Resource Planning © Departmentof Information Technology, University Of The Punjab, Gujranwala Campus. 1 University of the Punjab Gujranwala Campus Name: Ayesha Maqsood Roll No: BT14013 Class: BS-IT 7th SEM (M) Assignment: MVC, MVP and MVVM Submitted To: Sir Zahid Mughal
  • 2. Enterprise Resource Planning © Departmentof Information Technology, University Of The Punjab, Gujranwala Campus. 2 Difference between MVC, MVP and MVVM MVC, MVP and MVVM are most popular design patterns where MVC stands for Model- View-Controller, MVP stands for Model-View-Presenter and MVVC stands for Model-View- ViewModel. All these design patterns help developing applications that are loosely coupled, easy to test and maintain. MVC Design Pattern: MVC design patterns divides application into three major aspects: Model, View and Controller. Model: represents collection of classes that define business logics i.e. business model and data model. It also defines business rules for data as how a data can be altered or manipulated. View: represents User Interface components like HTML, CSS, jQuery etc. It displays the data coming from controller as outcome. This also changes model in user interface. Controller: It acts as bridge between model and view and processes incoming request from user. It gets request from user via the View, then process user’s data through Model, and passing back the result to View. Properties:  Input is directed at the controller first, not the view.  There is one-to-many relationship between the Controller. That’s because a single controller may select different views to be rendered based on the operation being executed.  There is one way arrow from Controller to View. This is because the view doesn’t have any knowledge of or reference to the Controller.  The controller does pass back the Model, so there is knowledge between the View and the expected Model being passed into it, but not the Controller serving it up.  It limited support to Unit testing.  It uses where the connection between view and the rest of program is not always available.  There is loose coupling between Model and the View.
  • 3. Enterprise Resource Planning © Departmentof Information Technology, University Of The Punjab, Gujranwala Campus. 3  This pattern is used by well-known frameworks such as Ruby on Rails, Apple iOS Development, ASP.NET MVC, etc. MVP Design Pattern: The MVP stands for Model-View-Presenter, this pattern is similar to the MVC pattern, wherein the controller is replaced by the presenter. This pattern divides an application into three major aspects: Model, View, and Presenter. Model: The Model represents a collection of classes that explains the business model and the data model. It also defines the business rules for data means as how the data can be altered and manipulated. View: The View represents the UI components like CSS, jQuery, html etc. It is only responsible for displaying the data that is received from the presenter as the result. This also transforms the model(s) into UI. Presenter: The Presenter is responsible for handling all UI events on behalf of the view. This receive input from users via the View, then process the user's data with the help of Model and passing the results back to the View. Unlike view and controller, view and presenter are completely decoupled from each other’s and communicate to each other’s by an interface. Properties:  The input begins with the view, not the Presenter.  There is one-to-one mapping between the view and the associated presenter means one View is mapped to one Presenter.  The view holds a reference to the Presenter. The presenter is also reacting to events triggered from the View, so its aware of the View its associated with.  The Presenter updates the view based on the requested action it performs on the Model, but the View is not Model aware.  It highly supports Unit testing.  It uses where binding via a data context is not possible.  View is more loosely coupled to the model. The presenter is responsible for binding the model to the view.  This pattern is used by frameworks such as for ASP.NET Web Forms applications.
  • 4. Enterprise Resource Planning © Departmentof Information Technology, University Of The Punjab, Gujranwala Campus. 4 MVVM Design Pattern: MVVM stands for Model-View-View Model. This pattern supports two-way data binding between view and View model. This enables automatic propagation of changes, within the state of view model to the View. Typically, the view model uses the observer pattern to notify changes in the view model to model. This pattern divides an application into three major aspects: Model, View, and View-Model. Model: The Model represents a collection of classes that explains the business model and the data model. It also defines the business rules for data means as how the data can be altered and manipulated. View: The View represents the UI components like CSS, jQuery, html etc. It is only responsible for displaying the data that is received from the presenter as the result. This also transforms the model(s) into UI. View-Model: The View Model is responsible for exposing methods, commands, and other properties that helps to maintain the state of the view, manipulate the model as the result of actions on the view, and trigger events in the view itself. Properties:  Input begins with the view, not View Model.  There is many-to-one relationship between View and View Model means many view can be mapped to one View Model.  View has no idea about the Model in MVVM pattern, this is because, as far as the View knows, it Model is the ‘View Model’ (hence its name).  There is rich communication between the View and View Model, isolating the View from having to know anything about what’s really happening behind the scenes.  It goes hand-in-hand with Unit testing.  It uses where binding via a data context is possible.  MVVM promotes separate concerns between view, user interaction logic, behavior and model that leads to its loose coupling. By this, you can easily replace view without affecting View Model.  This pattern is used by frameworks such as WPF, Caliburn, Silverlight, nRoute, and more.