Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF

You're reading from   MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF If you're using Silverlight and WPF, then employing the MVVM pattern can make a powerful difference to your projects, reducing code and bugs in one. This book is an invaluable resource for serious developers.

Arrow left icon
Product type Paperback
Published in Aug 2012
Publisher Packt
ISBN-13 9781849683425
Length 490 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (21) Chapters Close

MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF
Credits
Foreword
About the Authors
About the Reviewer
www.PacktPub.com
Preface
1. Presentation Patterns FREE CHAPTER 2. Introduction to MVVM 3. Northwind – Foundations 4. Northwind—Services and Persistence Ignorance 5. Northwind—Commands and User Inputs 6. Northwind—Hierarchical View Model and IoC 7. Dialogs and MVVM 8. Workflow-based MVVM Applications 9. Validation 10. Using Non-MVVM Third-party Controls 11. MVVM Application Performance MVVM Frameworks
Binding at a Glance Index

Index

A

  • AddControlsToWindow() method / Helpers
  • Aggregate Model / Adding persistence ignorance
  • application blocks / Enterprise library validation application block
  • application layer
    • updating / Application layer
  • Application Model / History
  • async binding / Async binding
  • asynchronous binding
    • about / Asynchronous binding
  • asynchronous View Model
    • constructing / Asynchronous View Model construction
  • Attached Behavior pattern
    • about / Event to command, Attached Behavior
  • attached behaviors
    • about / Attached behaviors
    • using / Using attached behaviors
  • autonomous view / Monolithic Project Billing sample

B

  • Back button / readonly CLR properties (with no change notification support)
  • BackgroundWorker
    • about / Using BackgroundWorker
    • using / Using BackgroundWorker
    • benefits / Using BackgroundWorker
  • Behavior / Attached behavior pattern
  • binding
    • basics / Basics
  • Binding.StringFormat [SF] / Binding.StringFormat [SF]
  • Binding.UpdateSourceTrigger / Binding.UpdateSourceTrigger
  • binding reflector
    • using / Using binding reflector
  • boolean parameter / readonly CLR properties (with no change notification support)
  • business object / Data service stub
  • Button.Command property / Gestures, events, and commands

C

  • CanGoBack property / readonly CLR properties (with no change notification support)
  • Changed event / Using attached behaviors
  • Code
    • about / Code
    • ProjectsModel / ProjectsModel
    • ProjectViewModel / ProjectViewModel
    • ProjectsViewModel / ProjectsViewModel
    • WPF UI / WPF UI
    • Silverlight UI / Silverlight UI
  • code behind for ListBox.MouseDoubleClick
    • steps / Using code behind
  • command
    • about / Commands
    • using / Commands
  • Completed event handler / Using WorkflowApplication
  • complex business rules
    • about / Complex business rules
  • Composite Root / IoC best practices, Adding an IoC container to Northwind
  • Constructor Dependency Inject / Unit testing getting customers
  • Content Model / Adding orders to customer details
  • Context Menu / Attached behaviors
  • Controller, MVC Project Billing sample
    • about / Controller
  • control templates
    • about / Control Templates
  • Converter [C] / Converter [C]
  • customer-centric / Adding a Service Layer
  • customer details
    • viewing / Viewing details for one customer
    • CustomerDetailsViewModel, testing / Testing CustomerDetailsViewModel
    • updating / Updating customer details
    • testing / Testing and updating customer details
    • orders, adding / Adding orders to customer details
  • customer list box
    • wiring / Wiring up the customer list box
    • ShowCustomerDetails(), testing / Testing ShowCustomerDetails()
  • customers
    • listing / Listing the customers
    • unit testing / Unit testing getting customers
    • isolation framework, using / Using an isolation framework
    • isolation framework, benefits / Using an isolation framework

