Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Building Enterprise Applications with Windows® Presentation Foundation and the Model View ViewModel Pattern
Introduction
Who Should Read this Book
Assumptions
Organization of This Book
Finding Your Best Starting Point in This Book
Conventions and Features in This Book
System Requirements
Code Samples
Installing the Code Samples
Using the Code Samples
Acknowledgments
Errata and Book Support
We Want to Hear from You
Stay in Touch
1. Introduction to Model View ViewModel and Line of Business Applications
The Model View ViewModel Pattern
Line of Business Applications
Choosing the Right Technology
Silverlight or WPF?
Microsoft’s UI-Building Tools
Expression Blend
Microsoft Sketchflow
Composition of a LOB User Interface
The Menubar
The Toolbar
The Tooltip (and Its Abuse)
Notifications and Alerts
The Ribbon Bar
General Style and Control Considerations
Separation of Concerns
Layers, Tiers, and Services
Summary
2. Design Patterns
An Overview of Design Patterns
Classifying Design Patterns
Creational Patterns
Structural Patterns
Behavioral Patterns
UI Design Patterns
The MVC Pattern
Pros and Cons of the MVC Pattern
The MVP Pattern
Pros and Cons of the MVP Pattern
Alternative Approaches to MVP
The PM Pattern and MVVM
MVVM Pros and Cons
Advanced Design Patterns and Techniques
The Inversion of Control Pattern
Microsoft Unity
Dependency Injection with Unity
Service Locator with Unity
The Managed Extensibility Framework
Differences Between MEF and Unity
DSLs: Writing Fluent Code
Writing a Fluent Interface in C#
Introduction to TDD
A TDD Example
Tools for Unit Testing
Available Resources for TDD
Summary
3. The Domain Model
Introduction to Domain-Driven Design
DDD Terminology
Analyzing the CRM Domain
Domain Entity and Data Transfer Object
The POCO Object and the O/RM
Development Approaches of a Domain
Transaction Script
Database-Driven Approach
Domain-Driven Approach
How To Create an Object In DDD
Factory Patterns
Domain Entities Validation
Classic Validation
Validation Using Attributes and Data Annotations
Available Validation Frameworks
Unit Test the Domain Model
Sample Code: The CRM Domain Model
The Person Context
The Order Domain
Summary
4. The Data Access Layer
Introduction
The Database and Stored Procedures
Choosing an O/RM
Microsoft Entity Framework
NHibernate
Other O/RMs for .NET
The Unit of Work
Lifecycle of a UoW
Identify a Business Transaction
The Repository Pattern
Test-Driven Development: The Data Layer
Building a Distributed Data Layer with RIA and WCF
Sample Code: The CRM Data Access Layer
A Flexible IUnitOfWork Interface
Mapping the Domain Model Using Entity Framework
Creating a Concrete DAL for Entity Framework
Mapping the Domain Using NHibernate
Getting the Tools
The UnitOfWork and the ISession
The Repository
Summary
5. The Business Layer
Introduction
A Business Rule Is Not a Validation Rule
Business Rules by Service
The Facade Pattern
Business Rules by Workflow with WF 4.0
Different Ways of Running a Workflow
WorkFlowInvoker
Pros and Cons of the WorkflowInvoker
WorkflowApplication and WCF
AppFabric and the WCF Execution
Pros and Cons of WorkflowApplication
Third-Party Toolkits
Technologies for the Data Validation
Rule Engine and Business Rule Engine
InRule for .NET
Business Layer Considerations
When Do I Need to Create a Business Layer?
Bad BLL Habits
Sample Code: The Business Service Layer
Data Validation with the Enterprise Library 5.0
A Generic Workflow Engine
Service for Business Transactions
Summary
6. The UI Layer with MVVM
Introduction to the MVVM Pattern
The View
Blendability: A Dummy ViewModel
The Model
The Command in WPF and Silverlight
A Workaround: An MVVM Command
Re-evaluate ICommand Execution
The ViewModel
The INotifyPropertyChanged Interface
The IDataErrorInfo Interface
DataTemplate in WPF and Silverlight
DataTemplate and MVVM
WeakEvents and Messages
The WeakEvent Pattern
The EventAggregator Pattern
Dialogs and Modal Pop-Ups
Modal View in MVVM
Modal Service
A Mediator Approach
Inversion of Control with MVVM
Sample Code
The Microsoft Office Ribbon and MVVM
Summary
7. MVVM Frameworks and Toolkits
MVVM Toolkits
MVVM Light Toolkit, by Laurent Bugnion
MEFedMVVM
Cinch, by Sacha Barber
MVVM and XAML Facilities
Karl Shifflett’s Tools
XAML Power Toys
XAML Editor
In the Box Tutorial (MVVM)
Radical, by Mauro Servienti
Composite UI Frameworks
Microsoft Prism
Calcium SDK
Caliburn
A. About the Author
Index
About the Author
← Prev
Back
Next →
← Prev
Back
Next →