View
50
Download
0
Category
Preview:
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
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, MCPDOWNER – CODE NINJA INC.CUSTOM CODE, CUSTOM TRAININGALSO, SOME LEGOS
TWITTER: @CHRISMCLEANBLOG: HTTP://CODENINJAINC.COMCHRIS.MCLEAN@CODENINJAINC.COM
Where did these come from?• MVC – Smalltalk , 1970s, Xerox PARC
• MVP – C++, Taligent 1990s
• MVVM – Microsoft, C#, 2000s
• *** Reindeer Flotilla Setec Astronomy
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. ****
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
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
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
* 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
Recommended