SlideShare a Scribd company logo
1 of 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.

More Related Content

Similar to 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 to 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
 

More from Ayesha Maqsood

More from 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
 

Recently uploaded

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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 

Recently uploaded (20)

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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 

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.