自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Just Do IT

爱上晨搂

  • 博客(3)
  • 资源 (4)
  • 收藏
  • 关注

原创 delete ,truncate, drop 的不同处

不同点: 1. truncate和 delete只删除数据不删除表的结构(定义) drop语句将删除表的结构被依赖的约束(constrain),触发器(trigger),索引(index); 依赖于该表的存储过程/函数将保留,但是变为invalid状态. 2.delete语句是dml,这个操作会放到rollback segement中,事务提交之后才生效;如果有相应的trigger,执行的时候将被

2005-12-19 10:50:00 698

原创 Java学习从入门到精通 --

一、 JDK (Java Development Kit) JDK 是整个Java的核心,包括了Java运行环境(Java Runtime Envirnment),一堆Java工具和Java基础的类库(rt.jar)。不论什么Java应用服务器实质都是内置了某个版本的JDK。因此掌握 JDK是学好Java的第一步。最主流的JDK是Sun公司发布的JDK,除了Sun之外,还有很多公司和组织都开发了自

2005-06-21 17:22:00 767

原创 成长中必须知道的20个故事

1、断箭    不相信自己的意志,永远也做不成将军。    春秋战国时代,一位父亲和他的儿子出征打战。父亲已做了将军,儿子还只是马前卒。又一阵号角吹响,战鼓雷鸣了,父亲庄严地托起一个箭囊,其中插着一只箭。父亲郑重对儿子说:“这是家袭宝箭,配带身边,力量无穷,但千万不可抽出来。”    那是一个极其精美的箭囊,厚牛皮打制,镶着幽幽泛光的铜边儿,再看露出的箭尾。一眼便能认定用上等的孔雀羽毛制作。儿子喜

2005-06-15 17:04:00 779

.NET Framework Essentials

.NET Framework Essentials is a concise and technical overview of the new Microsoft .NET Framework.<br>Covered here are all of the most important topics—from the underlying Common Language Runtime<br>(CLR) to its speci alized packages for ASP.NET, Web Forms, Windows Forms, XML and data access<br>(ADO.NET). The authors survey each of the major .NET languages, including VB.NET, C# and<br>Managed C++.

2008-05-26

Programming WCF Services

Programming WCF Services--O'Reilly

2008-05-26

Smart Client Architecture

