Distributed .NET Programming in VB .NET / Edition 1

Distributed .NET Programming in VB .NET / Edition 1

by Tom Barnaby

ISBN-10: 1590590686

ISBN-13: 9781590590683

Pub. Date: 09/23/2002

Publisher: Apress

With the release of .NET, Microsoft once again altered the distributed programming landscape. Almost everything changed, from data access, to remote object calls, to the deployment of software components. And of course, .NET introduced a new technology in XML Web services that revolutionized Web development.

Distributed .NET Programming in VB .NET


With the release of .NET, Microsoft once again altered the distributed programming landscape. Almost everything changed, from data access, to remote object calls, to the deployment of software components. And of course, .NET introduced a new technology in XML Web services that revolutionized Web development.

Distributed .NET Programming in VB .NET describes how to use these .NET technologies to build fast, scalable, and robust distributed applications. Along the way, it answers common questions such as: How do I use the .NET Remoting Framework? What role does COM+ play in the .NET universe? How can I interoperate with COM components? What's the difference between .NET Remoting and Web services? How will these changes affect the architecture and design of a distributed application?

Author Tom Barnaby assumes the reader is already familiar with the fundamentals of .NET. However, a .NET overview is provided to concisely explain several of the core .NET technologies that are essential for distributed programming, including building, versioning, and deploying assemblies; garbage collection; serialization; and attribute-based programming.

Product Details

Publication date:
.NET Developer Series
Edition description:
Product dimensions:
7.01(w) x 9.25(h) x 0.05(d)

Table of Contents

