9
MVC vs MVP vs MVVM NO ONE IN THE WORLD EVER GETS WHAT THEY WANT AND THAT IS BEAUTIFUL*

MVC vs MVP vs MVVM

  • Upload
    orpah

  • View
    50

  • Download
    0

Embed Size (px)

DESCRIPTION

MVC vs MVP vs MVVM. No one in the world Ever gets what they want And that is beautiful*. Chris McLean. He’z just zis guy you know** MCT, MCPD Owner – Code Ninja Inc. Custom code, Custom Training Also, Some legos. Twitter: @ chrismclean Blog: http://codeninjainc.com - PowerPoint PPT Presentation

Citation preview

Page 1: MVC  vs  MVP  vs  MVVM

MVC vs MVP vs MVVM

NO ONE IN THE WORLD EVER GETS WHAT THEY WANT AND THAT IS BEAUTIFUL*

Page 2: MVC  vs  MVP  vs  MVVM

Chris McLean

HE’Z JUST ZIS GUY YOU KNOW**MCT, MCPDOWNER – CODE NINJA INC.CUSTOM CODE, CUSTOM TRAININGALSO, SOME LEGOS

Page 3: MVC  vs  MVP  vs  MVVM

TWITTER: @CHRISMCLEANBLOG: HTTP://[email protected]

Page 4: MVC  vs  MVP  vs  MVVM

Where did these come from?• MVC – Smalltalk , 1970s, Xerox PARC

• MVP – C++, Taligent 1990s

• MVVM – Microsoft, C#, 2000s

• *** Reindeer Flotilla Setec Astronomy

Page 5: MVC  vs  MVP  vs  MVVM

MVC

Controller Model View

No Databinding Used mainly in HTML Variations in strength of Controler & View. Then let's head on down into that cellar and carve ourselves a

witch. ****

Page 6: MVC  vs  MVP  vs  MVVM

MVP• Data Binding

• Interfaces

• Variations in strength of Presenters & View

• No. I just like to read the T.V. Guide. Read the T.V. Guide, you don't need a t.v. *****

• UI interactions

• Databound

View

• Controls view

• Mediates Model

Presenter • Just the facts

• No ui

Model

Page 7: MVC  vs  MVP  vs  MVVM

MVVM• Data Binding!!!

• Each layer is an adapter for the layer below.

• XAML / HTML can allow for ‘empty’ Views with next to no code behind.

• Big Kahuna Burger. That's that Hawaiian burger joint. I hear they got some tasty burgers. I ain't never had one myself. How are they? *6

View - UI

VM - Adapter

Model – Just the facts

Page 8: MVC  vs  MVP  vs  MVVM

Other common patternsTANSTAAFL *7

COMMAND IOC

• Databound to model

• Updates it’s state based on Model

• Allows for multiple UI bits to call the same chunk of code

• Think Ribbon Button + Pop Up menu + Keyboard Shortcut

• Inversion of Control

• Allows for loser binding between layers of a pattern

Page 9: MVC  vs  MVP  vs  MVVM

* Don’t Lets Start – TMBG ‘86.** Gag Halfrunt, Zaphod Beeblebrox’s brain care specialist.*** Reindeer Flotilla – Kevin Flynn’s password in TRON, Setec Astronomy – Code name for crypto breaker in Sneakers.**** Ash – Evil Dead 2***** Grandpa – Lost Boys*6 – Jules Winnfield, Pulp Fiction *7 – There Ain’t No Such Thing As A Free Lunch – Robert Heinlein, The Moon Is A Harsh Mistress