+ All Categories
Home > Documents > MVVM Made Easy Paul D. Sheriff [email protected] .

MVVM Made Easy Paul D. Sheriff [email protected] .

Date post: 04-Jan-2016
Category:
Upload: leo-garrison
View: 214 times
Download: 1 times
Share this document with a friend
Popular Tags:
16
MVVM Made Easy Paul D. Sheriff [email protected] www.pdsa.com DEV216
Transcript
Page 2: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

Paul.About

Paul D. Sheriff ([email protected])President of PDSA, Inc.Author, Speaker, ArchitectCustom Software Development, Developer ToolsSoftware Auditswww.pdsa.com

Developer ToolsHaystack Code Generator

www.CodeHaystack.com.NET Productivity Framework

Page 3: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

Agenda

What is MVVM?Why use MVVM?Demos

Starting with little Data BindingAdd More Data BindingAdd a View Model

Page 4: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

What is MVVM?

Model-View-ViewModelModel = Data ClassView = User InterfaceViewModel (VM)

UI binds to this classVM consumes services of ModelVM may expose services/properties of Model

Page 5: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

What is MVVM?

View knows nothing about ModelModel knows nothing about ViewModel knows nothing about View ModelView Model knows nothing about ViewCommunication from View to VM is via data binding

Lists for List Boxes and GridsIsEnabled properties for ButtonsData for Text Boxes

Page 6: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

Why Use MVVM

Separate UI / Business / Data LogicBe able to swap out UI

Leave business rules/data logic in placeASP.NET to SilverlightWPF to Windows Phoneetc.

Unit TestingWrite less UI code

Page 7: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

Demos

Data Binding ReviewData Binding using ClassSearching SampleViewModel for Add/Edit/Delete screen

Page 8: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

Summary

MVVM is easyJust need an additional classHelps to understand the XAML data binding modelGreat for testing and re-usabilityDon’t worry about being “100% code-behind free”

Page 9: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

Thank You

Sign up for Haystack Webcastshttp://www.pdsa.com/webcasts

Sign up for Paul Sheriff's Inner CircleLifetime membershipOver $2000 worth of ebooks, video, etc.http://www.PaulSheriffInnerCircle.com

Page 10: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

Sample Code

http://www.pdsa.com/TechEdGet Free Silverlight Video

Silverlight XAML for the Complete Novice - Part 1

** Haystack Special **Special Price: $499Use Code: TECHED12Valid until: 08/01/12

Page 11: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

DEV Track Resources

Visual Studio Home Page :: http://www.microsoft.com/visualstudio/en-us

Jason Zander’s Blog :: http://blogs.msdn.com/b/jasonz/

Facebook :: http://www.facebook.com/visualstudio

Twitter :: http://twitter.com/#!/visualstudio

Somasegar’s Blog :: http://blogs.msdn.com/b/somasegar/

Page 12: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

Resources

Connect. Share. Discuss.

http://northamerica.msteched.com

Learning

Microsoft Certification & Training Resources

www.microsoft.com/learning

TechNet

Resources for IT Professionals

http://microsoft.com/technet

Resources for Developers

http://microsoft.com/msdn

Page 13: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

Complete an evaluation on CommNet and enter to win!

Page 14: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

MS Tag

Scan the Tagto evaluate thissession now onmyTechEd Mobile

Page 15: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to

be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS

PRESENTATION.

Page 16: MVVM Made Easy Paul D. Sheriff PSheriff@pdsa.com .

Recommended