Microsoft .NET Distributed Applications: Integrating XML Web Services and .NET Remoting
暫譯: Microsoft .NET 分散式應用程式:整合 XML 網路服務與 .NET 遠端呼叫
Matthew MacDonald
買這商品的人也買了...
-
$580$458 -
$680$537 -
$2,640$2,508 -
$650$553 -
$420$277 -
$980$774 -
$920$727 -
$880$695 -
$490$417 -
$1,029Operating System Concepts, 6/e (Windows XP Update)
-
$780$741 -
$750$638 -
$650$553 -
$580$458 -
$760$600 -
$580$458 -
$590$466 -
$680$537 -
$690$538 -
$720$569 -
$560$442 -
$750$638 -
$560$476 -
$480$379 -
$750$593
相關主題
商品描述
Description:
Advance your .NET expertise—learning proven techniques for building large-scale distributed solutions.
Make the jump to distributed application programming using the .NET
Framework—and introduce a new level of performance, scalability, and security to
your network and enterprise applications. Expert .NET developer Matthew
MacDonald shares proven techniques for fully exploiting .NET Remoting, XML Web
services, and other .NET technologies and integrating them into your real-world
solutions. MacDonald digs into key .NET building blocks and architectural
issues, explaining which features and designs will best serve your customized
distributed application projects—and when to use them. Case studies with full
code examples illustrate these practical techniques in action, as well as
demonstrating their benefits and tradeoffs.
Learn how to:
• Cross
application boundaries with .NET Remoting, XML Web services, and Message
Queuing
• Create responsive clients and scalable servers with
multithreading
• Model your distributed application with interfaces, facades,
and factories
• Use COM+ services such as object pooling, JIT activation, and
transactions
• Craft a data transfer plan with Microsoft ADO.NET?without
concurrency errors
• Help secure your code end to end?from the transport
level to the presentation tier
• Learn ways to avert?or unclog?performance
bottlenecks in your applications
• Automate deployment using self-updating
applications and XML Web services
• Master stateless programming and other
best practices for distributed applications
Table of Contents:
Acknowledgments | xix |
Introduction | xxi |
PART I KEY TECHNOLOGIES | |
1 Understanding Distributed Architecture | 3 |
What Is a Distributed Application? | 3 |
Client/Server Architecture | 5 |
Problems with Client/Server Architecture | 7 |
Distributed Architecture | 9 |
Advantages of Distributed Architecture | 10 |
DCOM and the History of Distributed Applications | 12 |
.NET Distributed Technologies | 13 |
2 .NET Components | 19 |
What Is a Component? | 19 |
The Component's Role in a Distributed System | 20 |
Service Providers | 21 |
Information Packages | 22 |
Dissecting a Sample Component | 22 |
The IComponent Interface | 28 |
Using Components at Design Time | 29 |
Resources and Disposable Classes | 31 |
Connection Strings and Configuration Files | 34 |
Configuration Files in Visual Studio .NET | 37 |
Deploying an Assembly | 38 |
Sharing Assemblies | 39 |
Searching for Private Assemblies | 40 |
Versioning Assemblies | 42 |
Shared Assemblies and the GAC | 43 |
Delayed Signing | 46 |
Using Configuration Files with Shared Assemblies | 47 |
Versioning Policies with Strong-Named Assemblies | 50 |
Code Bases with Shared Assemblies | 51 |
A Final Word About Assembly Binding | 52 |
3 Disconnected Data: The Universal Language | 55 |
The Role of ADO.NET in a Distributed System | 56 |
The ADO.NET Object Family | 57 |
The Data Objects | 58 |
Direct Data Source Interaction | 59 |
Direct Queries and Data Readers | 63 |
Stored Procedures | 67 |
Provider-Agnostic ADO.NET Code | 70 |
Transactions | 72 |
The DataSet | 73 |
Creating a DataSet | 75 |
DataSet Indirection Through Column Mappings | 77 |
Navigating the DataSet | 79 |
Relations | 81 |
Updating from a DataSet | 85 |
Update Issues | 87 |
Handling Errors | 89 |
XML and Cross-Platform Data Exchange | 90 |
4 .NET Remoting: A More Durable DCOM | 93 |
The Role of .NET Remoting in a Distributed System | 94 |
.NET Remoting Fundamentals | 95 |
Serializable Classes | 96 |
Remotable Classes | 99 |
The Remote Component Host | 101 |
Key .NET Remoting Design Decisions | 103 |
Activation Modes | 103 |
Object Lifetime | 104 |
Server and Client Activation | 105 |
Communication | 105 |
A Simple Remoting Server | 108 |
The Remote Object | 108 |
The Component Host | 109 |
The Client Application | 112 |
A Remotable Component with User Interface | 115 |
Testing with Visual Studio .NET | 115 |
Using a Different Formatter | 116 |
Using Multiple Channels | 118 |
SingleCall Objects | 119 |
Singleton Objects | 120 |
Bidirectional Communication | 121 |
Using Events | 122 |
Using Delegates | 127 |
Configuring Object Lifetime | 129 |
Modifying Lifetime | 132 |
Using a Leasing Sponsor | 134 |
Common Remoting Exceptions | 136 |
5 XML Web Services (RPC the Easy Way) | 139 |
The Role of XML Web Services in a Distributed System | 139 |
.NET Remoting vs. XML Web Services | 140 |
XML Web Service Plumbing | 142 |
The Role of IIS | 145 |
Creating a Virtual Directory | 146 |
The XML Web Service File Format | 147 |
Creating an XML Web Service | 148 |
Data Serialization | 153 |
Testing the XML Web Service | 156 |
The WSDL Document | 158 |
Consuming the XML Web Service | 158 |
Examining the Proxy Class | 161 |
Using the Proxy Class | 163 |
Debugging Web Services | 164 |
ASP.NET Platform Services | 167 |
SOAP Headers and SOAP Extensions | 168 |
Publishing an XML Web Service | 169 |
Cross-Platform XML Web Services | 170 |
6 Threaded Clients (Responsive Interfaces) | 175 |
What Is Multithreading? | 175 |
The Role of Threaded Clients in a Distributed System | 176 |
Threading in .NET | 179 |
Asynchronous Delegates | 180 |
Asynchronous Remoting Calls | 184 |
Asynchronous Web Service Calls | 184 |
Wait Handles | 186 |
Callbacks | 187 |
Asynchronous I/O | 190 |
Custom Threading | 191 |
Thread Priorities | 194 |
Thread Management | 196 |
Thread Debugging | 199 |
Locking | 200 |
Race Conditions | 203 |
Deadlocks | 204 |
Advanced Locking with the Monitor Class | 205 |
Custom Threaded Objects | 208 |
Threading and User Interfaces | 211 |
Using Callbacks and Locking | 213 |
Sending Instructions to a Thread | 217 |
7 Thread Pools and Services (Scalable Programming) | 221 |
The Role of Threading in a Distributed System | 221 |
Singleton Basics | 223 |
Tracking Clients | 225 |
Managing and Cleaning Up Tasks | 228 |
Ticket Systems | 230 |
Locking | 231 |
An XML Web Service Singleton | 234 |
Thread Pools | 235 |
Windows Services | 237 |
Creating a Windows Service | 238 |
Installing a Windows Service | 243 |
Debugging a Windows Service | 246 |
Controlling Windows Services | 248 |
Using a Windows Service for a Component Host | 250 |
8 Messaging (Lightweight Communication) | 253 |
The Role of Messaging in a Distributed System | 254 |
Fire-and-Forget Communication | 255 |
Introducing Message Queuing | 257 |
Message Queuing Server | 258 |
Dependent Client | 258 |
Independent Client | 259 |
Message Queuing Basics | 259 |
Types of Message Queues | 260 |
The Message Queue Service | 262 |
Configuring Message Queues | 262 |
The Anatomy of a Message | 264 |
Manipulating Queues in .NET | 265 |
Selecting a Queue | 266 |
Searching for a Queue | 268 |
Creating a Queue | 268 |
Sending a Message | 269 |
Sending Object Messages | 271 |
Advanced Message Configuration | 273 |
Receiving a Message | 275 |
Browsing Messages | 277 |
Response and Acknowledgement Messages | 278 |
Message Queues in a Distributed Application | 280 |
COM+ Queued Components | 281 |
9 COM+ (Component Services) | 283 |
The Role of COM+ in a Distributed System | 284 |
COM and Interop | 285 |
COM+ Registration Basics | 286 |
Giving Your Assembly a Strong Name | 288 |
Dynamic Registration | 289 |
Manual Registration | 291 |
COM+ and the Declarative Model | 292 |
COM+ Versioning | 294 |
Using a COM+ Component | 295 |
Object Pooling | 295 |
The Ideal Pooled Component | 296 |
Pooling and State | 297 |
A Pooled Component Example | 299 |
Establishing a Pool | 304 |
Activation, Deactivation, and Conditional Pooling | 306 |
Pooling and Data Providers | 307 |
Object Pooling vs. Connection Pooling | 309 |
Just-in-Time Activation | 309 |
JIT Activation and Object Pooling | 313 |
JIT Activation and .NET | 314 |
Automatic Transactions | 314 |
Objects and Transactions | 316 |
Rolling a Custom Transaction | 320 |
Isolation Levels | 321 |
Web Method Transactions | 322 |
Less Useful COM+ Services | 323 |
Queued Components | 324 |
Role-Based Security | 325 |
Synchronization | 325 |
Loosely Coupled Events | 325 |
Object Construction String | 325 |
SOAP Services (Only in COM+ 1.5) | 326 |
PART II DEVELOPING AN ARCHITECTURE | |
10 Enterprise Application Modeling | 329 |
Key Considerations for Distributed Components | 329 |
Cross-Process and Cross-Computer Communication | 330 |
The Question of State | 330 |
Are Remote Objects Really Objects? | 332 |
Performance vs. Scalability | 336 |
The Lessons Learned | 338 |
Designing in Tiers | 340 |
Business Objects | 341 |
Rules | 341 |
Distributed Design Patterns | 343 |
Interfaces | 344 |
Factories | 345 |
Facades | 345 |
Facades and Interception | 348 |
Facades and XML Web Services | 349 |
Facades and Transactions | 350 |
Choosing the Right .NET Technology | 351 |
Internal and External Systems | 351 |
Hybrid Internal/External Systems | 352 |
The Common Back End | 353 |
Partially Disconnected Systems | 353 |
Upgrading from COM | 355 |
Physical Architecture | 356 |
Scaling | 356 |
Load Balancing | 357 |
11 Advanced Remoting Techniques | 359 |
Developing with .NET Remoting in Mind | 359 |
ByRef and ByVal Arguments | 360 |
Exception Propagation | 360 |
Static Members | 361 |
Private Methods | 361 |
Public Members | 362 |
Versioning | 363 |
Interface-Based Programming | 366 |
Problems with Interface-Based Remoting | 373 |
.NET Remoting and XML Web Services Revisited | 376 |
Soapsuds and WSDL Description | 376 |
ASP.NET Hosting | 378 |
Programmatic Registration | 380 |
Dynamic Publication | 383 |
Recording Connection Information with an XML Web Service | 383 |
A Closer Look at ObjRef | 389 |
12 Optimizing the Data Tier | 391 |
Connection Pooling | 391 |
Connections and Application Domains | 394 |
Testing Connection Pooling | 395 |
Developing a Data Transfer Plan | 400 |
Batch Updates | 401 |
Caching | 404 |
Output (Response) Caching | 405 |
Considerations for Output Caching | 406 |
Data Caching | 408 |
Determining a Caching Strategy | 412 |
Optimizing the Database | 414 |
Stored Procedures | 414 |
Indexes | 414 |
Profiling | 415 |
Partition Large Data Tables | 416 |
Placing Code in the Data Tier | 417 |
Normalizing | 418 |
13 Implementing Security | 421 |
Authentication and Authorization | 422 |
Windows Authentication | 424 |
IIS Authentication Settings | 426 |
Setting Authentication Information with an XML Web Service Client | 429 |
Setting Authentication Information with a .NET Remoting Client | 430 |
Available User Information | 431 |
Impersonation | 433 |
Custom Role-Based Authentication | 435 |
Ticket Systems | 439 |
Passing Tickets Automatically | 443 |
Encryption | 445 |
SSL | 446 |
SSL and Certificates | 446 |
Communicating with SSL | 448 |
The .NET Encryption Classes | 450 |
Selective Asymmetric Encryption | 451 |
Selective Symmetric Encryption | 457 |
Selective Encryption with .NET Remoting | 462 |
Using Custom Classes to Wrap Encryption | 462 |
Using .NET Serialization to Encrypt Classes | 465 |
Code Access Security | 468 |
Security and the Stack Walk | 469 |
Security Demands | 471 |
Security Assert, Deny, and PermitOnly | 473 |
14 Monitoring, Logging, and Profiling | 477 |
Server-Side Logging | 477 |
Logging with Facades and Reflection | 481 |
The Windows Event Log | 484 |
Direct Mail Notification | 492 |
Client-Side Logging | 493 |
Using Tracing | 494 |
Catching Unhandled Errors | 500 |
Profiling with Performance Counters | 500 |
Essential Performance Counters | 501 |
Custom Performance Counters | 503 |
15 Deployment Strategies | 511 |
Traditional Deployment Problems and .NET Solutions | 511 |
The Application Launcher | 512 |
Security Holes in the Upgrade XML Web Service | 521 |
Other Enhancements to the Application Launcher | 522 |
The Application Browser | 523 |
The Application Browser XML Web Service | 525 |
The Application Browser Modules | 527 |
The Application Browser | 527 |
Code Access Security | 531 |
Improving Communication in the Application Browser | 536 |
A More Dynamic Application Browser | 541 |
PART III CASE STUDIES | |
16 Invoicer.NET Traveling Sales | 545 |
Defining the Problem | 546 |
Key Analysis | 547 |
Evaluating Different Paths | 548 |
Defining the Solution | 549 |
The Data Layer | 550 |
Stored Procedures | 552 |
The Excel Spreadsheet | 555 |
The Data Component | 557 |
The CustomersDB Class | 558 |
The OrdersDB Class | 560 |
The InvoicerTables Class | 564 |
The ExcelTranslator Class | 565 |
The Back-End OrderProcessor Service | 570 |
The Web Front End | 575 |
The XML Web Service Layer | 577 |
Migration Strategies | 580 |
Adding Security | 580 |
Adding Early Validation | 581 |
Using Unique Filenames | 581 |
Excel Headaches and a Dedicated Windows Client | 581 |
17 Transact.NET Order Fulfillment | 585 |
Defining the Problem | 585 |
Key Analysis | 586 |
Defining the Solution | 588 |
The Data Layer | 590 |
Stored Procedures | 591 |
The Data Component | 596 |
The ProductDB Class | 598 |
The OrderDB Class | 599 |
The TransactTables Class | 606 |
The Order Submission XML Web Service | 607 |
The Order Client | 611 |
The Internal OrderFill Client | 617 |
The Queue Monitor | 623 |
Future Directions | 626 |
Adding Security | 626 |
Adding Confirmation GUIDs | 626 |
Supporting Multiple Order-Filling Clients | 627 |
18 SuperCompute.NET Work Requests | 631 |
Defining the Problem | 631 |
Key Analysis | 633 |
Defining the Solution | 634 |
The Data Layer | 636 |
Stored Procedures | 637 |
The Data Component | 642 |
The UserDB Class | 643 |
The SessionDB Class | 644 |
The TaskDB Class | 647 |
The SuperComputeTables Class | 653 |
The Render Web Service | 654 |
RenderService Authentication | 654 |
RenderService Functionality | 658 |
The Client | 660 |
The Task Processor | 663 |
The TaskProcessor Component | 664 |
The Task Processor Front End | 664 |
Downloading a Rendered File | 672 |
Future Directions | 674 |
Adding Ticket Caching | 674 |
Enhanced Client Cleanup | 676 |
Adding Message Queuing | 676 |
Adding Load Balancing | 676 |
19 Microsoft Case Studies | 681 |
The IBuySpy Storefront | 682 |
The IBuySpy Portal | 684 |
Duwamish 7 | 685 |
.NET Pet Shop | 687 |
Fitch & Mather Stocks 7 | 688 |
Nile Books | 689 |
ColdStorage | 689 |
Jaggle | 689 |
Favorites Service | 690 |
INDEX | 691 |
商品描述(中文翻譯)
描述:
提升您的 .NET 專業知識——學習構建大規模分散式解決方案的有效技術。
使用 .NET Framework 跨越分散式應用程式編程的門檻,為您的網絡和企業應用程式引入新的性能、可擴展性和安全性。專家級 .NET 開發者 Matthew MacDonald 分享了充分利用 .NET Remoting、XML Web 服務及其他 .NET 技術的有效技術,並將其整合到您的實際解決方案中。MacDonald 深入探討了關鍵的 .NET 基礎組件和架構問題,解釋哪些功能和設計最能滿足您定制的分散式應用程式項目需求,以及何時使用它們。案例研究和完整的代碼示例展示了這些實用技術的實際應用,並演示了它們的好處和權衡。
學習如何:
• 使用 .NET Remoting、XML Web 服務和消息佇列跨越應用程式邊界
• 使用多線程創建響應式客戶端和可擴展伺服器
• 使用介面、外觀和工廠建模您的分散式應用程式
• 使用 COM+ 服務,如物件池、JIT 激活和事務
• 制定數據傳輸計劃,使用 Microsoft ADO.NET,避免並發錯誤
• 從傳輸層到表示層,幫助保護您的代碼
• 學習避免或解除應用程式中的性能瓶頸的方法
• 使用自我更新的應用程式和 XML Web 服務自動化部署
• 精通無狀態編程及其他分散式應用程式的最佳實踐
目錄:
致謝
引言
第一部分 關鍵技術
1 理解分散式架構
- 什麼是分散式應用程式?
- 客戶端/伺服器架構
- 客戶端/伺服器架構的問題
- 分散式架構
- 分散式架構的優勢
- DCOM 和分散式應用程式的歷史
- .NET 分散式技術
2 .NET 組件
- 什麼是組件?
- 組件在分散式系統中的角色
- 服務提供者
- 信息包
- 解剖一個示例組件
- IComponent 介面
- 在設計時使用組件
- 資源和可處置類
- 連接字串和配置文件
- Visual Studio .NET 中的配置文件
- 部署組件
- 共享組件
- 尋找私有組件
- 組件版本控制
- 共享組件和 GAC
- 延遲簽名
- 使用配置文件與共享組件
- 使用強名稱組件的版本控制策略
- 與共享組件的代碼基
- 關於組件綁定的最後說明
3 斷開連接的數據:通用語言
- ADO.NET 在分散式系統中的角色
- ADO.NET 物件家族
- 數據物件
- 直接數據源交互
- 直接查詢和數據讀取器
- 儲存過程
- 提供者無關的 ADO.NET 代碼
- 事務
- DataSet
- 創建 DataSet
- 通過列映射進行 DataSet 間接訪問
- 瀏覽 DataSet
- 關聯
- 從 DataSet 更新
- 更新問題
- 處理錯誤
- XML 和跨平台數據交換
4 .NET Remoting:更耐用的 DCOM
- .NET Remoting 在分散式系統中的角色
- .NET Remoting 基礎
- 可序列化類
- 可遠程調用的類
- 遠程組件主機
- 關鍵的 .NET Remoting 設計決策
- 激活模式
- 物件生命週期
- 伺服器和客戶端激活
- 通信
- 一個簡單的遠程伺服器
- 遠程物件
- 組件主機
- 客戶端應用程式
- 一個具有用戶界面的可遠程調用組件
- 使用 Visual Studio .NET 進行測試
- 使用不同的格式化器
- 使用多個通道
- SingleCall 物件
- 單例物件
- 雙向通信