100% found this document useful (20 votes)
29 views

Download Full Distributed NET Programming in C 1st Edition Tom Barnaby (Auth.) PDF All Chapters

Barnaby

Uploaded by

kasapwablenw
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (20 votes)
29 views

Download Full Distributed NET Programming in C 1st Edition Tom Barnaby (Auth.) PDF All Chapters

Barnaby

Uploaded by

kasapwablenw
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Download the full version of the ebook at ebookname.

com

Distributed NET Programming in C 1st Edition Tom


Barnaby (Auth.)

https://ebookname.com/product/distributed-net-programming-
in-c-1st-edition-tom-barnaby-auth/

OR CLICK BUTTON

DOWNLOAD EBOOK

Download more ebook instantly today at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Beginning NET Game Programming in VB NET 1st Edition David


Weller

https://ebookname.com/product/beginning-net-game-programming-in-vb-
net-1st-edition-david-weller/

ebookname.com

U X L American Decades 1920 1929 1920-29 Edition Tom


Pendergast

https://ebookname.com/product/u-x-l-american-
decades-1920-1929-1920-29-edition-tom-pendergast/

ebookname.com

Visual Basic NET programming 1st Edition Harold Davis

https://ebookname.com/product/visual-basic-net-programming-1st-
edition-harold-davis/

ebookname.com

Leks Jacob Höglund

https://ebookname.com/product/leks-jacob-hoglund/

ebookname.com
Human Rights and the Body Hidden in Plain Sight Annabelle
Mooney

https://ebookname.com/product/human-rights-and-the-body-hidden-in-
plain-sight-annabelle-mooney/

ebookname.com

Camp Cooking 100 Years 2nd Edition The National Museum Of


Forest Service History

https://ebookname.com/product/camp-cooking-100-years-2nd-edition-the-
national-museum-of-forest-service-history/

ebookname.com

Knowing Things Exploring the Collections at the Pitt


Rivers Museum 1884 1945 1st Edition Chris Gosden

https://ebookname.com/product/knowing-things-exploring-the-
collections-at-the-pitt-rivers-museum-1884-1945-1st-edition-chris-
gosden/
ebookname.com

Who s Afraid of Bernard Shaw Some Personalities in Shaw s


Plays 1st Edition Stanley Weintraub

https://ebookname.com/product/who-s-afraid-of-bernard-shaw-some-
personalities-in-shaw-s-plays-1st-edition-stanley-weintraub/

ebookname.com

Syriac Reading Lessons Multilingual Edition Benjamin


Davidson

https://ebookname.com/product/syriac-reading-lessons-multilingual-
edition-benjamin-davidson/

ebookname.com
The gang life laugh now cry later suppression to
prevention First Edition Brzenchek

https://ebookname.com/product/the-gang-life-laugh-now-cry-later-
suppression-to-prevention-first-edition-brzenchek/

ebookname.com
Distributed .NET
Programming in C#
10M BARNABY

APress Media, LLC


Copyright ©2002 by Tom Barnaby
Originally published by Apress in 2002

Ali rights reserved. No part of this work may be reproduced or transmitted in any form or by any
means, electronic or mechanical, including photocopying, recording, or by any information
storage or retrieval system, without the prior written permission ofthe copyright owner and the
publisher.
ISBN 978-1-59059-039-3 ISBN 978-1-4302-1107-5 (eBook)
DOI 10.1007/978-1-4302-1107-5

Trademarked names may appear in this book. Rather than use a trademark symbol with every
occurrence of a trademarked name, we use the names only in an editorial fashion and to the
benefit ofthe trademark owner, with no intention ofinfringement ofthe trademark.
Technical Reviewer: Gordon Wilmot
Editorial Directors: Dan Appleman, Peter Blackburn, Gary Cornell, Jason Gilmore,
Karen Watterson, John Zukowski
Managing Editor: Grace Wong
Project Manager: Alexa Stuart
Copy Editor: Ami Knox
Production Editor: Kari Brooks
Compositor: Susan Glinert Stevens
Artist: Cara Brunk, Blue Mud Productions
Indexer: Valerie Robbins
Cover Designer: Kurt Krames
Manufacturing Manager: Tom Debolski
Marketing Manager: Stephanie Rodriguez

The information in this book is distributed onan "as is" basis, without warranty. Although every
precaution has been taken in the preparation ofthis work, neither the author nor Apress shall
have any liability to any person or entity with respect to any loss or damage caused or alleged to
be caused directly or indirectly by the information contained in this work.
To my Mom and Dad,
who had no idea what they were starting
when they bought me a
TI-99/4A computer almost 20 years ago.
Or did they?
Contents at a Glance
Foreword .................................................................................................................. xv
About the Author .............................................................................................. xvii
About the Technical Reviewer .................................................................. xix
Acknowledgments ................................................................................................. xxi
Introduction and AFAQ
(Anticipated Frequently Asked Questions) ........................................ xxiii
Chapter 1 The Evolution of Distributed Programming ................. 1
Chapter 2 This Is •NET ............................................................................ 27
Chapter 3 Introduction to . NET Remoting ....................................... 91
Chapter 4 Distributed Programming with .NET Remoting ........ 119
Chapter 5 Additional Remoting Techniques ................................... 175
Chapter 6 Understanding XML Web Services ................................... 237
Chapter 7 Understanding COM Interop ............................................. 273
Chapter 8 Leveraging Component Services ..................................... 289
Chapter 9 •NET Message Queuing ........................................................ 357
Appendix Data Access with ADO. NET.................................................. 395
Index ........................................................................................................................ 469

v
Contents
Foreword ................................................................................................................ xv

About the Author.......................................................................................... xvii

About the Technical Reviewer............................................................ xix

Acknowledgments ............................................................................................. xxi

Introduction and AFAQ