Contents<br>Foreword vii<br>Chapter 1<br>Introduction 1<br>What Is a Smart Client? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br>Rich Client Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2<br>Thin Client Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2<br>Smart Client Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3<br>Types of Smart Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br>Windows Smart Client Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br>Office Smart Client Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br>Mobile Smart Client Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10<br>Choosing Between Smart Clients and Thin Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 10<br>Smart Client Architectural Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br>Scope of This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br>How to Use This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br>Who Should Read This Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br>Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br>Chapter Outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br>Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br>Chapter 2: Handling Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br>Chapter 3: Getting Connected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br>Chapter 4: Occasionally Connected Smart Clients . . . . . . . . . . . . . . . . . . . . . . . . . 15<br>Chapter 5: Security Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br>Chapter 6: Using Multiple Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br>Chapter 7: Deploying and Updating Smart Client Applications . . . . . . . . . . . . . . . . . 16<br>Chapter 8: Smart Client Application Performance . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br>Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br>More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16<br>Chapter 2<br>Handling Data 17<br>Types of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br>Read-Only Reference Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br>Transient Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br>Caching Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br>The Caching Application Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22<br>Data Concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24<br>iv Smart Client Architecture and Design Guide<br>Using ADO.NET DataSets to Manage Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25<br>Merging Data with Datasets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26<br>Increasing the Performance of Datasets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26<br>Windows Forms Data Binding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27<br>Windows Forms Data Binding Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28<br>Binding Data to Windows Forms Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30<br>Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37<br>Chapter 3<br>Getting Connected 39<br>Loosely Coupled and Tightly Coupled Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39<br>Communication Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40<br>.NET Enterprise Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40<br>.NET Remoting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42<br>Message Queuing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44<br>Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45<br>Choosing a Communication Option. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47<br>Designing Connected Smart Client Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48<br>Use Coarse-Grained, Encapsulated Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48<br>Avoid Distributed ACID Transactions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48<br>Avoid Sending Datasets Across the Network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49<br>Break Up Large Datasets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49<br>Version Your Web Services and Assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49<br>Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50<br>Chapter 4<br>Occasionally Connected Smart Clients 51<br>Common Occasionally Connected Scenarios. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52<br>Occasionally Connected Design Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53<br>The Data-Centric Approach. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55<br>The Service-Oriented Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57<br>Designing Occasionally Connected Smart Client Applications<br>Using a Service-Oriented Approach. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59<br>Favoring Asynchronous Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59<br>Minimizing Complex Network Interactions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br>Adding Data Caching Capabilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61<br>Managing Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62<br>Designing Store-and-Forward Mechanisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64<br>Managing Data and Business Rule Conflicts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65<br>Interacting with CRUD-Like Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71<br>Using a Task-Based Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72<br>Handling Dependencies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73<br>Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77<br>Contents v<br>Chapter 5<br>Security Considerations 79<br>Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80<br>Smart Client Authentication Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80<br>Choosing the Right Authentication Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83<br>Network Access Authentication Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84<br>Gathering and Validating User Credentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89<br>Authentication Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91<br>Authorization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92<br>Types of Authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92<br>Adding Authorization Capabilities to Your Application. . . . . . . . . . . . . . . . . . . . . . . . 94<br>Authorization Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95<br>Authorizing Functionality When the Client Is Offline . . . . . . . . . . . . . . . . . . . . . . . . . 96<br>The Authorization and Profile Application Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br>Input Validation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br>Handling Sensitive Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98<br>Determining Which Data to Store on the Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99<br>Techniques for Protecting Sensitive Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100<br>Code Access Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102<br>Code Access Security Permission Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104<br>Designing for Code Access Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105<br>Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112<br>Chapter 6<br>Using Multiple Threads 113<br>Multithreading in the .NET Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113<br>Choosing Between Synchronous and Asynchronous Calls . . . . . . . . . . . . . . . . . . . 114<br>Choosing Between Foreground and Background Threads . . . . . . . . . . . . . . . . . . . . 114<br>Handling Locking and Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115<br>Using Timers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116<br>When to Use Multiple Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117<br>Communicating Over a Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118<br>Performing Local Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118<br>Distinguishing Tasks of Varying Priority. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br>Application Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br>Creating and Using Threads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br>Using the ThreadPool Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br>Using the Thread Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121<br>Using Delegates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122<br>Calling Web Services Asynchronously. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125<br>Using Tasks to Handle Interaction Between the UI Thread and Other Threads. . . . . . . 126<br>Defining a Task Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129<br>Using the Task Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134<br>Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136<br>vi Smart Client Architecture and Design Guide<br>Chapter 7<br>Deploying and Updating Smart Client Applications 137<br>Deploying the .NET Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138<br>Preinstalling the .NET Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139<br>Installing the .NET Framework with an Application . . . . . . . . . . . . . . . . . . . . . . . . . 139<br>Deploying Smart Client Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140<br>No-Touch Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141<br>No-Touch Deployment with an Application Update Stub . . . . . . . . . . . . . . . . . . . . . 144<br>Running Code from a File Share. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146<br>Xcopy Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147<br>Windows Installer Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147<br>Choosing the Right Deployment Approach. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149<br>Deploying Smart Client Updates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151<br>No-Touch Deployment Updates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152<br>Automatic Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152<br>Updates from a File Share . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153<br>Xcopy Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153<br>Windows Installer Updates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154<br>Choosing the Right Update Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154<br>Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156<br>Chapter 8<br>Smart Client Application Performance 157<br>Designing for Performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158<br>Data Caching Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160<br>Network Communications Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161<br>Threading Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161<br>Transaction Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163<br>Optimizing Application Startup Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164<br>Managing Available Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165<br>Optimizing Windows Forms Performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169<br>Performance Tuning and Diagnosis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175<br>Setting Performance Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175<br>Performance Tuning Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177<br>Performance Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179<br>Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183<br>References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

2008-05-26

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除