Composite Application Guidance for WPF Composite Application Guidance for WPF
Total Page:16
File Type:pdf, Size:1020Kb
•••••• •••••• •••••• •••••• Composite Application Guidance for WPF Composite Application Guidance for WPF patterns & practices Information in this document, including URL and other Internet Web site refer- ences, is subject to change without notice. Unless otherwise noted, the companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted in examples herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copy- rights, or other intellectual property. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Server, Windows Vista, Expression Blend, MSDN, Visual C#, and Visual Studio are trademarks of the Microsoft group of companies. All other trademarks are property of their respective owners. Part # X15-19255 Contents Forewords ix Foreword by Ian Ellison-Taylor . ix Foreword by Brian Noyes . x Authors and Contributors xi Chapter 1: Introduction 1 Welcome . 1 Intended Audience . 1 Composite Application Guidance Assets . 2 Exploring the Documentation . 2 Community . 4 Overview of the Composite Application Guidance for WPF . 4 Application Development Challenges . 4 The Composite Approach . 5 Architectural Goals and Principles . 7 Adoption Experience . 8 Concerns Not Addressed by the Composite Application Guidance . 9 Considerations for Choosing the Composite Application Guidance . 9 Guidelines for Choosing Composite UI Deliverables from patterns & practices . 10 Comparing to the Composite UI Application Block . 11 Chapter 2: Design Concepts 13 UI Composition . 13 Layout . 14 Commanding . 17 Eventing . 18 Modularity . 20 Designing a Modular System . 21 Container . 22 Using the Container . 24 Considerations for Using the Container . 25 iv Composite Application Guidance for WPF Chapter 3: Patterns in the Composite Application Library 27 Pattern Overview . 28 Composite and Composite View . 28 Separated Interface and Plug-In . 30 Inversion of Control . 30 Service Locator . 31 Command . 31 Adapter . 31 Event Aggregator . 32 Separated Presentation . 32 Façade . 32 More Information . .33 Dependency Injection Pattern . 34 Problem . 34 Forces . 35 Solution . 35 Liabilities . 37 Related Patterns . 37 More Information . 37 Inversion of Control Pattern . 38 Problem . 38 Forces . 39 Solution . 39 Implementation Details . 39 Liabilities . 41 Related Patterns . 41 More Information . 41 Service Locator Pattern . 42 Problem . 42 Forces . 42 Solution . 43 Liabilities . 44 Related Patterns . 44 More Information . .45 Separated Presentation Pattern . 45 Problem . 45 Forces . 45 Solution . 45 Liabilities . 46 Related Patterns . 46 More Information . 47 Table of Contents v Supervising Controller Pattern . 47 Problem . 47 Forces . 47 Solution . 47 Liabilities . 49 Related Patterns . 49 More Information . .49 Presentation Model Pattern . 50 Problem . 50 Forces . 50 Solution . 50 Liabilities . 52 Related Patterns . 52 More Information . .52 Chapter 4: Composite Application Library 53 System Requirements . 54 Composite Application Library Baseline Architecture . 55 When to Use the Composite Application Library . 57 A New Application Based on the Composite Application Library . 58 Define the Shell . 59 Create the Bootstrapper . 59 Create the Module . 61 Add a Module View to the Shell . 61 Goals and Benefits . 61 Architectural Goals . 61 Design Goals . 62 Benefits . 63 Organization of the Composite Application Library ..