D

  • data access tier
    • about / Data access tier
  • data binding
    • about / Rich data binding
    • binding source / Rich data binding
    • binding target / Rich data binding
    • ObservableCollection<> / INotifyCollectionChanged and ObservableCollection<>
    • INotifyCollectionChanged / INotifyCollectionChanged and ObservableCollection<>
    • automatic dispatching / Automatic dispatching
  • DataContext
    • code, executing / Executing code in DataContext
  • DataContext property / Asynchronous View Model construction
  • DataContext[DC]
    • binding to / Binding to DataContext[DC]
  • DataDirectory attribute / Adding a Service Layer
  • data templates
    • about / Data templates
  • delays, handling
    • WorkflowInvoker, using / Using WorkflowInvoker in background thread
    • WorkflowApplication, using / Using WorkflowApplication
  • dependency injection / Data service stub
  • Dependency Injection(DI) / Adding unit tests
  • Dependency Inversion / Service Locator anti-pattern
  • dependency properties
    • Silverlight / Dependency Properties
    • WPF / Dependency Properties
    • about / Dependency Properties
    • registering / Dependency property inheritance
    • data context / Data context
    • attached behavior pattern / Attached behavior pattern
  • DependencyProperty / RAD Project Billing sample, Validations and dependency properties, Using binding reflector
  • design by contract / Poor testability
  • DetailsUpdated event / View
  • Dialog service
    • about / Dialog service
    • DataTemplates, using / Using DataTemplates with DialogService
    • convention, creating / Convention over configuration
  • DisableDetails() method / Helpers
  • Domain model / MVC with layered design
  • domain object / Data service stub
  • dynamic keyword / Using .NET 4.0 dynamic
  • dynamic resource / Dynamic resource

E

  • ElementName / ElementName
  • EnableControls() function / View
  • EqualTo methods / Adding an IoC container to Northwind
  • EquipmentOperator property / Providing a summary validation error
  • Error notifications
    • about / Error notifications, Error message box
    • Error message box / Error message box
    • fields, highlighting / Highlighting fields
  • Error templates
    • about / Error templates
  • EventBehaviourFactory class / Attached Behavior
  • event handlers, MVP Project Billing sample
    • about / Event handlers
    • ProjectsComboBox_SelectionChanged() / Event handlers
  • event handlers, presenter
    • about / Event handlers
  • event handlers, ProjectsView / Event handlers
  • event throttling / Event Throttling
  • EventTrigger property / MVVM Light

F

  • finalizer / Memory leaks
  • Finish button / WF for controlling application flow
  • frameworks
    • about / Making it easier with frameworks

G

  • Gang of Four [GOF] pattern / Using MVVM adapters
  • garbage collector / Memory leaks
  • generated models
    • trade-offs / Trade-offs of generated models
  • Google home page / Using attached behaviors

H

  • helpers, MVC Project Billing sample
    • MainWindow / Helpers
  • helpers, presenter
    • SetEstimateColor() / Helpers
  • Hierarchical View Model / Adding tabs
  • Hyperlink_Click method / Pure MVVM

I

  • ICommand property / Providing a summary validation error, Using attached behaviors
  • ICommandSource interface / Gestures, events, and commands
  • IDataErrorInfo
    • about / IDataErrorInfo
    • validation states / Validation states
    • limitation / Limitations and gotchas
    / IDataErrorInfo
  • Imports tab / Using WorkflowInvoker in background thread
  • INotifyCollectionChanged / INotifyCollectionChanged and ObservableCollection<>
  • INotifyDataErrorInfo
    • about / INotifyDataErrorInfo
    / INotifyDataErrorInfo [.net 4.5]
  • InputBindings
    • about / InputBindings
    • KeyBinding / KeyBinding
    • MouseBinding / MouseBinding
  • InvokeMethod activity / WF for controlling application flow
  • IoC
    • framework / Inversion of Control frameworks
    / Asynchronous View Model construction
  • IoC container
    • adding, to Northwind / Adding an IoC container to Northwind
    • order details, showing / Order details
  • IoC framework
    • about / Inversion of Control frameworks
    • designs / IoC designs
    • service Locator anti-pattern / Service Locator anti-pattern
    • best practices / IoC best practices
  • IProjectsModel.ProjectUpdated event / Event handlers, ProjectsModel
  • IsShowOrderWizard property / Attached behaviors
  • issues, monolithic design
    • about / The problems with monolithic design
    • code maintenance / Code maintenance
    • code structure / Code structure
    • code testability / Code testability
  • IToolManager.Open tool / Adding an IoC container to Northwind
  • IWebBrowserAdapter interface / Using MVVM adapters

K

  • KeyBinding / KeyBinding

L

  • layered design
    • presentation layer / Presentation layer
    • business layer / Business layer
    • data layer / Data layer
  • Lazy Initialization
    • about / Lazy Initialization
  • Linq / Public methods
  • Linq to Entities / Data access tier
  • LoadProjects() function / View
  • LoadProjects() method / Helpers
  • Locator / Locator pattern
  • Log Running Hours button / Invalidating multiple fields
  • LogRunningHoursCommand property / IDataErrorInfo
  • lookless controls / Control Templates