(Anticipated Frequently Asked Questions) ........................... xxiii
Who Is This Book For? .................................................................................... xix
What Do I Need to Run the Examples? ....................................................... xx
Why IsnJt There Any Real-World Code? ..................................................... xx
How Come You DonJt Have Tables Listing All the
Options/Methods/Parameters of Each Tool/Class/Method? ......... xx
Why Do I Keep Getting ((File Not Found" Exceptions
When I Run the Example Code? ............................................................. xxi
What J s Up with the Spinal Tap Quotes? ................................................. xxi

Chapter 1 The Evolution


of Distributed Programming ....................................... 1
Overview of Distributed Programming ........................................................ 1
Layering an Application ...................................................................................... 2
The Five Principles of Distributed Design ......................................................... 3
Defining Scalability ........................................................................................... 11
A Short History of Distributed Programming ....................................... 13
Centralized Computing ..................................................................................... 13
Two-tier Client/Server Architecture ................................................................ 14
Three-tier and N-tier Client/Server Architecture ........................................... 15
The Web Architecture ........................................................................................ 17

vii
Contents

Microsoft and Distributed Computing ....................................................... 18


The Era of PC Dominance ................................................................................. 19
The Age of Enlightenment ................................................................................. 19
The Days of Disillusionment ............................................................................. 21
The Present: .NET ............................................................................................... 23
Summary .................................................................................................................... 24

Chapter 2 This Is •NET .......................................................................27


Understanding the .NET Infrastructure ................................................... 27
The Importance of Type .................................................................................... 28
The Three Cs of .NET: CTS, CLS, and CLR ........................................................ 28
UsingNamespaces ............................................................................................. 30
Assemblies and Manifests ................................................................................. 32
Intermediate Language ...................................................................................... 32
Building and Configuring .NET Assemblies ............................................ 33
Building a Private Assembly .............................................................................. 33
Building a Shared Assembly .............................................................................. 44
Understanding . NET Versioning .................................................................... 54
Setting an Assembly's Version Information ..................................................... 54
Revisiting the Application Configuration File .................................................. 57
Setting Machine-wide Version Policies ............................................................ 58
Using the .NET Framework Configuration Tool .............................................. 58
Configuring Publisher Policy ............................................................................. 61
Policy Precedence ............................................................................................... 64
Using the <codeBase> Element ......................................................................... 64
Viewing the Assembly Binding Log ................................................................... 66
Summary of the Binding Process ...................................................................... 68
Understanding Attributes and Reflection .............................................. 68
Using CLR Attributes .......................................................................................... 69
Implementing Custom Attributes ..................................................................... 71
Reflecting upon Reflection ................................................................................ 72
Attributes and Reflection in Perspective .......................................................... 75
Understanding Garbage Collection ............................................................. 75
Reference Counting vs. Garbage Collection ..................................................... 76
Garbage Collection Internals ............................................................................. 78
Implementing the Finalize Method .................................................................. 79
Implementing the !Disposable Interface ......................................................... 81
Garbage Collection in Perspective .................................................................... 84

viii
Contents

Serialization ...................................................................................................... 84
Using the Serializable Attribute ........................................................................ 85
ISerializable and Formatters ............................................................................. 87
Summary ................................................................................................................... 89

Chapter 3 Introduction to . NET Remoting .......................... 91


What Is Remoting? .............................................................................................. 91
Understanding Application Domains ........................................................... 92
Programming with Application Domains ........................................................ 93
Understanding Context ..................................................................................... 95
Marshaling Objects ......................................................................................... 105
Marshal By Value Objects ............................................................................... 105
Marshal By Reference Objects ........................................................................ 106
Static Methods and Other Remoting Details ................................................. 107
Summarizing Marshaling and Context Agility .............................................. 108

Examining the •NET Remoting Framework ................................................ 109


Looking at the Big Picture ............................................................................... 109
Well-Known vs. Client-Activated Objects ...................................................... 110
Understanding Proxies .................................................................................... 111
Understanding Channels and Formatters ..................................................... 114
Summary ................................................................................................................. 117

Chapter 4 Distributed Programming


with .NET Remoting ..................................................... 119

Implementing Well-Known Objects ............................................................. 119


Building the Server .......................................................................................... 119
Building the Client ........................................................................................... 123
Singleton Mode vs. SingleCall Mode .............................................................. 127
Looking (Briefly) at Some Remoting Issues ................................................... 130
Remoting Configuration ................................................................................. 130

Implementing Client-Activated Objects ................................................ 138


Building the Server .......................................................................................... 140
Building the Client ........................................................................................... 142
Understanding Lease-based Lifetimes .......................................................... 144
Building Remoting Hosts .............................................................................. 159
Hosting Remotable Objects in a Windows Service ....................................... 159
Hosting Remotable Objects in ASP.NET ........................................................ 167
Summary ................................................................................................................. 172
ix
Contents

Chapter 5 Additional Remoting Techniques ...................... 175


Solving the Metadata Deployment Issue ................................................. 175
Deploying Metadata Assemblies ..................................................................... 176
Deploying Interface Assemblies ...................................................................... 186
Using the Soapsuds Utility .............................................................................. 193
Summary of Deployment Issues ..................................................................... 200
Calling Remote Objects Asynchronously ................................................. 201
Understanding Delegates ................................................................................ 201
Using Delegates for Local Asynchronous Calls .............................................. 206
Using Delegates for Remote Asynchronous Calls .......................................... 214
Summarizing Asynchronous Remoting .......................................................... 227
Understanding Call Context ......................................................................... 228
Call Context vs. Thread Local Storage ............................................................ 229
Using Call Context with Remoting .................................................................. 230
Using Call Context with Asynchronous Calls ................................................. 233
Using Call Context Headers ............................................................................. 235
Summary .................................................................................................................. 236

Chapter 6 Understanding XML Web Services ...................... 237


Web Services Overview .................................................................................... 237
Why Web Services? ........................................................................................... 238
Web Service Composition ............................................................................... 239
The World Wide Web Consortium .................................................................. 247
Building and Consuming Web Services in .NET ................................... 248
The liS to ASP.NET to Web Service Relationship .......................................... 248
Using Code-Behind .......................................................................................... 249
Building Web Services with Visual Studio .NET ............................................. 251
Consuming the Web Service ............................................................................ 255
CallingWeb Services Asynchronously ............................................................ 258
Returning Custom Types from the Web Service ............................................ 259
Using the ASP.NET Session Object ................................................................. 268
Remoting vs. Web Services ........................................................................... 270
Summary .................................................................................................................. 271

X
Contents

Chapter 7 Understanding COM Interop ................................... 273


The Need for COM Interop ............................................................................ 273
Managed to Unmanaged Interop .................................................................... 274
Understanding the Runtime Callable Wrapper ............................................ 274
Building an Interop Assembly ........................................................................ 275
Unmanaged to Managed Interop .................................................................... 276
Understanding the COM Callable Wrapper .................................................. 277
Registering an Assembly for COM Interop .................................................... 278
Writing Managed Code for COM lnterop ...................................................... 279
Managed Code and COM Versioning ............................................................ 285
Summary ................................................................................................................. 288

Chapter 8 Leveraging Component Services ........................ 289


Component Services Overview ...................................................................... 289
Component Services Motivation .................................................................... 290
Revisiting Context ............................................................................................ 290
Survey of Component Services ....................................................................... 291
Survey of COM+ Configuration Settings ........................................................ 292
Building Serviced Components in Managed Code ................................. 295
Populating the COM+ Catalog ........................................................................ 296
Experimenting with a Simple Serviced Component ..................................... 299
Examining COM+ and .NET Interaction ........................................................ 317
Just-In-Time Activation ................................................................................... 319
Understanding Object Pooling ....................................................................... 329
Using Object Construction ............................................................................. 334
Automatic Transactions ................................................................................. 335
The Distributed Transaction Coordinator ..................................................... 336
Enabling Transactions ..................................................................................... 338
Determining the Transaction's Outcome ...................................................... 339
Consuming Serviced Components ................................................................. 346
Exposing Objects with DCOM ........................................................................ 346
Exposing Objects with .NET Remoting .......................................................... 348
Investigating New Features in COM+ 1. 5 .............................................. 351
Application Recycling and Pooling ................................................................ 351
Configurable Transaction Isolation Levels .................................................... 353
SOAP Services ................................................................................................... 354
Summary ................................................................................................................. 355

xi
Contents

Chapter 9 .NET Message Queuing ................................................ 357


Message Queuing Overview ............................................................................. 357
Why Message Queuing? ................................................................................... 358
Message Queuing Architecture ....................................................................... 359
Message Queuingvs. Remotingvs. Web Services .......................................... 360
Installing and Administering MSMQ ......................................................... 360
MSMQ Installation Options ............................................................................. 360
Creating and Managing Queues ...................................................................... 363
Using .NET Message Queuing ......................................................................... 365
Building the Sender .......................................................................................... 365
Building the Receiver ....................................................................................... 370
Sending Custom Types in Messages ............................................................... 376
Writing Queued Components in Managed Code ........................................ 384
The Queued Component Architecture ........................................................... 385
Implementing a Queued Component ............................................................ 387
Handling Queued Component Exceptions .................................................... 388
Summary ..................................................................................................................391

Appendix Data Access with ADO.NET ...................................... 395


The Need for ADO.NET ........................................................................................395
ADO.NET: The Big Picture ................................................................................ 396
Understanding ADO.NET Namespaces .............................................................. 397
The Types of System.Data ...............................................................................398
Examining the DataColumn Type .................................................................... 399
Building a DataColumn ................................................................................... 401
Adding a DataColumn to a DataTable ............................................................. 403
Configuring a DataColumn to Function as a Primary Key ............................ 403
Enabling Autoincrementing Fields ................................................................. 404
Configuring a Column's XML Representation .............................................. .406
Examining the DataRow Type ........................................................................... 407
Understanding the DataRow.RowState Property ........................................... 407
The ItemArray Property ................................................................................... 410
Details of the DataTable ............................................................................. 411

xii
Contents

Building a Complete DataTable .................................................................... 413


Manipulating a DataTable: Deleting Rows .................................................... 416
Manipulating a DataTable: Applying Filters and Sort Orders ....................... 417
Manipulating a DataTable: Updating Rows ................................................... 420
Understanding the Data View Type ............................................................... 422
Understanding the Role of the DataSet .................................................. 425
Members of the DataSet .................................................................................. 427
Building an In-Memory DataSet .................................................................... 427
Expressing Relations Using the DataRelation Type ........................ 432
Navigating Between Related Tables ................................................................ 433
Reading and Writing XML -Based DataSets ................................................ 437
Building a Simple Test Database ............................................................. 438
ADO. NET Managed Providers ............................................................................ 440
Working with the OleDb Managed Provider .............................................. 441
Establishing a Connection Using the OleDbConnection Type .................... 442
Building a SQL Command .............................................................................. 444
Working with the OleDbDataReader .............................................................. 445
Connecting to an Access Database ................................................................ 447
Executing a Stored Procedure ......................................................................... 448
The Role of the OleDbDataAdapter Type .................................................. 451
Filling a DataSet Using the OleDbDataAdapter Type ................................... 452
Working with the SQL Managed Provider .................................................. 455
The System.Data.SqlTypes Namespace ......................................................... 456
Inserting New Records Using the SqlDataAdapter ....................................... 456
Updating Existing Records Using the SqlDataAdapter ................................ 459
Autogenerated SQL Commands .......................................................................... 461
Filling a Multitabled DataSet (and Adding DataRelations) ......... 464
Summary ................................................................................................................. 467

Index ..................................................................................................................... 469

xiii
Foreword
COM ON A WIRE, also known as DCOM, was a great boon to the distributed pro-
grammer. Under the model ofDCOM, a client was able to interact with COM objects
located literally anywhere, without requiring a change of code base. Using the indi-
rection provided by AppiDs, stubs, proxies, and channels, our distributed endeavors
involved little more than the use of declarative tools such as dcomcnfg.exe and the
Component Services snap-in. However, all was not well in the world ofDCOM (or
COM for that matter). Although the clicking of check boxes made COM-based
remoting appear quite simple on the surface, we suffered through numerous registry
conflicts, a lifetime of passing interface pointers by reference, and the dreaded
prospect of crossing firewalls.
Just as ADO.NET has nothing to do with classic ADO, the .NET Remoting story
has nothing to do with classic DCOM. The most obvious case in point is the fact
that .NET assemblies are not registered with the system registry. Given this, we
have no AppiD. Without an AppiD, we have no RemoteServerName value, which
means no reference to oleaut32.dll and thus no more COM-based stub and proxies.
In short, everything we knew about interacting with types across the wire has
changed dramatically.
Under .NET, we are provided with dozens of new remoting constructs. Not only
do we need to contend with numerous TLAs (three-letter acronyms) such as WKO,
CAO, and the like, but we are also required to be content with new spins on existing
ideas (for example, the distinction between "real" versus "transparent" proxies) as
well as the role ofXML configuration files.
Many programmers who are faced with the task of learning the story of .NET
distributed programming turn to MSDN. Here, they are confronted with numerous
code examples, partial white papers, and diagrams that require a 21-inch monitor
to view in their entirety. This approach is bound to lead to frustration and a dis-
jointed knowledge base. What is sorely needed is a practical, approachable, and in-
depth treatment of how all of these new technologies fit together in the context of
an Enterprise application.
Tom's latest book (the one currently in your grasp) provides such a treatment.
Here, you will find logical and clear explanations that (surprise, surprise) actually
provide insight to the richness of the .NET Remoting layer. Not only does Tom
pound out the gory details of this suite of new TLAs, but he also rounds out your
understanding by providing coverage of numerous related Enterprise-centric tech-
nologies such as building configured components (a.k.a. COM+), .NET messaging,
Web services, and interoperability with classic COM types.

XV
Foreword

For a number of years now, Tom and I have worked together here at Intertech,
Inc. (http: I /www. intertech- inc. com). I have witnessed him teach numerous courses
on the topics of classic COM and .NET (including his Expert Distributed .NET
class). I have also had the pleasure to work with him on numerous development
efforts. I can speak from the heart when I say you are in good hands.

Enjoy!

Andrew Troelsen
Partner and Trainer, Intertech, Inc.
Minneapolis, MN

xvi
About the Author

ToM BARNABY is an instructor and software architect at Intertech, Inc., a company


dedicated to teaching top programmers how to develop enterprise-level software.
As an instructor, he is in constant contact with developers from around the world
and knows the problems they must solve and the questions they have. As a software
architect, he advises companies on the design and implementation of their IT
systems. Before becoming a teacher, Tom developed a variety of applications
ranging from a proprietary 4GL/Database system on Unix to a fully distributed ERP
application on Windows. In his spare time, Tom enjoys playing with his son Max,
watching movies, and playing power chords on his electric guitar with the amp
volume turned to 11.

xvii
About the
Technical Reviewer

GoRDON WILMOT is a director of ICEnetware Ltd., a company specializing in


Internet and network management and monitoring software. He has held positions
ranging from software engineer to systems architect and has been developing
software using Microsoft products and architectures for over 20 years. Over this
time he has designed and developed many products and systems for various
industries such as finance, manufacturing, and telecommunications. All his spare
time is eaten up by making cakes (badly) for his three-year-old twins, Charlotte and
Georgina, and being beaten continuously by his seven-year-old son, Andrew, on
the PS2. When he grows up he'd still like to be an astronaut.

xix
Acknowledgments
WRITING A BOOK is by far the hardest thing I have ever done. Yet it would have been
completely impossible if I didn't have the help and support of the following folks:
Thanks to everyone at Apress. Gary Cornell, for taking a chance on me, a
complete unknown wishing to write about a hot topic. Ami "Damn Yer Good"
Knox, for being even more analytical than I in regards to writing. Grace Wong and
Kari Brooks for keeping the great wheels of book production churning even ifl was
burning (out). And a huge thanks to Alexa Stuart, who somehow kept this project
running smoothly in spite of me. Finally thanks to Peter Blackburn.
Thanks to my technical editor, Gordon Wilmot, who not only provided great
feedback, but also a tremendous amount of encouragement.
Thanks to Kelly Kari for proofreading several chapters. But more importantly,
thanks for actually laughing at my attempts at humor scattered throughout.
Thanks to everyone at Intertech. I feel privileged to work for a company filled with
such talented and dedicated individuals. Thanks to all my cohorts, Steve Close (Java is
toast), Gina Accawi (XML is just a big string), and Andrew "Gunnar" Sondgeroth (see
Steve Close) for providing a challenging, fun, and invigorating work environment.
Special thanks to Andrew Troelsen for contributing an appendix, and whose, urn,
unique brand of encouragement ultimately lead to this book. Finally, thanks to
Tom Salonek, founder of Intertech, for somehow tolerating the bizarre antics of us
admitted prima donnas.
Thanks to Rabi, my cat, for keeping my shoulders warm while I worked.
Finally, and most important of all, many, many thanks to my wife Tammy and son
Max. Nobody sacrificed more for the sake of this book. I will be forever grateful.

xxi
Introduction and AFAO..
(Anticipated Frequently
Asked Questions)
THE SUBJECT OF DISTRIBUTED PROGRAMMING is vast. To implement distributed appli-
cations properly, you must understand everything from low-level networking
details to high -level architectural issues .. NET is a brand new platform deserving of
several thousand pages of documentation. So the challenge I faced when writing
this book was this: how do I combine these two immense subjects into a single,
digestible volume?
My answer: I don't. In other words, I had to make assumptions regarding the
level of experience of the reader, which is tough given that .NET is such a new tech-
nology. Even harder, though, I had to make difficult decisions about what the book
would and would not be. On a few issues I was resolute. The book would not be a
regurgitation of documentation. The book would not be a thousand-page boat
anchor covering dozens of subjects and none of them well.
Rather than list other things this book is not, however, I want to discuss what
this book is. I think of it as a guided tour through the fundamental technologies you
use to build distributed applications with .NET, such as .NET Remoting, Web services,
serialization, COM+, and MSMQ. These technologies are the tools we developers
use to craft distributed applications. And they are complex enough in themselves
to warrant in-depth examination. The focus, then, is on the use of each technology
and the role it plays in a distributed application. Think of it as pulling each tool out
of the box, examining it, and experimenting with it to get a sense of the problems it
can solve. Like any craft, distributed programming is best learned by doing, but
wherever possible I discuss the pros and cons of using one tool over another.
In an attempt to set the proper expectations (and to head off some angry e-mails),
I've compiled the following list of anticipated questions.

Who Is This Book For?


Since you pulled this book off the shelf, I assume you are a programmer who is
interested in using .NET technologies to build distributed applications. I also

xxiii
Introduction and AFAQ (Anticipated Frequently Asked Questions)

assume you have a grounding inC# and object-oriented programming. An under-


standing of .NET basics is also very helpful, but Chapter 2 covers a few of the
fundamentals. Most importantly, I assume you are willing to invest some time
downloading (or typing in) and running the examples, looking up details in MSDN,
and sometimes reading over a paragraph a couple times to internalize the concepts
presented. These assumptions have helped to keep this book down to a manageable
number of pages.

What Do I Need to Run the Examples?


You can download almost all the code presented in the book from the Apress Web
site (http: I /www.apress .com). At a minimum, to run the code you will need the final
release version of the .NET Framework, which you can download for free from
Microsoft (http: I lmsdn. microsoft. com/ netframework). Many examples in the book
can be implemented and tested using nothing more than the compilers and tools
provided in the .NET Framework and a text editor such as Notepad. However, I
assume Visual Studio .NET is the preferred development tool, and the online code
includes Visual Studio .NET solution files.
For later chapters you will need other software to run the examples,
including COM+, liS, and MSMQ. The examples were developed using
Windows XP Professional, but I believe they will also run on Windows 2000.

Why Isn't There Any Real-World Code?


Actually, this book is bursting with real-world code. That is, code that helps you
solve everyday problems you will experience while building distributed appli-
cations in .NET. But I know what you mean-I have not provided a pizza delivery
service, or a contacts service, or a working e-commerce site. It is my opinion that
these types of examples are overrated, especially when there are so many new fun-
damental concepts to impart. Too much time and too many trees would be spent
mired in the details of an e-commerce system, rather than discussing (and learning)
the truly essential concepts. Therefore, the code examples in this book are short,
sweet, and to the point.

How Come You Don't Have Tables Listing All the


Options/Methods/Parameters of Each Tool/Class/Method?
This is a tutorial book first, a how-to book second, and a reference book last. The
definitive .NET reference has already been written; it is called MSDN. I see no

xxiv
Introduction and AFAQ (Anticipated Frequently Asked Questions)

reason to repeat the fine work Microsoft has done to document every option of
every tool, every method of every class, every parameter of every method, and so
on. I do, however, see the need for a book that leads the reader through a logical
progression of topics while clarifying complex concepts. I also wanted to produce a
book that was beach-bag friendly-that is, a book you could carry around in your
briefcase, backpack, laptop case, or beach bag without breaking your back. Hope-
fully, this book meets these goals.

Why Do I Keep Getting ((File Not Found)} Exceptions


When I Run the Example Code?
Some example projects in this book are fairly complex, requiring several custom
dependent assemblies. These assemblies have to be in particular locations for
the project to run. You must read and internalize the assembly binding process
documented in Chapter 2. In particular, note the Assembly Binding Log Viewer
tool explained in "Viewing the Assembly Binding Log," and the assembly binding
flowchart in "Summary of the Binding Process." These two sections provide the
information you need to diagnose the problem.

What's Up with the Spinal Tap Quotes?


In my opinion, Spinal Tap is the greatest rock and roll band ever. But due to poor
management, interfering girlfriends, and numerous drummers mysteriously
dying, the band slowly sunk into oblivion in the early '80s. The whole sad affair is
documented in the movie This Is Spinal Tap, where the band members offer many
pearls of wisdom that are surprisingly applicable to the world of software devel-
opment. I wanted to share their profound insights with all my readers.
So, assuming you haven't placed this book back on the shelf, let's get started!

XXV
CHAPTER 1

The Evolution of
Distributed Programming
"It's like, how much more black can this be?
and the answer is none. None more black."
-Nigel Thfnel (This Is Spinal Tap)
speaking on the state of software development.

1bDAY, BUZZWORDS LIKE enterprise programming, distributed programming, n -tier,


and scalability are floated in nearly every product announcement. So before
tackling the nuances of distributed development in .NET, this chapter attempts to
de-marketize such terms by applying real meaning and context to these ubiquitous
words. Also, while this book is primarily a nuts-and-bolts "how to" guide, it is
important to have a clear understanding of why you should distribute applications
and how to design a distributed application. To this end, this chapter offers five
principles to help guide your distributed development in .NET or any other platform.
Finally, in order to drive home the principles of distributed programming, this
chapter takes a lighthearted look at past distributed development models and the
reasons they were replaced by new models. As you will see, this goes a long way
towards explaining why Microsoft created a new development platform called
.NET to replace COM.

Overview of Distributed Programming


What is distributed programming? Now, there is a question few dare to ask. The
term is so common today that some may be embarrassed to question its meaning.
Rest assured there is no need to be. I routinely ask my students to define it, and
rarely do I get the same answer.
Distributed programming is characterized by several distinct physical compo-
nents working together as a single system. Here, "distinct physical components"
could mean multiple CPUs or, more commonly, multiple computers on a network.
You can apply distributed programming to a wide variety of problems, from pre-
dicting the weather to purchasing a book. At its heart, the premise of distributed

1
Chapter 1

programming is this: if one computer can complete a task in 5 seconds, then five
computers working together in parallel should complete the task in 1 second.
Of course, it is never quite that easy. The problem is the phrase "working
together in parallel." It is difficult to get five computers on a network to cooperate
efficiently. In fact, the application software must be specifically designed for this to
be effective. As an analogy, consider a single horse pulling a carriage. A horse is a
powerful animal, but, in terms of power-to-weight ratios, an ant is many times
stronger (we will just assume ten times stronger). So, if I gather and harness
enough ants to equal the mass of the horse, I can move ten times the amount of
material in the carriage. A perfect example of distributing the workload, right? The
calculations are reasonable, but hopefully you are chuckling at the ludicrous
vision of millions of ants with tiny harnesses pulling together.

Layering an Application
As demonstrated with the horse-vs.-ant analogy, distributed computing raises the
issue of coordinating the work of several computers. There is also the issue of
decomposing the application into tasks that can be distributed. Luckily, here you
can draw on the lessons learned from earlier applications. Over the years, it has
become clear that most business applications consist of three primary sets of
logic: presentation, business, and data source.

• Presentation logic. This is the part of the application that the end users use
to enter orders, look up customer information, and view business reports.
To the user, this is the application.

• Business logic. This is the heart of the application and where developers
spend most of their time and effort. It contains the business rules that
define the way the business is run. For example, business rules specify when
customers receive discounts, how shipping costs are calculated, and what
information is required on an order.

• Data source logic. This is where orders, customer information, and other
facts are saved for future reference. Luckily, database products such as SQL
Server and Oracle take care of most of the work. But you still have to design
the data layout and the queries you will use to retrieve the data.

The first design point of any nontrivial business application should be to


partition these sets oflogic into distinct layers. In other words, you should not mix
business logic code with the presentation logic code. Do not take this to mean,
however, that each layer must run on a separate machine, or in separate process.
Instead, code from one layer should only interact with that in another layer through

2
The Evolution of Distributed Programming

a well-defined interface. Typically, the layers are physically implemented within


separate code libraries (DLLs).

The Five Principles of Distributed Design


Layering allows you to change the implementation of one layer, without affecting
another layer. It also provides the flexibility to physically separate the layers in the
future. However, as the upcoming sections show, the decision to execute each
layer in a separate process or machine should not be made lightly. If you do decide
to distribute the layer, you must design it specifically for distribution. Confusing
the issue even more is the fact that some of these design tactics contradict classical
object -oriented principles. To help clarify the issues, this section describes several
principles you can use to effectively distribute an application and why you should
use them.

Principle 1: Distribute Sparingly

This may seem like a surprising principle for a book about distributed programming.
However, this principle is based on a simple, undeniable fact of computing:
invoking a method on an object in a different process is hundreds of times slower
than doing the same on an in-process object. Move the object to another machine
on a network, and the method call can be another ten times slower.
So when should you distribute? The trite answer is only when you have to. But
you are probably looking for a little more detail, so let's consider a few examples,
starting with the database layer. Typically an application's database runs on a separate,
dedicated server-in other words, it is distributed relative to the other layers.
There are several good reasons for this:

• Database software is complicated, expensive, and typically requires high-


powered hardware. Therefore, it isn't cost effective to distribute many copies
of the database software.

• A database can contain and relate data shared by many applications. This is
only possible, however, if each application server is accessing a single
database server, rather than their own local copy.

• Databases are designed to run as a separate physical layer. They expose the
ultimate "chunky" interface: the Structured Query Language (SQL). (See
Principle 3 for details on chunky interfaces.)

3
Chapter 1

Therefore, the decision to distribute the data source logic is typically made the
moment you decide to use a database. However, the decision to distribute the pre-
sentation logic is a little more complex. First of all, unless all the application users
walk up to a common terminal (like an ATM), then some aspect of the presentation
layer must be distributed to each user. The question is how much. The trend lately,
of course, is to execute the bulk of the logic on the server and send simple HTML to
client Web browsers. This is actually in keeping with the principle to distribute
sparingly. However, it also requires each user interaction to travel to the server so
that it can generate the appropriate response.
Before the proliferation of the Web, it was more common to execute the entire
presentation logic on each client machine (in keeping with Principle 2). This pro-
vides faster interaction with the user since it minimizes round trips to the server,
but also requires user interface updates to be deployed throughout the user base.
In the end, the choice of which client you use has little to do with distributed
design principles, and everything to do with the desired user experience and
deployment issues.
So the data logic almost always executes on a separate computer, and the pre-
sentation layer frequently does. That leaves us with the business layer, and the
most complex set of issues. Sometimes, the business layer is deployed to each
client. Other times it is kept on the server. In many cases, the business layer itself is
decomposed into two or more components. Those components related to user
interface interaction are deployed to the client, and those related to data access
are retained on the server. This holds to the next principle, which is to localize
related concerns.
As you can see, you have many distribution options. When, why, and how you
distribute is driven by a variety offactors-many of which compete. So the next
few principles offer further guidelines.

Principle 2: Localize Related Concerns


If you decide or are forced to distribute all or part of the business-logic layer, then
you should ensure that those components that frequently interact are kept close
together. In other words, you should localize related concerns. For example, consider
the e-commerce application shown in Figure 1-1. This application separates
Customer, Product, and ShoppingCart components onto dedicated servers, ostensibly to
allow parallel execution. However, these components need to interact many times
while adding a product to the shopping cart. And each interaction incurs the
overhead of a cross-network method call. Therefore, this cross-network activity

4
The Evolution of Distributed Programming

will easily eclipse any parallel processing gains. Multiply this by a few thousands
users, and you have a scenario that can devastate performance. Relating this to the
earlier horse and carriage analogy, this is the equivalent of harnessing each leg of
the horse rather than the entire horse.

Machine 1

Machine 4
Add product to cart
Gatabasj

Figure 1-1. How NOT to design a distributed application

So how can you leverage the power of distributed programming, namely par-
allel processing, while still localizing related concerns? Buy another horse. That is,
duplicate the entire application and run it on another dedicated server. You can
use load balancing to route each client request to a particular server. This archi-
tecture is shown in Figure 1-2. Web-based applications often use this model by
hosting the identical Web site on several Web servers, a setup sometimes referred
to as a Web farm .
Duplicating and load balancing application servers is a great way to increase
the capacity, or scale, of an application. You do need to very conscious, however, of
how you manage state. For more details, see Principle 4.

5
Random documents with unrelated
content Scribd suggests to you:
But the imagination of Legros, in virtue of which, quite as much as
by occasional mannerisms of handling, he recalls that older and
more pregnant Art which has well nigh passed from the very ken of
the producers of our own day’s trivial array, is not in any sense
derived from this or that past master; it is charged, on the contrary,
in his most considerable pieces with a serious and pathetic poetry
quite his own. Here and there, indeed, as in one early work—
Procession dans les Caveaux de Saint-Médard—it is not imagination
at all, as that is generally understood, but the keen observation of
an artist content to reproduce, that alone is remarkable; and here
there is a certain amount of audacity in the fidelity with which he
has rendered the commonplace, the mean, the narrow faces of a
certain section of the Parisian lower bourgeoisie engaged in
devotions which there is no beauty of form or of thought to make
interesting to the beholder. It is a piece of pure realism—the hideous
flounces and more hideous crinolines, the squat figures, the slop-
shop fashions, the common faces empty of records. And in this pure
and unrelieved realism there is a certain value, if there is no charm.
But the pieces to which Legros will owe such fame as the better-
judging connoisseurs and critics shall eventually accord him are
those in which the artistic instinct and desire of beauty, either of
form or of thought, has found some expression. It will be in part by
such masculine, yet refined and graceful, portraits as those of M.
Dalou and Mr. Poynter, such subtle ones as that of Cardinal Manning,
such pathetic ones as that of M. Rodin here, that Legros will stand
high. It will be in part by the etchings in which the pourtrayal of
actual life has been guided by the research for beauty, as, for
instance, in the Chœur d’une Eglise Espagnole, where not only is the
head firm and dignified and the lighting more intricate than is usual
with this master, but where the composition of bent figure and
curved violoncello is of great repose and refinement of beauty. A
more various specimen of the same type is to be found in a fine
impression of Les Chantres Espagnols. They are eight in the choir of
a church—four sit in the stalls, the others stand, of whom one turns
the page of a missal placed on a lectern. The scene is mostly dark—
mostly even very dark—but the light, by a very skilled treatment of
it, falls here and there on lectern, missal, and hand of the old man
sitting in the choir. The observation of reality in this plate has been
at the same time keen and poetical, for nothing can be truer and
nothing more impressive than the study of old faces out of which so
much of the desire of life has gone, and the study of gestures which
are those of hand and will waxing feeble. Two men, at least, are
placed together in a pathetic harmony of weakness: the drooping
hand of one and his drooped head, as he sits in his long-accustomed
place; the open mouth of the other—his mouth opened with the
feebleness of a decayed intelligence, with the slow understandings
of a departing mind. Or, not to insist too much on a picturesqueness
in which pathos predominates, notice, when the occasion presents
itself, the first rendering of the subject known as the Lutrin, with its
acolyte of rare youthful dignity; or as an example of work in which
some little beauty of modelling has been sought to be united even
with every-day realism, see the design of the bare knee in L’Enfant
Prodigue.
But where Legros is most apart and alone is, after all, in the
subjects which owe most to the imagination, and of these the very
finest are La Mort du Vagabond, La Mort et le Bûcheron, and Le
Savant endormi. Something of the art that gives interest to these
pieces is contained in the careful persistence with which the etcher
brings the realism of physical ugliness into close contact and
contrast with the spiritual and supernatural. A comely and well-to-do
youth slumbering in his chair at the Marlborough could have no
dreams an artist of Legros’s nature would think worthy of recording,
but the ugly votary of science and intellectual speculation, who
sleeps, from sheer weariness, in the armchair before which are still
the implements of his study and research, has the dignity of strained
endeavour; and M. Legros, in pourtraying him and suggesting the
subjects of his dream, has reached an elevation which separates him
from most of his contemporaries, by as much as the Melancholia of
Dürer is separated from the Melancholia of Beham. La Mort du
Vagabond is not a whit less suggestive in its contrast between the
feebleness of the worn-out beggar now stretched out lonely on the
pathside—his head raised, gasping, and his hat knocked away—and
the force and fury of the storm that beats over dead tree and
desolate common. The unity of tragic impression in homely life,
preserved in this plate, will give it a permanent value among the
great things of Art. La Mort et le Bûcheron is more tender, not more
nor less poetical, but less weird; and nothing short of a high and
vigorous imagination could have saved from chance of ridicule, in
days in which the symbolical has long ceased to be an habitual
channel of expression, this etching of the veiled skeleton of Death
appearing to the old man still busy with his field-work, and
beckoning him gently, while he, with simple and ignorant yet not
insensitive face, touched with awe and surprise, looks up under a
sudden spell it is vain to hope to cast off, since for him, however
unexpectedly, the hour has plainly come. Of this very fascinating
subject, there exist impressions from two different plates: one of the
plates, and in some respects the better and more pathetic one—the
one in which the figure of Death is gentler and more persuasive, and
in which the face of the woodman is the more mildly expressive—
having suffered an accident after only about a dozen impressions
had been taken from it. The second was then executed, with
something less at first than the success of the earlier one, so that
the almost unique and very rare impressions of the plate—whatever
may chance to be their money value—represent it to the least
advantage. It was retouched and retouched, and at length with
more of reward for the trouble than Legros has generally been able
to meet with when laboriously modifying his work in the attempt to
realise his conception more fully; until at last the enterprising
management of L’Art was enabled to offer its readers for about three
shillings a work of art not rare, indeed, but of exquisite beauty. The
success of the first plate, which the acid had covered in a moment of
neglect, had been almost refound.
A final word about the landscapes. As a painter of landscape M.
Legros is little known, but there exist, I believe, in London one or
two considerable collections of water colours which exhibit almost
exclusively his art in landscape. As far as the etchings show it at all,
it is of the most account when it is called in for the accompaniment
of one of those impressive and doleful ditties I have just been
speaking of. Sometimes, however, it is good without this mission and
significance, as in the Pécheur, where a delicate effect of early
morning is given with exquisite refinement. But at other times, in
which the artist is dealing with landscape charged for him with no
especial meaning, his very observation of it seems to have been
lacking in interest and acuteness, as in the broad slope of grass by
the stream-side in his big print Les Bûcherons—a whole surface of
ground that is treated mechanically and without any worthy
apprehension. And yet this print, despite certain unpleasantness,
contains in the heads of the woodcutters some of his finest work. A
much more sketchy subject, Paysage aux Meules, has greater unity
of impression. Like a good deal of Legros’s landscape, it is
distinctively French, this particular glimpse of field and farm and
rounded hill reminding one of the wide-stretching uplands of the
Haut Boulognais. Other landscapes are of England. Others, again,
are neither of England nor of France, nor of any land which may be
read of in the guide-book or visited by the enterprising tourist, but of
that land alone that rises in the imagination of artistic men.
INDEX.

Bracquemond. His originality and limitation, p. iii.

Claude. His Bouvier and Shepherd and Shepherdess conversing, p. 4.


Crome. His etchings, p. 9.

Earlom. His flower-pieces in mezzotint, p. 25.

Gonse. His catalogue of Jacquemart’s etchings, p. 18.

Haden. His quality of vigour, p. 2;


his judgment of Méryon, p. 4;
his earliest etchings, p. 5;
Mytton Hall, p. 7;
Egham, p. 7;
Water Meadow, p. 7;
Calais Pier, p. 7;
Penton Hook, p. 8;
Sunset on the Thames, p. 9;
Erith Marshes, p. 9;
Agamemnon, p. 10;
Sawley Abbey, p. 10;
Dusty Millers, p. 10;
his Dorsetshire etchings, p. 11.
Hamerton, p. iii. and p. 17.

Jacquemart. His happy circumstances, p. 12;


he renders the soul of matter, p. 14;
his etchings of Oriental and Sèvres porcelain, p. 15;
Brocca Italienne, p. 16;
Vase de Vieux Vincennes, p. 17;
Miroir Français, p. 20;
Vénus Marine, p. 21;
Salière de Troyes, p. 21;
his etchings after pictures, p. 23;
his flower-pieces, p. 25;
his work in water colour, p. 25;
his concern with Art, not nature, p. 27.

Legros. Essentially an etcher, p. 41;


his Procession dans les Caveaux de Saint-Médard, p. 42;
Dalou, p. 42;
Poynter, p. 42;
Manning, p. 42;
Rodin, p. 42;
Les Chantres Espagnols, p. 43;
Le Lutrin, p. 43;
La Mort du Vagabond, p. 44;
La Mort et le Bûcheron, p. 44;
his etched landscapes, p. 45.

Macbeth, p. iii.
Méryon. His method with architecture, p. 35.

Rembrandt. His Ephraim Bonus and Clément de Jonghe, p. 4;


his Portrait of a woman lightly etched, p. 15.

Thibaudeau. His catalogue of Legros’s etchings, p. 41.


Tissot, p. iii.

Vandyke. A decisive sketcher, p. 3.

Whistler. His quality of exquisiteness, p. 28;


his decorative arrangements, p. 29;
painted portraits, p. 30;
his etched portraits, p. 32;
Fanny Leyland, p. 33;
The Kitchen, p. 33;
La Vieille aux Loques, p. 34;
his Venice series, p. 35;
Free Trade Wharf, p. 37;
Billingsgate, p. 37;
Hungerford Bridge, p. 38;
Thames Police, p. 38;
Tyzack Whiteley, p. 38;
Black Lion Wharf, p. 38.
LONDON
PRINTED BY J. S. VIRTUE AND CO., LIMITED,
CITY ROAD.
OTHER WORKS BY MR. WEDMORE.

7s. 6d. EACH.

STUDIES IN ENGLISH ART.

GAINSBOROUGH, MORLAND, REYNOLDS, FLAXMAN, STOTHARD,


CROME, COTMAN, TURNER, CONSTABLE, DE WINT, DAVID COX,
CRUIKSHANK.

Two Volumes. Second Edition.

THE MASTERS OF GENRE PAINTING.

REMBRANDT, DE HOOGH, NICHOLAS MAES, METSU, TERBURG,


JAN STEEN, WATTEAU, LANCRET, PATER, CHARDIN, FRAGONARD,
HOGARTH, and WILKIE.

With Sixteen Illustrations.

PASTORALS OF FRANCE.

“A LAST LOVE AT PORNIC,” “YVONNE OF CROISIC,” “THE FOUR


BELLS OF CHARTRES.”

Second Edition.
ETCHINGS

ON SALE BY THE FINE ART SOCIETY.

By FRANCIS SEYMOUR HADEN.

£. s. d.
A By-road in Tipperary 6 6 0
A Water Meadow 4 4 0
Amalfi 1 11 6
Amstelodam 1 11 6
A Cottage Window 2 12 6
Battersea 4 4 0
Breaking up of the Agamemnon. First 5 5 0
State £7 7 0 Second State
Barque Refitting 1 1 0
Brentford Ferry 2 12 6
By Inveraron 3 3 0
Brig at Anchor 3 3 0
Cottages behind Horsley’s House 3 3 0
Cranbrook 3 3 0
Cardigan Bridge 2 12 6
Combe Bottom 4 4 0
Calais Pier. Second State 21 0 0
Do. Small 1 11 6
Dusty Millers 3 3 0
Evening 1 1 0
Early Morning—Richmond Park 2 12 6
Egham 2 2 0
Egham Lock 2 2 0
Erith Marshes 4 4 0
Fulham 2 12 6
Greenwich 8 8 0
Grim Spain—Burgos 3 3 0
House of the Smith 2 12 6
Hic Terminus Hæret 1 11 6
Horsley’s House at Willesley 4 4 0
Kensington Gardens. The Large Plate £2 3 3 0
12 6 Small Plate
Kew Side 2 12 6
Kilgaren Castle 2 12 6
Kenarth 2 12 6
Kidwelly Town 2 2 0
Mount’s Bay 3 3 0
Newcastle in Emlyn 2 12 6
O Laborum! 1 11 6
Out of Study Window 2 2 0
On the Test. First State 5 5 0
Purfleet 3 3 0
Penton Hook 4 4 0
Puff Asleep —
Railway Encroachment 2 2 0
Ruins in Wales 1 11 6
Sub Tegmine 3 3 0
Sonning Almshouses 2 2 0
Shepperton 2 2 0
Shere Millpond 5 5 0
Sunset on the Thames. First State £3 3 0 3 3 0
Second State
Sketch on Back of Zinc Plate 1 11 6
Sunset in Ireland 4 4 0
Sonning 3 3 0
Study of Stems 1 11 6
Twickenham Bushes 0 10 6
The Mill-Wheel. First State £3 3 0 Second 3 3 0
State
Thomas Haden of Derby 2 2 0
Thames Fishermen 4 4 0
The Herd 4 4 0
The Two Sheep 1 11 6
The Holly Field 1 1 0
Twickenham Church 3 3 0
Towing-Path. First State £4 4 0 Second 4 4 0
State
The Three Sisters 4 4 0
The Inn at Sawley. (Unfinished) 4 4 0
The Grande Chartreuse. (From Drawing 2 2 0
by Turner)
The Moat House 3 3 0
The Two Asses 1 11 6
The Turkish Bath, with One Figure 2 12 6
The Turkish Bath, with Two Figures 3 3 0
The Assignation 3 3 0
Thames Ditton 4 4 0
Willow Bank 2 2 0
Windmill Hill 3 3 0
Windsor 8 8 0
Ye Compleate Angler 3 3 0
Yacht Tavern, Erith 4 4 0
The Volume of “Études” 36 15 0
By J. A. McN. WHISTLER.

VENICE. A Series of Twelve Etchings.


Limited to 100 Sets, 50 Guineas the Set; or separately as follows:—
The Little Venice £4 4 0
The Two Doorways 6 6 0
The Beggars 8 8 0
The Nocturne 5 5 0
The Doorway 8 8 0
The River 5 5 0
The Little Mast 5 5 0
The Little Lagoon 4 4 0
The Palaces 8 8 0
The Mast 5 5 0
The Traghetto 8 8 0
The Piazzetta 4 4 0

SIXTEEN THAMES ETCHINGS.


Price 14 Guineas the Set in Portfolio; or separately as follows—
1. Black Lion Wharf £1 15 0
2. Wapping Wharf 1 11 6
3. The Forge 2 2 0
4. Old Westminster Bridge 1 5 0
5. Wapping 2 12 6
6. Old Hungerford 1 11 6
7. The Pool 1 11 6
8. The Fiddler 1 11 6
9. The Limeburners 2 2 0
10. The Little Pool 1 5 0
11. Eagle Wharf 1 15 0
12. Limehouse 1 11 6
13. Thames Warehouses 1 5 0
14. Millbank 1 5 0
15. Early Morning (Battersea) 1 1 0
16. Chelsea Bridge and Church 0 10 6

THE LITTLE LIMEHOUSE. One £1 11 6


Hundred Proofs Only

HURLINGHAM. Sixty Artist’s Proofs £3 3 0

FULHAM. Sixty Artist’s Proofs £3 3 0

PUTNEY. Sixty Artist’s Proofs £3 3 0

PUTNEY BRIDGE. Proofs £6 6 0

BATTERSEA BRIDGE. Proofs £6 6 0


By SAMUEL PALMER.

THE LONELY TOWER. From “Il Penseroso.”

THE HERDSMAN’S COTTAGE (1850). Plate destroyed.

THE BELLMAN. From “Il Penseroso” (1879). Sixty Remarque Proofs


(of which few remain unsold) £4 4 0
Plain Impressions 2 2 0

THE SKYLARK (1850). Plate destroyed £4 4 0

CHRISTMAS; or, Folding the Last Sheep. From Bampfylde’s “Sonnet”


(1850). A few Fine Proofs £3 3 0

THE WILLOW (1850). Mr. Palmer’s First Etching £0 10 6

THE SLEEPING SHEPHERD. Plate destroyed £4 4 0

EARLY MORNING—Opening the Fold. Remarque Proofs all sold.


Artist’s Proofs £2 2 0

THE VINE. Two Subjects on one Plate. Plate destroyed £5 5 0


THE EARLY PLOUGHMAN £2 2 0

THE HERDSMAN. Plate destroyed £6 6 0

THE MORNING OF LIFE. Plate destroyed £5 5 0

THE RISING MOON. Plate destroyed £5 5 0

In addition to these, a large number of examples of Etchings by


J. C. Hook, R.A., Rajon, Flameng, Unger, Gaillard, Waltner, Brunet-
Debaines, F. Bracquemond, Jacquemart, Chifflart, Daubigny, Le Rat,
Veyrassat, Appian, Tissot, Legros, Herkomer, &c., &c.
ART BOOKS

PUBLISHED BY THE FINE ART SOCIETY.

Note.—The rule of the Society in publishing Books is to make an


issue sufficient only to meet the demand at the time of
publication. By so doing they find the subscribers are materially
benefited, as their books quickly increase in value.

Mr. Ruskin’s Notes on his Turner Drawings. Exhibited at The Fine Art
Society’s Galleries, 1878. Illustrated Large-paper Edition,
consisting of 750 copies. Published £2 2s. Edition exhausted. A
copy sold at Christie’s, in April, 1881, for £4 4s.
The same, small paper, unillustrated, 2s. 6d.[2]
The type of these editions has been distributed.

Mr. Ruskin’s Notes on Samuel Prout and William Hunt. In illustration


of a Loan Collection of Drawings exhibited at The Fine Art
Society’s Galleries in 1879. Edition nearly exhausted. Large
Paper, Illustrated Edition, consisting of 500 copies, £2 2s.
The same, small paper, unillustrated, 2s. 6d.[2]
The type of these editions has been distributed.

Mr. Seymour Haden’s Notes on Etching. In illustration of the Art, and


of his Collection of Etchings and Engravings of the Old Masters,
exhibited at The Fine Art Society’s Galleries, 1879. Large Paper,
Illustrated Edition, limited to 500 copies, £2 2s.
The same, small paper, unillustrated, 1s.[2]
The type of these editions has been distributed.

J. F. Millet—A Biography by W. E. Henley. Illustrated with Twenty


Etchings and Woodcuts, reproduced in facsimile. Large-paper
Edition, limited to 500 copies, £1 1s.

Samuel Palmer: A Biography by his Son, Mr. A. H. Palmer. Illustrated


with an Original Etching by Samuel Palmer, entitled “Christmas,”
and several Autotypes and Wood Engravings. The Edition will be
limited to 500 copies. Price 31s. 6d.
[In the Press.

The Year’s Art, 1882. A concise Epitome of all matters relating to


Painting, Sculpture, and Architecture, which have occurred
during the year 1881, in the United Kingdom, together with
Information respecting the events of 1882. By Marcus B. Huish.
Price 2s. 6d.

Notes by Mr. F. G. Stephens on a Collection of Drawings and


Woodcuts by Thomas Bewick. Exhibited at the Fine Art Society’s
Rooms, 1880. Large Paper, Illustrated Edition, limited to 300
copies. Published at 21s.; price 31s. 6d. Edition exhausted.
The same, small paper, unillustrated, 1s.[2]
The type of these editions has been distributed.

Memoir and Complete Descriptive Catalogue of the Works of Charles


Méryon. By Philip Burty and Marcus B. Huish. 1879. Limited to 125
copies; type distributed. Published at 16s.; price 21s.
2. These Handbooks, together with “John Everett Millais, R.A.,” by Andrew
Lang; “Samuel Palmer,” by F. G. Stephens; and “The Sea Painters,” are
sold bound in half calf, complete in one Volume, price 10s. 6d.
Transcriber’s Notes:
Missing or obscured punctuation was
silently corrected.
Typographical errors were silently
corrected.
Inconsistent spelling and hyphenation
were made consistent only when a
predominant form was found in this book.
*** END OF THE PROJECT GUTENBERG EBOOK FOUR MASTERS OF
ETCHING ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.

You might also like