About the Authorxvii
About the Technical Reviewerxix
Introduction and AFAQ (Anticipated Frequently Asked Questions)xxiii
Who Is This Book For?xxiii
How Is This Book Different from Distributed .NET Programming in C#?xxiv
What's Up with the ADO.NET Appendix by Andrew Troelsen?xxiv
What Do I Need to Run the Examples?xxiv
Why Isn't There Any Real-World Code?xv
How Come You Don't Have Tables Listing All the Options/Methods/Parameters of Each Tool/Class/Method?xv
Why Do I Keep Getting "File Not Found" Exceptions When I Run the Example Code?xv
What's Up with the Spinal Tap Quotes?xxvi
Chapter 1The Evolution of Distributed Programming1
Overview of Distributed Programming1
Layering an Application2
The Five Principles of Distributed Design3
Defining Scalability11
A Short History of Distributed Programming13
Centralized Computing13
Two-tier Client/Server Architecture14
Three-tier and N-tier Client/Server Architecture15
The Web Architecture17
Microsoft and Distributed Computing18
The Era of PC Dominance19
The Age of Enlightenment19
The Days of Disillusionment21
The Present: .NET23
Chapter 2This Is .NET27
Understanding the .NET Infrastructure27
The Importance of Type28
The Three Cs of .NET: CTS, CLS, and CLR28
Using Namespaces30
Assemblies and Manifests32
Intermediate Language32
Building and Configuring .NET Assemblies33
Building a Private Assembly33
Building a Shared Assembly44
Understanding .NET Versioning54
Setting an Assembly's Version Information54
Revisiting the Application Configuration File57
Setting Machine-wide Version Policies58
Using the .NET Framework Configuration Tool58
Configuring Publisher Policy61
Policy Precedence64
Using the [left angle bracket]codeBase[right angle bracket] Element64
Viewing the Assembly Binding Log66
Summary of the Binding Process68
Understanding Attributes and Reflection68
Using CLR Attributes69
Implementing Custom Attributes71
Reflecting upon Reflection72
Attributes and Reflection in Perspective75
Understanding Garbage Collection75
Reference Counting vs. Garbage Collection76
Garbage Collection Internals78
Implementing the Finalize Method79
Implementing the IDisposable Interface81
Garbage Collection in Perspective84
Using the Serializable Attribute85
ISerializable and Formatters87
Chapter 3Introduction to .NET Remoting91
What Is Remoting?91
Understanding Application Domains92
Programming with Application Domains93
Understanding Context95
Marshaling Objects105
Marshal By Value Objects105
Marshal By Reference Objects106
Shared Methods and Other Remoting Details107
Summarizing Marshaling and Context Agility108
Examining the .NET Remoting Framework109
Looking at the Big Picture109
Well-Known vs. Client-Activated Objects110
Understanding Proxies111
Understanding Channels and Formatters114
Chapter 4Distributed Programming with .NET Remoting119
Implementing Well-Known Objects119
Building the Server119
Building the Client123
Singleton Mode vs. SingleCall Mode127
Looking (Briefly) at Some Remoting Issues130
Remoting Configuration130
Implementing Client-Activated Objects138
Building the Server140
Building the Client142
Understanding Lease-based Lifetimes144
Building Remoting Hosts159
Hosting Remotable Objects in a Windows Service159
Hosting Remotable Objects in ASP.NET167
Chapter 5Additional Remoting Techniques175
Solving the Metadata Deployment Issue175
Deploying Metadata Assemblies176
Deploying Interface Assemblies186
Using the Soapsuds Utility193
Summary of Deployment Issues200
Calling Remote Objects Asynchronously201
Understanding Delegates201
Using Delegates for Local Asynchronous Calls206
Using Delegates for Remote Asynchronous Calls214
Summarizing Asynchronous Remoting227
Understanding Call Context228
Call Context vs. Thread Local Storage229
Using Call Context with Remoting230
Using Call Context with Asynchronous Calls233
Using Call Context Headers235
Chapter 6Understanding XML Web Services237
Web Services Overview237
Why Web Services?238
Web Service Composition239
The World Wide Web Consortium247
Building and Consuming Web Services in .NET248
The IIS to ASP.NET to Web Service Relationship248
Using Code-Behind249
Building Web Services with Visual Studio .NET251
Consuming the Web Service255
Calling Web Services Asynchronously258
Returning Custom Types from the Web Service259
Using the ASP.NET Session Object268
Remoting vs. Web Services270
Chapter 7Understanding COM Interop273
The Need for COM Interop273
Managed to Unmanaged Interop274
Understanding the Runtime Callable Wrapper274
Building an Interop Assembly275
Unmanaged to Managed Interop276
Understanding the COM Callable Wrapper277
Registering an Assembly for COM Interop278
Writing Managed Code for COM Interop279
Managed Code and COM Versioning285
Chapter 8Leveraging Component Services289
Component Services Overview289
Component Services Motivation290
Revisiting Context290
Survey of Component Services291
Survey of COM+ Configuration Settings292
Building Serviced Components in Managed Code295
Populating the COM+ Catalog296
Experimenting with a Simple Serviced Component299
Examining COM+ and .NET Interaction317
Just-In-Time Activation319
Understanding Object Pooling329
Using Object Construction334
Automatic Transactions335
The Distributed Transaction Coordinator336
Enabling Transactions338
Determining the Transaction's Outcome339
Consuming Serviced Components346
Exposing Objects with DCOM346
Exposing Objects with .NET Remoting348
Investigating New Features in COM+ 1.5351
Application Recycling and Pooling351
Configurable Transaction Isolation Levels353
SOAP Services354
Chapter 9.NET Message Queuing357
Message Queuing Overview357
Why Message Queuing?358
Message Queuing Architecture359
Message Queuing vs. Remoting vs. Web Services360
Installing and Administering MSMQ360
MSMQ Installation Options360
Creating and Managing Queues363
Using .NET Message Queuing365
Building the Sender365
Building the Receiver370
Sending Custom Types in Messages376
Writing Queued Components in Managed Code384
The Queued Component Architecture385
Implementing a Queued Component387
Handling Queued Component Exceptions388
AppendixData Access with ADO.NET395
The Need for ADO.NET395
ADO.NET: The Big Picture396
Understanding ADO.NET Namespaces398
The Types of System.Data399
Examining the DataColumn Type400
Building a DataColumn402
Adding a DataColumn to a DataTable403
Configuring a DataColumn to Function As a Primary Key404
Enabling Auto-Incrementing Fields404
Configuring a Column's XML Representation406
Examining the DataRow Type407
Understanding the DataRow.RowState Property408
The ItemArray Property410
Details of the DataTable412
Building a Complete DataTable413
Manipulating a DataTable: Deleting Rows416
Manipulating a DataTable: Applying Filters and Sort Orders418
Manipulating a DataTable: Updating Rows421
Understanding the DataView Type424
Understanding the Role of the DataSet426
Members of the DataSet428
Building an In-Memory DataSet430
Expressing Relations Using the DataRelation Type433
Navigating Between Related Tables434
Reading and Writing XML-Based DataSets438
Building a Simple Test Database441
ADO.NET Managed Providers442
Working with the OleDb Managed Provider443
Establishing a Connection Using the OleDbConnection Type444
Building a SQL Command446
Working with the OleDbDataReader447
Connecting to an Access Database448
Executing a Stored Procedure449
The Role of the OleDbDataAdapter Type452
Filling a DataSet Using the OleDbDataAdapter Type454
Working with the SQL Managed Provider456
The System.Data.SqlTypes Namespace457
Inserting New Records Using the SqlDataAdapter458
Updating Existing Records Using the SqlDataAdapter461
Autogenerated SQL Commands463
Filling a Multitabled DataSet (and Adding DataRelations)465
Bring in the Wizards!469
Establishing a Data Connection469
Creating a SQL Connection at Design Time471
Building a Data Adapter473
Using the Configured Data Adapter477

Customer Reviews

Average Review:

Write a Review

and post it to your social network


Most Helpful Customer Reviews

See all customer reviews >