M

  • MainPage / MainPage
  • MaxDigit property / Specializing validation rules—supporting parameters
  • mediators
    • about / Mediators
    • issues / Mediators
  • Memento / WF for business rules execution
  • Memento Pattern / Testing and updating customer details
  • method injection / Adding an IoC container to Northwind
  • Microsoft Expression Blend SDK / Using MVVM Light
  • Model
    • about / Model, Model
    • IProjectsModel interface / Model
  • Model, MVC Project Billing sample
    • about / Model
  • Model, MVP Project Billing sample
    • about / Model
  • Model 2 / Controller
  • model_ProjectUpdated() / ProjectsViewModel
  • model_ProjectUpdated() function / Event handlers
  • model_ProjectUpdated function / Event handlers
  • modifier
    • Alt / KeyBinding
    • Ctrl / KeyBinding
    • Shift / KeyBinding
    • Windows / KeyBinding
  • monolithic design
    • about / Monolithic design
    • issues / The problems with monolithic design
  • Monolithic Project Billing sample
    • ProjectsView / ProjectsView
    • running / Running the sample
    • cons, poor testability / Poor testability
    • encapsulation / Poor testability
    • cons, code reuse / Poor extensibility and code reuse
    • cons, poor extensibilty / Poor extensibility and code reuse
  • MouseAction values
    • LeftClick / MouseBinding
    • RightClick / MouseBinding
    • MiddleClick / MouseBinding
    • WheelClick / MouseBinding
    • LeftDoubleClick / MouseBinding
    • RightDoubleClick / MouseBinding
    • MiddleDoubleClick / MouseBinding
  • MouseBinding / MouseBinding
  • MouseDoubleClick event / Attached Behavior
  • MSMQ / Event Throttling
  • MVC
    • about / MVC
    • view / View
    • controller / Controller
    • Model / Model
  • MVC Project Billing sample
    • about / MVC Project Billing sample
    • Model / Model
    • Controller / Controller
    • View / View
    • Initialization / Initialization
    • working / How it works
    • issues / Takeaways
    • memory leaks / Memory leaks
  • MVP
    • about / MVP
    • basic structure / MVP
  • MVP Project Billing sample
    • about / MVP Project Billing sample
    • model / Model
    • View / View
    • presenter / Presenter
    • issues / Takeaways
  • MVVM
    • history / History
    • structure / Structure
    • benefits / Benefits of MVVM
    • humble views / MVVM and humble views
    • issues / Issues and pain points of MVVM
    • Code Plex / MVVM Light
    • about / Pure MVVM
    • enforcement / Pure MVVM
    • code, reducing / Pure MVVM
    • rules / Pure MVVM
    • implementing / Pure MVVM
  • MVVM-based applications
    • validation / Validation in MVVM-based applications
  • MVVM adapters
    • using / Using MVVM adapters
  • MVVMAppLazyInitialization / Lazy Initialization
  • MVVM Light
    • about / MVVM Light
    • using / Using MVVM Light
  • MVVM project billing sample
    • MVVM design / MVVM design
    • View Models / View Models
  • MVVM structure
    • about / Structure
    • Pure MVVM / Pure MVVM
    • View / View
    • View Model / View Model

N

  • .NET 4.0 / WF for business rules execution
  • NavigateUriCommand / Using attached behaviors
  • NavigateUriCommand property / Using attached behaviors
  • NONE_SELECTED property / View
  • Northwind
    • about / Northwind requirements
  • Northwind Traders / Northwind requirements
  • NServiceBus / Event Throttling

O

  • ObjectDataProvider / ObjectDataProvider
  • ObjectDataProvider.IsAsynchronous / ObjectDataProvider.IsAsynchronous
  • ObservableCollection<> / INotifyCollectionChanged and ObservableCollection<>
  • Observer pattern / Initialization
  • OnSourcePagePropertyChanged() method / Using attached behaviors
  • order details
    • viewing / Viewing order details
    • IToolManager / ToolManager
  • OrderRuleService workflow / WF for business rules execution
  • OrderViewModel.Model property / View Models
  • ORM / Data access tier

