SlideShare a Scribd company logo
Using MVVM inside MVC
Yashar-Aliabbasi
What is MVC?
› Is an architectural pattern commonly used for developing user interfaces that
divides an application into three interconnected parts. This is done to separate
internal representations of information from the ways information is presented to
and accepted from the user. The MVC design pattern decouples these major
components allowing for efficient code reuse and parallel development. (1)
What is MVVM?
› MVVM facilitates a separation of development of the graphical user interface –
be it via a markup language or GUI code – from development of the business
logic or back-end logic (the data model).(2)
What is MVVM? - Continue
› MVVM is written for Desktop application with Data Binding capabilities
– XAML And The INotifyPropertyChanged interface
› But today web applications with power of JavaScript’s powerful libraries like
Angular and Vue.js, can bind data back in server with controls in front of user.
(3)
MVVM inside MVC
› If we suppose Model And View are for MVC and ViewModel is for MVVM then we
can combine MVVM and MVC together successfully
Borrowed From MVVMBorrowed From MVC
So where is Controller?
› For making sending and receiving data from/to View we need Controller come to
stage.
View
Controlle
r
VM
Model
Business
So…What?
› As we know front-end is where our customer encounter our system (Soft Part Of App)
› On other hand back-end is where business happens and so many changes occurs there (Hard Part Of App)
› For transforming Hard part to Soft part we need some intermediate means
› ViewModel(VM) is what can transform this data
• Transferring Dates
• 2017/12/02 → Last year
• null → No date available
• Hiding View Concerns from Model Concerns and vice versa
• View Concerns samples → UX/UI and Data Type Handling And Viewing
• Model Concerns → Validations, Relations
• Model Representation
• Often is different than you work back in your logic → list of grades must shown as one average
• View’s Data
• Often passing by extra data that is needed in Controller → request data, state data, session data and so on
• Sometime we need combine more than one Model to show result to user
• Minimize Code in View
• Having less code in Views is always better!
• Encapsulate logic interaction from View
• Decoupling Domain from MVC
• Converting to/from Business Entities happen inside VM
• Creating View platform independent
Further topics
› ViewModelLocator
› UI/UX & VM
› Data Binding Using Client Side Libraries (Like Angular and Vue.js)
References:
1. https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
2. https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel
3. https://www.tutorialspoint.com/mvvm/mvvm_introduction.htm
THANK YOU
› Any question?

More Related Content

What's hot

MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
Prem Sanil
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
Emily Bauman
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
Wayne Tun Myint
 
Mvc pattern and implementation in java fair
Mvc   pattern   and implementation   in   java fairMvc   pattern   and implementation   in   java fair
Mvc pattern and implementation in java fairTech_MX
 
Model View Controller(MVC)
Model View Controller(MVC)Model View Controller(MVC)
Model View Controller(MVC)
Himanshu Chawla
 
Model Binding in ASP.NET MVC
Model Binding in ASP.NET MVCModel Binding in ASP.NET MVC
Model Binding in ASP.NET MVC
Barry Dorrans
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
M Ahsan Khan
 
MVC - In Details
MVC - In DetailsMVC - In Details
MVC - In Details
Mollah Nayeem Ahmed
 
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
Aaron Nordyke
 
Access.net presentation
Access.net presentationAccess.net presentation
Access.net presentation
Waleed AlZoghby
 
بالعربي التطور في البرمجة باستخدام ال .Net
بالعربي التطور في البرمجة باستخدام ال .Netبالعربي التطور في البرمجة باستخدام ال .Net
بالعربي التطور في البرمجة باستخدام ال .Net
Mohamed Galal
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails Developers
Edureka!
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
Ni
 
Discussion About Microservices Architecture
Discussion About Microservices ArchitectureDiscussion About Microservices Architecture
Discussion About Microservices Architecture
Ralph Osmond Rimorin
 
N-Tier, Layered Design, SOA
N-Tier, Layered Design, SOAN-Tier, Layered Design, SOA
N-Tier, Layered Design, SOA
Sperasoft
 

What's hot (20)

Mvc, mvp, mvvm...
Mvc, mvp, mvvm...Mvc, mvp, mvvm...
Mvc, mvp, mvvm...
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
 
Mvc pattern and implementation in java fair
Mvc   pattern   and implementation   in   java fairMvc   pattern   and implementation   in   java fair
Mvc pattern and implementation in java fair
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 
MVC Framework
MVC FrameworkMVC Framework
MVC Framework
 
Model View Controller(MVC)
Model View Controller(MVC)Model View Controller(MVC)
Model View Controller(MVC)
 
Model Binding in ASP.NET MVC
Model Binding in ASP.NET MVCModel Binding in ASP.NET MVC
Model Binding in ASP.NET MVC
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
 
MVC - In Details
MVC - In DetailsMVC - In Details
MVC - In Details
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
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
 
Access.net presentation
Access.net presentationAccess.net presentation
Access.net presentation
 
بالعربي التطور في البرمجة باستخدام ال .Net
بالعربي التطور في البرمجة باستخدام ال .Netبالعربي التطور في البرمجة باستخدام ال .Net
بالعربي التطور في البرمجة باستخدام ال .Net
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails Developers
 
Mvc devan
Mvc devanMvc devan
Mvc devan
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
 
Discussion About Microservices Architecture
Discussion About Microservices ArchitectureDiscussion About Microservices Architecture
Discussion About Microservices Architecture
 
