Smart Client Architecture and Design Guide

Smart Client Architecture and Design Guide

Smart Client Architecture and Design Guide Foreword by Mark Boulter Smart Client Architecture and Design Guide patterns & practices David Hill, Microsoft Corporation Brenton Webster, Microsoft Corporation Edward A. Jezierski, Microsoft Corporation Srinath Vasireddy, Microsoft Corporation Mo Al-Sabt, Microsoft Corporation Blaine Wastell, Ascentium Corporation Jonathan Rasmusson, ThoughtWorks Paul Gale, ThoughtWorks Paul Slater, Wadeware LLC Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and 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, copyrights, or other intellectual property. © 2004 Microsoft Corporation. All rights reserved. Microsoft, MS-DOS, Windows, Windows NT, Windows Server, Active Directory, BizTalk, InfoPath, MSDN, Outlook, Visual Basic, Visual C++, Visual C#, Visual Studio, and Win32 are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners. Contents Foreword vii Chapter 1 Introduction 1 What Is a Smart Client?............................................... 1 Rich Client Applications.............................................. 2 Thin Client Applications.............................................. 2 Smart Client Applications............................................ 3 Types of Smart Clients................................................ 7 Windows Smart Client Applications ..................................... 8 Office Smart Client Applications........................................ 8 Mobile Smart Client Applications...................................... 10 Choosing Between Smart Clients and Thin Clients ........................... 10 Smart Client Architectural Challenges.................................... 11 Scope of This Guide ................................................. 13 How to Use This Guide............................................... 13 Who Should Read This Guide........................................... 14 Prerequisites .................................................... 14 Chapter Outlines .................................................... 14 Chapter 1: Introduction ............................................. 14 Chapter 2: Handling Data ........................................... 15 Chapter 3: Getting Connected ........................................ 15 Chapter 4: Occasionally Connected Smart Clients ......................... 15 Chapter 5: Security Considerations .................................... 15 Chapter 6: Using Multiple Threads ..................................... 15 Chapter 7: Deploying and Updating Smart Client Applications ................. 16 Chapter 8: Smart Client Application Performance .......................... 16 Summary......................................................... 16 More Information................................................... 16 Chapter 2 Handling Data 17 Types of Data...................................................... 18 Read-Only Reference Data ........................................... 18 Transient Data................................................... 19 Caching Data...................................................... 19 The Caching Application Block........................................ 22 Data Concurrency................................................... 24 iv Smart Client Architecture and Design Guide Using ADO.NET DataSets to Manage Data ................................. 25 Merging Data with Datasets.......................................... 26 Increasing the Performance of Datasets................................. 26 Windows Forms Data Binding........................................... 27 Windows Forms Data Binding Architecture ............................... 28 Binding Data to Windows Forms Controls ................................ 30 Summary......................................................... 37 Chapter 3 Getting Connected 39 Loosely Coupled and Tightly Coupled Systems .............................. 39 Communication Options............................................... 40 .NET Enterprise Services............................................ 40 .NET Remoting................................................... 42 Message Queuing................................................. 44 Web Services.................................................... 45 Choosing a Communication Option....................................... 47 Designing Connected Smart Client Applications ............................. 48 Use Coarse-Grained, Encapsulated Messages ............................ 48 Avoid Distributed ACID Transactions.................................... 48 Avoid Sending Datasets Across the Network.............................. 49 Break Up Large Datasets............................................ 49 Version Your Web Services and Assemblies .............................. 49 Summary......................................................... 50 Chapter 4 Occasionally Connected Smart Clients 51 Common Occasionally Connected Scenarios................................ 52 Occasionally Connected Design Strategies ................................. 53 The Data-Centric Approach........................................... 55 The Service-Oriented Approach....................................... 57 Designing Occasionally Connected Smart Client Applications Using a Service-Oriented Approach..................................... 59 Favoring Asynchronous Communication ................................. 59 Minimizing Complex Network Interactions................................ 60 Adding Data Caching Capabilities...................................... 61 Managing Connections ............................................. 62 Designing Store-and-Forward Mechanisms ............................... 64 Managing Data and Business Rule Conflicts.............................. 65 Interacting with CRUD-Like Web Services................................ 71 Using a Task-Based Approach.......................................... 72 Handling Dependencies............................................... 73 Summary......................................................... 77 Contents v Chapter 5 Security Considerations 79 Authentication...................................................... 80 Smart Client Authentication Scenarios .................................. 80 Choosing the Right Authentication Model ................................ 83 Network Access Authentication Types................................... 84 Gathering and Validating User Credentials ............................... 89 Authentication Guidelines ........................................... 91 Authorization....................................................... 92 Types of Authorization.............................................. 92 Adding Authorization Capabilities to Your Application........................ 94 Authorization Guidelines............................................ 95 Authorizing Functionality When the Client Is Offline ......................... 96 The Authorization and Profile Application Block ............................ 97 Input Validation ..................................................... 97 Handling Sensitive Data.............................................. 98 Determining Which Data to Store on the Client............................ 99 Techniques for Protecting Sensitive Data ............................... 100 Code Access Security ............................................... 102 Code Access Security Permission Resolution ............................ 104 Designing for Code Access Security ................................... 105 Summary........................................................ 112 Chapter 6 Using Multiple Threads 113 Multithreading in the .NET Framework ................................... 113 Choosing Between Synchronous and Asynchronous Calls ................... 114 Choosing Between Foreground and Background Threads .................... 114 Handling Locking and Synchronization ................................. 115 Using Timers.................................................... 116 When to Use Multiple Threads ......................................... 117 Communicating Over a Network...................................... 118 Performing Local Operations........................................ 118 Distinguishing Tasks of Varying Priority................................. 119 Application Startup..............................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    212 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us