P

  • paging
    • about / Virtualization and paging
  • Passive View and Supervising Controller / MVP
  • Passive View version / MVP Project Billing sample
  • persisted state / Types of state
  • Persistence ignorance
    • adding / Adding persistence ignorance
    • unit test, adding / Adding unit tests
  • POCOs / Integrating the Service Layer
  • POCO T4 template / Trade-offs of generated models
  • presentational patterns
    • about / History of presentational patterns
    • monolithic design / Monolithic design
    • Monolithic Project Billing sample / Monolithic Project Billing sample
    • RAD / Rapid application development
    • MVC / MVC
    • layered design / Layered design
    • layered design, with MVC / MVC with layered design
    • MVC Project Billing sample / MVC Project Billing sample
    • MVP / MVP
    • MVP Project Billing sample / MVP Project Billing sample
  • presentation layer
    • updating / Presentation layer
    • View Models / View Models
    • Views / Views
  • Presentation Model / History
  • presentation patterns
    • data service stub / Data service stub, Monolithic Project Billing sample
    • main window / Main window
  • presentation tier
    • creating / Presentation tier foundation
    • Locator pattern / Locator pattern
  • presenter, MVC Project Billing sample
    • about / Presenter
    • helpers / Helpers
  • priority binding
    • about / Priority binding
  • PriorityBinding / PriorityBinding
  • Project Billing sample application
    • about / The Project Billing sample application, Types of state
    • state type / Types of state
  • ProjectsView
    • about / ProjectsView
    • initialization / Initialization
    • event handlers / Event handlers
    • helpers / Helpers
  • ProjectUpdated event / View
  • PropertyChanged event / Using WorkflowInvoker in background thread
  • PropertyChanged method / Testing and updating customer details
  • Proxy Property / Adding persistence ignorance
  • public methods, MVC Project Billing sample
    • MainWindow / Public methods
  • public methods, MVP Project Billing sample
    • about / Public methods
    • LoadProjects() / Public methods
  • public methods, View
    • EnableControls() / Public methods
  • Pure MVVM
    • structuring / Pure MVVM

R

  • RAD
    • Project Billing sample / RAD Project Billing sample, Takeaways
  • Reactive Extensions (Rx) / Event Throttling
  • readonly CLR properties
    • about / readonly CLR properties (with no change notification support)
    • .NET 4.0 dynamic, using / Using .NET 4.0 dynamic
  • RelativeSource / RelativeSource
  • RelayCommand / readonly CLR properties (with no change notification support)
  • Repository Pattern / Adding persistence ignorance
  • resource binding
    • static resource / Static resource
    • dynamic resource / Dynamic resource
  • resource dictionary / Error messages in the tooltip
    • error messages, in tooltip / Error messages in the tooltip
    • error messages, besides control / Error messages beside the control
    • validation summary pane / Validation summary pane
    • flip controls / Flip controls
  • resources
    • about / Resources
    • default constructor / Types with default constructor
    • XmlDataProvider / XmlDataProvider
    • ObjectDataProvider / ObjectDataProvider
  • Rhino Mocks 3.5 / Using .NET 4.0 dynamic
  • RunningHours property / Enterprise library validation application block
  • RunValidationLogic method / Using WorkflowInvoker in background thread

