140 likes | 378 Views
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
E N D
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 Chris.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 • 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. *****
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
Other common patternsTANSTAAFL *7 Command IOC Inversion of Control Allows for loser binding between layers of a pattern • 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
* Don’t Lets Start – TMBG ‘86.** Gag Halfrunt, ZaphodBeeblebrox’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