N-Tier, Layered Design, SOA
N-Tier, Layered Design, SOAN-Tier, Layered Design, SOA
N-Tier, Layered Design, SOA
 

Similar to Using mvvm inside mvc in domain driven design

Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
Mudasir Qazi
 
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?
Mike Brown
 
Models used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVMModels used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVM
Andrei Popa
 
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
OnGraph Technologies Pvt. Ltd.
 
mvc development company in UK
mvc development company in UKmvc development company in UK
mvc development company in UK
Techrishblogger
 
mvc development company in UK.
mvc development company in UK.mvc development company in UK.
mvc development company in UK.
Techrishblogger
 
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
Mvc vs mvp vs mvvm  a guide on architecture presentation patternsMvc vs mvp vs mvvm  a guide on architecture presentation patterns
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
Concetto Labs
 
Joe Ulyatt MVC Lecture
Joe Ulyatt MVC LectureJoe Ulyatt MVC Lecture
Joe Ulyatt MVC Lecture
ssuser7e32f9
 
mvc development company in UK
mvc development company in UK mvc development company in UK
mvc development company in UK
Techrishblogger
 
mvc development company in UK
mvc development company in UK mvc development company in UK
mvc development company in UK
Techrishblogger
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
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
IRJET Journal
 
Knockout js
Knockout jsKnockout js
Modern webtechnologies
Modern webtechnologiesModern webtechnologies
Modern webtechnologies
Besjan Xhika
 
mvc development company in UK
mvc development company in UK mvc development company in UK
mvc development company in UK
Techrishblogger
 
MVC.pptx
MVC.pptxMVC.pptx
MVC.pptx
HassanAliKhan36
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
alkuzaee
 
A study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application developmentA study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application developmentIAEME Publication
 
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOSSoftware architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Jinkyu Kim
 

Similar to Using mvvm inside mvc in domain driven design (20)

Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
 
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?
 
J2 ee archi
J2 ee archiJ2 ee archi
J2 ee archi
 
Models used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVMModels used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVM
 
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
 
mvc development company in UK
mvc development company in UKmvc development company in UK
mvc development company in UK
 
mvc development company in UK.
mvc development company in UK.mvc development company in UK.
mvc development company in UK.
 
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
Mvc vs mvp vs mvvm  a guide on architecture presentation patternsMvc vs mvp vs mvvm  a guide on architecture presentation patterns
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
 
Joe Ulyatt MVC Lecture
Joe Ulyatt MVC LectureJoe Ulyatt MVC Lecture
Joe Ulyatt MVC Lecture
 
mvc development company in UK
mvc development company in UK mvc development company in UK
mvc development company in UK
 
mvc development company in UK
mvc development company in UK mvc development company in UK
mvc development company in UK
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
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
 
Knockout js
Knockout jsKnockout js
Knockout js
 
Modern webtechnologies
Modern webtechnologiesModern webtechnologies
Modern webtechnologies
 
mvc development company in UK
mvc development company in UK mvc development company in UK
mvc development company in UK
 
MVC.pptx
MVC.pptxMVC.pptx
MVC.pptx
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
A study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application developmentA study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application development
 
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOSSoftware architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
 

Recently uploaded

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 

Recently uploaded (20)

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 

Using mvvm inside mvc in domain driven design

  • 1. Using MVVM inside MVC Yashar-Aliabbasi
  • 2. What is MVC? › Is an architectural pattern commonly used for developing user interfaces that divides an application into three interconnected parts. This is done to separate internal representations of information from the ways information is presented to and accepted from the user. The MVC design pattern decouples these major components allowing for efficient code reuse and parallel development. (1)
  • 3. What is MVVM? › MVVM facilitates a separation of development of the graphical user interface – be it via a markup language or GUI code – from development of the business logic or back-end logic (the data model).(2)
  • 4. What is MVVM? - Continue › MVVM is written for Desktop application with Data Binding capabilities – XAML And The INotifyPropertyChanged interface › But today web applications with power of JavaScript’s powerful libraries like Angular and Vue.js, can bind data back in server with controls in front of user. (3)
  • 5. MVVM inside MVC › If we suppose Model And View are for MVC and ViewModel is for MVVM then we can combine MVVM and MVC together successfully Borrowed From MVVMBorrowed From MVC
  • 6. So where is Controller? › For making sending and receiving data from/to View we need Controller come to stage. View Controlle r VM Model Business
  • 7. So…What? › As we know front-end is where our customer encounter our system (Soft Part Of App) › On other hand back-end is where business happens and so many changes occurs there (Hard Part Of App) › For transforming Hard part to Soft part we need some intermediate means › ViewModel(VM) is what can transform this data
  • 8. • Transferring Dates • 2017/12/02 → Last year • null → No date available • Hiding View Concerns from Model Concerns and vice versa • View Concerns samples → UX/UI and Data Type Handling And Viewing • Model Concerns → Validations, Relations • Model Representation • Often is different than you work back in your logic → list of grades must shown as one average • View’s Data • Often passing by extra data that is needed in Controller → request data, state data, session data and so on • Sometime we need combine more than one Model to show result to user
  • 9. • Minimize Code in View • Having less code in Views is always better! • Encapsulate logic interaction from View • Decoupling Domain from MVC • Converting to/from Business Entities happen inside VM • Creating View platform independent
  • 10. Further topics › ViewModelLocator › UI/UX & VM › Data Binding Using Client Side Libraries (Like Angular and Vue.js)
  • 12. THANK YOU › Any question?