S

  • SelectedProjectId property / View
  • SelectedProject property / ProjectsViewModel
  • SelectionChanged event / View
  • Service Contract / Adding a Service Layer
  • Service Layer
    • adding / Adding a Service Layer
    • integrating / Integrating the Service Layer
  • service layer
    • updating / Service layer
  • Service Locator / Service Locator anti-pattern
  • Service Locator pattern / Locator pattern
  • Session state / Types of state
  • session state / Pure MVVM
  • SetEstimateColor() method / Helpers, Helpers
  • SetEstimatedColor() function / View, Public methods
  • SetEstimatedColor() helper function / Event handlers
  • ShowDialog() method / Using DataTemplates with DialogService
  • Show Dialog button / Mediators
  • Silverlight UI
    • about / Silverlight UI
    • assemblies, porting to Silverlight / Porting assemblies to Silverlight
    • ProjectsView / ProjectsView
    • MainPage / MainPage
  • Singleton / Adding an IoC container to Northwind
  • SOA / Adding a Service Layer
  • SOLID design principles / Code testability
  • SourcePage property / Using attached behaviors
  • source updating
    • Binding.UpdateSourceTrigger / Binding.UpdateSourceTrigger
    • Binding.DelayTopicn [.net 4.5] [Binding.Mode*TwoWay / OneWayToSource / Binding.Delay: [.net 4.5] [Binding.Mode:TwoWay / OneWayToSource ]
    • Mode [Binding.Mode] [TTopicnTarget, STopicnSource / Mode [Binding.Mode] [T:Target, S:Source]
  • state types, Project Billing sample application
    • View stateTopicn UI state / Types of state
    • session state / Types of state
    • Persisted state / Types of state
  • STAThread attribute / ProjectsView
  • static properties/fields / Static properties/fields
  • static resource / Static resource
  • styles
    • about / Styles
  • Submit button / Using WorkflowInvoker in background thread
  • SubmitOrderCommand / WF for business rules execution
  • system configuration
    • targeting / Targeting system configuration

T

  • Table Module / Trade-offs of generated models
  • Table module / MVC with layered design
  • tabs
    • adding / Adding tabs
  • Target property / Using binding reflector
  • TextBlock property / Asynchronous binding
  • ToString() method / Basics
  • transaction script / MVC with layered design, Adding a Service Layer
  • triggers
    • about / Triggers
    • property triggers / Triggers
    • data triggers / Triggers
    • event triggers / Triggers
    • view logic / Triggers
    • uses / Triggers

U

  • Unit of Work (UoW) / Adding persistence ignorance, WF for business rules execution
  • UpdateDetails() function / View
  • UpdateDetails() method / Helpers
  • UpdateProject() function / View, Public methods
  • UpdateProjects() method / ProjectsViewModel
  • UpdateSourceTrigger property / IDataErrorInfo
  • UpdateSourceTriggers property / Validation mechanism in WPF and Silverlight
  • UpdateState() method / Validation states
  • UriConverter
    • defining / Using binding reflector

V

  • Validate method / Using WorkflowInvoker in background thread, Using WorkflowApplication
  • ValidateProperty method / INotifyDataErrorInfo
  • ValidatePropertySpecialized method / INotifyDataErrorInfo
  • Validation
    • Rules / ValidationRules
    • IDataErrorInfo / IDataErrorInfo
    • INotifyDataErrorInfo / INotifyDataErrorInfo [.net 4.5]
    • Enterprise Library 5.0 Validation Application Block / Enterprise Library 5.0 Validation Application Block
    • Windows WF / Windows WF
    • .ErrorTemplate / Validation.ErrorTemplate
  • validation, MVVM-based applications
    • about / Validation in MVVM-based applications
  • validation application block
    • about / Enterprise library validation application block
    • options / Enterprise library validation application block
  • ValidationRule / ValidationRules
  • validation rules, MVVM-based applications
    • about / Validation rules
    • using / Using validation rules
    • specializing / Specializing validation rules—supporting parameters
    • converters / Validation rules and converters
    • mechanism / Validation mechanism in WPF and Silverlight
  • validation states
    • summary validation error, providing / Providing a summary validation error
    • multiple fields, invalidating / Invalidating multiple fields
  • ValidationStep property / Validation rules and converters, Validation mechanism in WPF and Silverlight
  • View / View
  • View, MVC Project Billing sample
    • about / View
    • initialization / Initialization
    • event handlers / Event handlers
    • helpers / Helpers
    • MainWindow / MainWindow
  • View, MVP Project Billing sample
    • about / View, View
    • event handlers / Event handlers
  • View Model Locator / Locator pattern
  • View Models
    • about / View Models
    • ProjectsViewModel / ProjectsViewModel
    • ProjectViewModel / ProjectViewModel
  • View state*UI state / Types of state
  • virtualization
    • about / Virtualization and paging
  • Visual Tree / RAD Project Billing sample

W

  • weak event pattern / Memory leaks
  • WebBrowser control / readonly CLR properties (with no change notification support)
  • Welcome property / Mediators
  • WF
    • for business rules execution / WF for business rules execution
    • for application flow control / WF for controlling application flow
  • WF, for application flow control
    • about / WF for controlling application flow
    • order, creating / WF for controlling application flow
    • state machine workflow, adding / WF for controlling application flow
    • bookmarks, using / WF for controlling application flow
  • WF, for business rules execution
    • about / WF for business rules execution
    • delays, handling / Handling delays in rules execution
  • Window.Close() method / Attached behaviors
  • Windows WF / Windows WF
  • WMI / Targeting system configuration
  • WPF
    • about / WPF and Silverlight enablers
  • WPF UI
    • about / WPF UI
    • ProjectsView / ProjectsView
    • MainWindow / MainWindow

X

  • XmlDataProvider / XmlDataProvider
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime