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

[Ebooks PDF] download (Ebook) Building Single Page Applications in .NET Core 3: Jumpstart Coding Using Blazor and C# by Michele Aponte ISBN 9781484257463, 1484257464 full chapters

The document provides information about various ebooks related to building applications using .NET and Blazor, including titles, authors, and ISBNs. It highlights the practical approach of Michele Aponte's book 'Building Single Page Applications in .NET Core 3,' which focuses on using Blazor to create applications without relying on JavaScript. The content includes chapters on creating single-page applications, reusable components, and deployment strategies.

Uploaded by

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

[Ebooks PDF] download (Ebook) Building Single Page Applications in .NET Core 3: Jumpstart Coding Using Blazor and C# by Michele Aponte ISBN 9781484257463, 1484257464 full chapters

The document provides information about various ebooks related to building applications using .NET and Blazor, including titles, authors, and ISBNs. It highlights the practical approach of Michele Aponte's book 'Building Single Page Applications in .NET Core 3,' which focuses on using Blazor to create applications without relying on JavaScript. The content includes chapters on creating single-page applications, reusable components, and deployment strategies.

Uploaded by

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

Download Full Version ebook - Visit ebooknice.

com

(Ebook) Building Single Page Applications in .NET


Core 3: Jumpstart Coding Using Blazor and C# by
Michele Aponte ISBN 9781484257463, 1484257464

https://ebooknice.com/product/building-single-page-
applications-in-net-core-3-jumpstart-coding-using-blazor-
and-c-11115594

Click the button below to download

DOWLOAD EBOOK

Discover More Ebook - Explore Now at ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) Building Single Page Applications in .NET Core 3 :


Jumpstart Coding Using Blazor and C# by Michele Aponte
ISBN 9781484257463, 9781484257470, 1484257464, 1484257472
https://ebooknice.com/product/building-single-page-applications-in-
net-core-3-jumpstart-coding-using-blazor-and-c-22417414

ebooknice.com

(Ebook) Building Microservices with .NET Core 2.0:


Transitioning Monolithic Architectures Using Microservices
with .NET Core 2.0 Using C# 7.0 by Gaurav Aroraa ISBN
9781788399968, 178839996X
https://ebooknice.com/product/building-microservices-with-net-
core-2-0-transitioning-monolithic-architectures-using-microservices-
with-net-core-2-0-using-c-7-0-11639002
ebooknice.com

(Ebook) Microsoft Blazor: Building Web Applications in


.NET - Second Edition by Peter Himschoot ISBN
9781484259283, 1484259289
https://ebooknice.com/product/microsoft-blazor-building-web-
applications-in-net-second-edition-49857536

ebooknice.com

(Ebook) Blazor Revealed: Building Web Applications in .NET


by Peter Himschoot ISBN 9781484243428, 9781484243435,
1484243420, 1484243439
https://ebooknice.com/product/blazor-revealed-building-web-
applications-in-net-24014974

ebooknice.com
(Ebook) Learning Blazor: Build Single-Page Apps with
WebAssembly and C# by David Pine ISBN 9781492098416,
9781098113216, 1492098418, 1098113217
https://ebooknice.com/product/learning-blazor-build-single-page-apps-
with-webassembly-and-c-48681674

ebooknice.com

(Ebook) C# 8.0 and .NET Core 3.0 – Modern Cross-Platform


Development: Build applications with C#, .NET Core, Entity
Framework Core, ASP.NET Core, and ML.NET using Visual
Studio Code, 4th Edition by Mark J. Price ISBN
https://ebooknice.com/product/c-8-0-and-net-core-3-0-modern-cross-
9781788471572, 1788471571
platform-development-build-applications-with-c-net-core-entity-
framework-core-asp-net-core-and-ml-net-using-visual-studio-code-4th-
edition-11074338
ebooknice.com

(Ebook) Microsoft Blazor: Building Web Applications in


.NET 6 and Beyond - Third Edition by Peter Himschoot ISBN
9781484278444, 1484278445
https://ebooknice.com/product/microsoft-blazor-building-web-
applications-in-net-6-and-beyond-third-edition-36528582

ebooknice.com

(Ebook) C# 12 and .NET 8 – Modern Cross-Platform


Development Fundamentals: Start building websites and
services with ASP.NET Core 8, Blazor, and EF Core 8, 8th
Edition by Mark J. Price ISBN 9781837635870, 1837635870
https://ebooknice.com/product/c-12-and-net-8-modern-cross-platform-
development-fundamentals-start-building-websites-and-services-with-
asp-net-core-8-blazor-and-ef-core-8-8th-edition-56051966
ebooknice.com

(Ebook) Microsoft Blazor: Building Web Applications in


.NET 6 and Beyond by Peter Himschoot ISBN 9781484278451,
9781484278444, 1484278445, 1484278453, B09N94DWXQ
https://ebooknice.com/product/microsoft-blazor-building-web-
applications-in-net-6-and-beyond-46394982

ebooknice.com
Michele Aponte

Building Single Page Applications in


.NET Core 3
Jumpstart Coding Using Blazor and C#
Michele Aponte
Torre del Greco (NA), Italy

Any source code or other supplementary material referenced by the


author in this book is available to readers on GitHub via the book’s
product page, located at www.​apress.​com/​9781484257463. For more
detailed information, please visit www.​apress.​com/​source-code.

ISBN 978-1-4842-5746-3 e-ISBN 978-1-4842-5747-0


https://doi.org/10.1007/978-1-4842-5747-0

© Michele Aponte 2020

This work is subject to copyright. All rights are reserved by the


Publisher, whether the whole or part of the material is concerned,
specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other
physical way, and transmission or information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.

The use of general descriptive names, registered names, trademarks,


service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.

The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

Distributed to the book trade worldwide by Springer Science+Business


Media New York, 233 Spring Street, 6th Floor, New York, NY 10013.
Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-
[email protected], or visit www.springeronline.com. Apress Media,
LLC is a California LLC, and the sole member (owner) is Springer
Science + Business Media Finance Inc (SSBM Finance Inc). SSBM
Finance Inc is a Delaware corporation.
To my son, Francesco Paolo: I hope that one day you will read this book
and be as proud of me as I am of you, especially every time you smile
when you catch my eye.
Introduction
Blazor has garnered a great deal of enthusiasm since its initial release.
I’ve followed the framework from the beginning, and when teaching
any new technology, I use a practical approach. This book looks at the
needs of real applications and answers all the questions you might have
when learning how to use Blazor.
Specifically, in Chapter 1, I focus on the success of this framework
and how it solves one of the problems most felt by Microsoft
programmers: using JavaScript. Blazor allows you to use .NET directly
in the browser, using open standards so as not to repeat the mistakes of
the past. In my opinion, however, it is important to understand how
Blazor works beyond the tools made available by the development
environment, so I focus on the code in this book. I start with a simple
example, without using the templates made available by Microsoft, to
highlight how it works.
In Chapter 2, you will find a detailed comparison between the two
versions of Blazor for web development: Blazor Server and Blazor
WebAssembly. Using the example from the first chapter, I compare the
two versions by highlighting what is going on behind the scenes and
how WebAssembly is revolutionizing the world of front-end
development. I explain how to choose a version based your
requirements because they both have pros and cons and must be
contextualized in your environment/situation.
In Chapter 3, I cover all the concepts necessary to create a single-
page application, starting from scratch and tackling some issues
concerning the decomposition of the interface into components. In this
chapter, you will learn how to create pages and navigate between them,
you will see how to create forms for data entry, and you will learn how
to integrate the front end with the back-end, differentiating the
approach between the two versions of the framework but
standardizing their use thanks to the dependency injection of ASP.NET
Core. Here you will discover that the framework allows you to invoke
JavaScript functions from .NET and to invoke .NET methods from
JavaScript functions.
In Chapter 4, I explain how to create libraries of reusable
components, addressing how to generalize components thanks to the
framework’s ability to use .NET Generics and content projection. What
may seem like more advanced aspects are actually necessary to avoid
reinventing the wheel on each page of your application; this also allows
you to start creating your own Blazor component library.
In Chapter 5, I cover application deployment, using both versions of
the framework. It’s important to know where your application will run,
since scalability problems must be addressed and will impact how you
write the application.
You can find the code for the first two chapters of the book in the
countdown and countdown-wasm folders of the code download; you
can use the two versions to see the differences between Blazor Server
and Blazor WebAssembly within the same small application. The code
for the third and fourth chapters, where you learn to create a small
article manager, is available for both versions of the framework in eight
pieces that follow the flow of the chapters.
The application structure
Pages and routing
Components and their use in pages
Back-end integration and shared library
JavaScript interoperability
Separation of the code into different files
Blazor Library
Custom input component
You can copy and execute the code that accompanies the book, but I
suggest you write it from scratch by following the instructions in the
chapters. That’s the best way to learn Blazor!
Acknowledgments
Writing a book is hard work that requires a lot of time and inevitably
involves the lives of those closest to the author. I want to thank my life
partner, Raffaella, for her support for this project and her patience with
me. I also want to thank my old friend, whose name is Raffaella as well,
for the help she gave me in revising my English.
A special thanks also goes to all the employees of Blexin, my
company, who are the best team one could have and with whom I can
experiment every day with the technologies described in this book.
Finally, many thanks to the fantastic Apress team that supported me
during this project.
Table of Contents
Chapter 1:​The Case for Blazor
Why You Fear JavaScript
Code Nightmares
Mitigate the Problem with TypeScript
Why You Need a JavaScript Framework
You Can Have Your Cake and Eat It Too with Blazor
Your First Blazor Application
What You Need to Get Started
Getting Started
Summary
Chapter 2:​Blazor Server vs.​Blazor WebAssembly
How the Countdown Application Works
Running the Countdown Application in the Browser
WebAssembly Revolution
Which Blazor to Choose
Summary
Chapter 3:​Create Your Single-Page Application
Everything Is a Component
Component Tree
Component Size
Reusability, Customization, and Independence
Component Logic
Creating the Application Structure
The Main Menu Component
Page Navigation with Blazor
Managing CRUD Operations
Creating a CRUD Service
Implementing CRUD Services
Where to Place the Component Code
JavaScript Interoperability​
Summary
Chapter 4:​Build Your Reusable Blazor Library
Creating a Component Library
Creating a Templated Component
Creating a Generic Component
Creating Custom Input Components
Summary
Chapter 5:​Deploy Your Application
Deploying a Blazor Server App
Deploying a Blazor WebAssembly App
Summary
Index
About the Author
Michele Aponte
is a programmer who has worked with Java, .NET, and JavaScript at
software and IT consulting companies in his native Italy since 1993.
Combining his training, consulting, and development skills, in 2013
Michele founded Blexin to help customers migrate older software and
systems to new technologies to improve their businesses. Passionate
about programming, Michele embraces sharing with the community. He
founded DotNetCampania, a Microsoft User Group in 2008, and has
organized many regional conferences. He is also the founder of Blazor
Developer Italiani, the Italian developer group about the Blazor
framework. Recognized as a Microsoft MVP, he often presents on
Microsoft and JavaScript topics at tech conferences throughout Italy.
© Michele Aponte 2020
M. Aponte, Building Single Page Applications in .NET Core 3
https://doi.org/10.1007/978-1-4842-5747-0_1

1. The Case for Blazor


Michele Aponte1
(1) Torre del Greco (NA), Italy

During the Web 2.0 revolution, we had our first opportunity to port
desktop applications to the Web. Thanks to the Ajax technology, which
allowed us to do asynchronous calls to the server for the first time, we
no longer had to suffer through a page reload every time the user
updated the interface. We could finally get to the core of and resolve the
main problems of desktop application development.
With a complete server-side application, we no longer need to
install anything because we use the application through a browser,
simplifying the release of the updates and controlling the current
version used by our clients.
Unfortunately, all that glitters is not gold! If the user interface is
entirely built on the server side, moving the application to the server
has two distinct disadvantages. First, we must always be online to
contact the server, and second, all the computational effort for the
presentation layer passes from the customer’s computer to the server.
To solve these problems, we need to move the user interface
construction to the client. But if the application runs in a browser, we
need to write a substantial part of the code in JavaScript, and if you are
a .NET developer, this task has probably given you nightmares. If it has
not, in this chapter we’ll explore why it should with a simple example
that would frighten anyone coming from a strongly typed language.
Microsoft provided developers with a solution to these problems via
a front-end technology called Silverlight, together with a simplified
Windows Communication Foundation (WCF) back-end called Rich
Internet Application (RIA) services, that allowed us to use the .NET
Framework in the browser with the installation of a plug-in. Many
companies invested in this technology, but a few years later, Microsoft
decided to abandon the project, making those who today want to
approach Blazor somewhat gun-shy.
But Blazor is different. Blazor is based on standard technologies, not
Microsoft technologies. You don’t need to install anything on your
client, because the framework provides you with everything you need
to use .NET Core in the browser, taking advantage of what is already
there. If you are a Microsoft web developer and do not want to spend
your time learning JavaScript frameworks, Blazor is the solution for
you. I have helped many companies to adopt it successfully, and it has a
low learning curve and allows you to reuse your .NET Core knowledge.
In this chapter, we’ll work to overcome your fear of JavaScript and get
you on your way to creating your first Blazor application.

Why You Fear JavaScript


Why do I, as Microsoft developer, try to avoid JavaScript? Well, there are
a few good reasons, but the driving one is the dynamic nature of the
language with its runtime type checking and some other peculiarities
that we will take a look at soon. Another important reason is the
Microsoft approach to web development, which has always discouraged
developers from using JavaScript.
With ASP.NET Web Forms, the approach was to drag and drop
controls on the form, set their properties, and write code in event
handlers. The Web Forms engine generated the HTML and JavaScript
for you. Only with ASP.NET MVC do developers finally have control over
their HTML and JavaScript, by using jQuery and its plugins for the main
application development activities such as validation. It is also possible
to use HTML helpers and data annotations with ASP.NET MVC to
generate the correct configuration for the jQuery plugin (jQuery
Unobtrusive Validation).
The jQuery library can help you with simple tasks such as DOM
manipulation and asynchronous calls to the back-end, but moving the
user interface construction onto the client means writing the entire
front-end in JavaScript with all the problems of maintenance and
productivity that the language can bring with it. Let’s see why.

Code Nightmares
In all my JavaScript courses for .NET developers, I like to start the
lessons by creating an example.js file and writing the code shown in
Listing 1-1. This shows some JavaScript features that will surely
impress a C# or Visual Basic developer and immediately clarifies the
difficulties of a language so different from those .NET developers are
used to using.

function computes1() {
a = 10;
}
function computes2() {
a = 'hello'
}
computes1();
computes2();
console.log(a);
Listing 1-1 Some of the JavaScript Problems Summarized in a Single Script

Without executing the code, what is the result? Are you scared? If
you are not, you should be, because this code works, and the result is
hello. That means the variable a cannot be declared anywhere, its
scope is global, and its type can change without any problems from
number to string. In the computes2 function, I omitted the
semicolon because it is not required in JavaScript.
The language is case sensitive, so fullname and fullName are
different variables. If you cannot declare a variable and you fail to write
a variable name, the engine creates another global variable for you,
with an incredible loss of time in your debug sessions.

Note In JavaScript you can force the engine to check that variables
are declared with the "use strict"; directive (I see the smiles of
Visual Basic programmers), but it only comes in ECMAScript 5, so
some old browser will ignore it.

If you are a competent programmer, you always declare your variables.


In JavaScript you use the var keyword to do that, but let’s look at the
code of Listing 1-2. What’s wrong?

function computes() {
var a = 10;
if(a == '10') {
var b = 'ok';
}
console.log(b);
}
computes();
Listing 1-2 Some JavaScript Peculiarity for a .NET Developer

The execution result of the code is ok. Are you confused? The if
statement is true because in JavaScript the == operator executes the
type coercion between operands, converting the value of one operand
to the type of another. If you convert the value of the variable a from
the number 10 to the string ‘10’, the result of the condition is true. If
you do not want to allow this conversion, you can use the === operator.
The most interesting thing is that the b variable is declared in the
if block, so you could imagine that console.log(b) returns an
error both if condition is true and if it is false. Unfortunately, in
JavaScript, the scope of a declared variable is always at the function
level, not at the block level, so the b variable exists outside the if block.
Whether the if condition is false, which is the value of b? The
assignment of the ok string will be not executed, so its value will be
undefined. That is not null, but undefined, which is a possible
value of a JavaScript variable that represents the state of declared but
not initialized. I wish I could see your face right now!

Note In ECMAScript 6 you can use the keyword let instead of var
to declare a variable with block scope, but if your browser does not
support it, an error will be generated.

Mitigate the Problem with TypeScript


Another problem with JavaScript is the adoption of the newest
standard by browsers. For example, with ECMAScript 6 (ES6), we have
class support, the let keyword, arrow functions, and some other
improvements that can help to write more maintainable code, but some
older browsers do not support ES6. This same problem will continue
with the next versions, so we need a solution that permits us not to go
crazy.
TypeScript is the response from Microsoft to this problem: it
introduces a transpiler that translates the code written in a new
language (TypeScript) to a target JavaScript standard.

Note I sometimes use JavaScript standard instead of the term


ECMAScript because many developers do not know the history of
JavaScript. If you are interested in exploring the history, take a few
moments to learn about it from the legendary Douglas Crockford in
his “Crockford on JavaScript” series. (If you don’t know who he is,
take a break to learn more:
https://www.youtube.com/watch?v=RO1Wnu-xKoY.)

TypeScript is a superset of JavaScript that adds features to the language


such as typing support and the ability to use all the constructs in any
version of JavaScript, improving both the maintenance and the
productivity of the application.
In short, you can write TypeScript code in a syntax that is similar to
C#, with support for the current and next versions of JavaScript, and
compile it (transpile is the correct term) in JavaScript code. In the end,
it is always JavaScript, with all the limits that we have already talked
about, but with TypeScript, you have a tool that checks the types of
your variables and converts the code to a configured JavaScript
standard while applying all the recommended best practices. (This
conversion process is technically called transpiling, and the TypeScript
compiler is called the transpiler.)
Why You Need a JavaScript Framework
TypeScript is a great help, and frameworks such as Angular and
libraries such as React have adopted it to shorten the code refactoring
process. However, think about writing your whole client with it: that
would be like writing your application in C# without the .NET
Framework. OK, maybe the comparison is a bit strong, but the concept
is close to reality.
For this reason, frameworks like Angular were born. They offer you
everything you need to build your client using JavaScript. Angular
provides you with libraries to manage forms, to call a REST API back-
end, to organize your application into a manageable structure, and to
provide a dependency injection tool to improve testability and
separation of concerns.
To improve the user experience, it is often necessary to create a
single-page application to allow navigation within your application
without actually navigating between physically separate pages. For this
purpose, these frameworks provide a routing engine, which
dynamically controls the navigation among different pages; the routing
engine manipulates the DOM of your single page on the fly, while also
updating the browser history.
The negative aspect of these solutions is their complexity, and in
some cases the performance provided. Moreover, if you have some view
models or data transfer objects (DTOs) provided by the API, you need
to replicate them in TypeScript and keep them aligned. If your back-end
changes, no compiler warns you that a change has happened, because
you have two separate projects with two different technologies. Luckily,
if your back-end is written in .NET Core, now you have Blazor, an
attractive alternative!

You Can Have Your Cake and Eat It Too with Blazor
Microsoft released the release-to-manufacturing (RTM) version of
Blazor with .NET Core 3, a new front-end framework that solves all the
problems previously mentioned. Thanks to it, you can use C# and the
.NET Core framework to write the front-end of your application, using
all the technologies you already know if you are a Microsoft web
developer.
You can use Razor, HTML, and C# to define the user interface and
use anything you want for the rest of the application. Blazor lets you
run the front-end directly in the browser, providing all the tools you
need to create a single-page application.
Blazor was created in 2017 as a personal project of Steve
Sanderson, who presented a preview of Blazor based on
DotNetAnywhere , a .NET Intermediate Language (IL) interpreter, at
NDC Oslo (https://www.youtube.com/watch?
v=MiLAE6HMr10&feature=youtu.be&t=31m45s). After this
presentation, Blazor was added to the ASP.NET GitHub repository as an
experimental project, but the enthusiasm of the community convinced
Microsoft to move the project to the ASP.NET team, replacing
DotNetAnywhere with Mono, which is the most famous open source
platform based on the .NET Framework (https://www.mono-
project.com/).
With the .NET Core 3 release, Blazor has become part of the
framework, with an ambitious roadmap. As you can see in Figure 1-1, at
the moment you can create the front-end of a web application with
Blazor, but the idea is to eventually be able to build desktop and mobile
applications with it, going through a progressive web app (PWA)
approach as an intermediate step.

Figure 1-1 Blazor roadmap

Blazor Server is the version that ships with .NET Core 3, and it
allows you to prerender the HTML of your application, execute the C#
code on the server side, and push the user interface changes to the page
through SignalR. Blazor WebAssembly is available from May 2020, and
it executes the C# code directly in the browser. You can use Blazor
WebAssembly with .NET Core 3.1.300 or later.
Blazor Hybrid will be a native .NET renderer to Electron and
WebView, and it will be a native app that works online and offline.
Electron (electronjs.org) is a popular open source project to
create cross-platform desktop applications using web technologies. As
an example, Visual Studio Code is based on Electron. Blazor Native, on
the other hand, will have the same programming model but without
HTML rendering. In this book, we talk about Blazor Server and Blazor
WebAssembly because they are the only confirmed projects with
precise dates of release, but Microsoft has long-term plans for this
technology, so there’s no time like the present to learn it.

Your First Blazor Application


“When it comes to new frameworks, I believe in a practical approach!”
Alastor Moody spoke of the dark arts in Harry Potter and the Goblet
of Fire, and for me, it is the same. We will start with a simple application
to get into the framework flow, and we’ll use the minimum code that we
need. Our first step will be to install all the necessary tools.

What You Need to Get Started


Blazor is based on .NET Core 3, but you can use your favorite operating
system to follow the examples in this book (and on its GitHub repo). If
you use Visual Studio, you are tied to Microsoft Windows. The
development environment is important in a real development process,
but for teaching purposes, I generally choose tools that are available for
all operating systems supported by .NET Core.
The first step is to download and install .NET Core 3.1, from
https://dotnet.microsoft.com/download. This release
contains both Blazor Server, already available for production
environments, and Blazor WebAssembly, which has been released in
preview.
For a development environment, you can download Visual Studio
Code, the free and cross-platform code editor from Microsoft. You can
get it https://code.visualstudio.com/.
Getting Started
Now that we are set up with the right tools, we are ready to get started
with our first Blazor application. We will use the .NET CLI, the
command-line interface provided with .NET Core that allows us to
create, build, and execute a .NET Core application. Microsoft provides
some templates to start using Blazor, but I find it is educational to start
from zero, both to learn how it is different from a classical .NET Core
application and to learn how Blazor works. In our case, we need to
create an empty web application. To do this, open the terminal window
and execute the command dotnet new web -o countdown.
The .NET Core CLI creates the countdown folder, with all the
starter code for a new application. Open the folder in Visual Studio
Code to see the project structure. If you are already familiar with .NET
Core, you will have noticed that this is the base structure of a web
application (Figure 1-2).

Figure 1-2 Structure of a .NET Core 3.1 web project

In Blazor Server, the server-side construction of the user interface is


based on Razor Pages, an alternative approach provided by Microsoft to
the MVC pattern. It is based on the concept of pages instead of
controllers and views, and its goal is to be more productive and provide
immediate results. In the Startup.cs file, we need to load the
configuration for Razor Pages and Blazor Server, as shown in Listing 1-
3.

public void ConfigureServices(IServiceCollection


services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
}
Listing 1-3 Startup Configuration of a Blazor Server Application
In the Configure() method , we need to add support for static
files, the endpoints for the Blazor Server Hub, and the fallback for the
page. Look at Listing 1-4.

public void Configure(IApplicationBuilder app,


IWebHostEnvironment env)
{
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
});
}
Listing 1-4 Blazor Server Endpoints Configuration

The word Hub in endpoint.MapBlazorHub() should be


familiar if you already know how SignalR works, but we will go into
more detail in Chapter 2. The line
endpoints.MapFallbackToPage("/_Host") sets the page to
navigate to if the specified resource is not found and also sets the
default page for our application. We need to create a file called
_Host.cshtml in a folder named Pages. The folder Pages is
required by default, because the Razor Pages engine searches for pages
in this location. The _Host.cshtml file contains the base HTML of the
application and the code for rendering our first Blazor component
(Listing 1-5).

@page "/"
@namespace countdown.Pages
<!DOCTYPE html>
<html lang="en">
<head>
<title>Countdown App</title>
</head>
<body>
@(await Html.RenderComponentAsync<Countdown>(
RenderMode.ServerPrerendered))
<script src="_framework/blazor.server.js">
</script>
</body>
</html>
Listing 1-5 Blazor Server Host Page
Blazor uses the same component concept as all modern UI
frameworks, in which a set of pieces, called Blazor components,
composes the user interface like in a puzzle. A Blazor component is,
therefore, a reusable piece of your user interface that can contain both
HTML (with its C# code) and other Blazor components.
I will talk about components in forthcoming chapters; for now, think
of them as reusable pieces of your user interface. The
RenderComponentAsync() method renders the component
indicated in its generic parameter (Countdown in our case) with a
server prerendered modality. This method of rendering a component is
a peculiarity of Blazor Server and is not used, for example, in Blazor
WebAssembly; we will talk about the differences in depth in Chapter 2.
The script _framework/blazor.server.js loads the
JavaScript code of Blazor that permits the communication with the
server. Note that to permit the loading of the script, we need to invoke
the app.UseStaticFiles() method in the Startup class (see
Listing 1-4).
It’s time to create our first Blazor component! Let’s create a file
named Countdown.razor in the root folder. Our goal is to create a
component that implements a simple countdown from 10 to 0 when
the user clicks a Start button. Let’s start with an intermediate step in
which we define the user interface and initialize the countdown when
someone clicks the Start button. See Listing 1-6.

@using Microsoft.AspNetCore.Components.Web

<h1>Countdown</h1>
<p>@count</p>
<button @onclick="startCountdown">Start</button>

@code {
private int count = 0;
private void startCountdown()
{
count = 10;
}
}
Listing 1-6 Countdown Razor Component Start Code

The @page directive indicates the path where this component


responds, and the using statement loads the elements of the Blazor
framework. The markup defines your interface: a title, a paragraph, and
a button. It is simple HTML with some Razor instructions. The @count
instruction writes the value of the variable count. The framework
updates the value in the paragraph for you when it changes. When the
user clicks the Start button, the startCountdown() method is called
thanks to the @onclick="startCountdown" statement.
The @code block allows you to define the C# code of the
component. A Razor file is a C# class behind the scenes, so you can
create attributes and methods to manage the status of your component.
In Listing 1-6 we set the attribute count to the value 10 when the
startCountdown() method is invoked. To implement a countdown,
we need to add a timer that decreases the count to 0. Let’s change the
@code block as in Listing 1-7.

@code {
private int count = 0;

private void startCountdown()


{
count = 10;
Timer timer = new Timer(1000);
timer.Elapsed += (source, e) => {
count--;
if(count == 0) timer.Stop();
};
timer.Start();
}
}
Listing 1-7 Countdown Razor Component Code
We created a simple Timer object that executes the callback
subscribed to the Elapsed event every second (you need to add the
instruction @using System.Timers at the top of the page to use the
Timer class). It’s simple, but it does not work because the code in the
callback is executed in a separate thread, and when the variable count
decreases, the change is not detected by the Blazor framework.
We can solve the problem by manually alerting the framework that
the component state has been modified, calling the
StateHasChanged() method . But this method must be invoked
from the same thread of the user interface, and then we need to use the
classical InvokeAsync() method . See Listing 1-8.

private void startCountdown()


{
count = 10;
Timer timer = new Timer(1000);
timer.Elapsed += (source, e) => {
count--;
InvokeAsync(() => StateHasChanged());
if(count == 0) timer.Stop();
};
timer.Start();
}
Listing 1-8 Countdown Razor Component Code Fixed
You can see the result in Figure 1-3.

Figure 1-3 Our first Blazor Server app at work

Summary
In this first chapter, I talked about why Blazor is a viable solution for
.NET developers who need to create a modern web application with a
rich user interface without taking the time to learn the JavaScript
language and frameworks.
You also learned that the first version of Blazor was released with
.NET Core 3 and that a library ecosystem and complex use cases are not
yet available but are forthcoming. In addition, you learned that
Microsoft’s vision for this technology is long-term, and the company is
paying great attention to the use of web standards rather than
proprietary technologies.
In the next chapter, I will cover how Blazor works internally and the
main differences between Blazor Server and Blazor WebAssembly so
you know which to pick for your needs.
© Michele Aponte 2020
M. Aponte, Building Single Page Applications in .NET Core 3
https://doi.org/10.1007/978-1-4842-5747-0_2

2. Blazor Server vs. Blazor WebAssembly


Michele Aponte1
(1) Torre del Greco (NA), Italy

As I always say, there is not one tool that does everything but instead different tools for
different requirements. A good programmer chooses his tools solely according to the
requirements. You have to remember that requirements can be functional and
nonfunctional, and often nonfunctional requirements are more important than
functional ones for the success of an application.
You might think that Microsoft released Blazor Server before Blazor WebAssembly
just because the latter was not ready yet; however, as you will see in this chapter, Blazor
Server and Blazor WebAssembly solve the same problem with different approaches. You
must choose which one will work best for you depending on your requirements.

How the Countdown Application Works


In Chapter 1, we created a sample application with Blazor Server that counts down from
10 to 0 when the user clicks a Start button. The code is simple if you know .NET, but
how does it work behind the scenes?
Let’s run the application and open it in your favorite browser. I use Google Chrome,
but as you probably know, the new versions of Edge use Chromium, the same engine as
Chrome, so you can use Edge if you prefer it. Open the browser developer tools and go
to the Network panel (Figure 2-1).
Figure 2-1 Blazor Server application client downloads
The HTML is rendered on the server side, and the script blazor.server.js is
downloaded and executed in the browser. The script starts the connection with the
SignalR Hubs API and opens a WebSocket from the server to the client.
SignalR is a Microsoft library that allows data to be pushed from the server to the
client using the best-performing channel available. It is popular in the Microsoft
ecosystem because it solves the problem of updating the client when something changes
on the server, without having to rely on the classic JavaScript polling that periodically
calls the server to check for changes to show in the interface. From the developer’s point
of view, it is sufficient to define a class that extends the base Hub class, from which it is
possible to invoke a JavaScript callback in the client page. The library selects for you the
best technique to implement the communication.
When the page loading is complete, the client library starts the negotiation with the
server (the negotiate?negotiatedVersion=1 call in Figure 2-1) to choose the
best type of communication. If available, the first choice is the use of WebSocket, a
standard protocol (RFC 6455, standardized for web browsers by the W3C) that provides
a full-duplex communication channel over a single TCP communication. A WebSocket is
the best choice in terms of performance but requires the support of both the browser
and the application server. Usually, this is not a problem because all modern browsers
support WebSocket, and looking at Microsoft solutions for web hosting, WebSocket is
supported starting from Windows Server 2008 R2 and Windows 7; in addition, it is
available on all the Windows Azure hosting services for web applications.
If the client and the server cannot start a WebSocket connection, the library
downgrades to Server-Sent Events techniques. As with WebSocket, a Server-Sent Events
communication pushes data from the server to the client without polling, but in this
case, the communication is one way. After a first HTTP response of type text/event-
stream, the server can send data that the client can receive with a simple callback on
the EventSource object (Listing 2-1).

const eventSource = new EventSource('url');


eventSource.onmessage = (e) => {
[...]
};
Listing 2-1 The JavaScript Callback to receive data in Server-Sent Events Communication
If Server-Sent Events is also unavailable, SignalR downgrades to long polling
communication, an optimized variant of the type of polling where the client sends
requests to the server to check for changes. In the simple type of polling, if you send
requests periodically, for example, every five seconds, you can have a five-second delay
on the update, and if there are no changes, your requests consume resources without
results. By contrast, long polling tries to mitigate these problems by leaving a request
suspended and pending until a change occurs. When the client finally receives a
response or the connection is lost for a network error, it immediately makes a new
request.
Blazor Server uses SignalR to push the update of the user interface to the client. In
Figure 2-1, you can see the opened WebSocket (_blazor?
id=tUNimLBwWGmBUSy3qHFgfQ). If you click the WS tab of the Network panel, as in
Figure 2-2, you can see the data exchanged in detail.

Figure 2-2 Countdown application BlazorHub WebSocket


Exploring the Variety of Random
Documents with Different Content
amiable, and so clever. Did you ever hear that she sometimes writes for the
Reviews? She does indeed; and one must have real genius, you know, to do
that; not like little bits of newspapers. And people must have some sort of
rule—some will not call unless they have an introduction, and some will
call on everybody. But we make Lady Curtis our rule. If she goes, we all
go.”
“You did not wait till Lady Curtis came,” said Nancy gratefully.
“Oh, no! I don’t think I could have done it. I fell in love with you the
first time I saw you my dear. I told Lucy of it directly. So pretty, I said, (as
you are, though people don’t generally say it to your face like me), and
quite a lady. ‘Then, of course you should call. I wonder you did not call
instantly,’ said Lucy; and I did not lose much time, did I, Mrs. Arthur?
Then, of course, I was dying to know who you were.”
“You are very—very kind; but how could you know who I am? I am
nobody,” said Nancy with a smile; and then she added impulsively, “but I
am so glad you thought me—a lady.” When these unadvised words were
out of her mouth, Nancy changed colour, and grew defiant. But her horror
at her own mistake was entirely turned away by Cousin Julia’s soft
disposition, which was well fitted to be a buckler against wrath.
“As if there could be any doubt of that!” she said, “Lady Curtis says you
have such pretty manners, and Sir John! Sir John is really not himself. He
thought you must be young Seymour’s wife, whom I was telling you of,
who made such an admirable marriage. He married one of the Glencoe
family, quite a near relative of the Earl, the most unexceptionable delightful
match. How we all thought of poor Arthur when young Seymour was
married! But I told Sir John (now you must not be vain, my dear, but of
course one must say what one thinks) I told Sir John you were a great deal
prettier than Mrs. Henry Seymour; not quite so tall perhaps, but much
prettier. What is the matter, my dear, you turn white and you turn red?”
Here Nancy confounded her sister, who was present, and bewildered
herself, and won Mrs. Rolt’s tenderest sympathies by telling the merest
simple truth. “When you speak of Arthur,” she said, “you make me think of
my husband; and—I can’t help it!” she said, putting her head down on
Cousin Julia’s kind shoulder and bursting into a passion of tears. How
touched and interested and gratified that good woman was! She insisted on
taking Nancy upstairs and making her lie down for a little. “You poor dear
child!” she said, longing to ask a thousand questions, but heroically
refraining; “but you must rest a little, and get back your pretty looks. You
must not look pale to-morrow. I want you to look your best to-morrow.” But
when she came down stairs again, it was not in human nature not to make
an effort to get something out of Matilda. “She never said anything to me
about her husband before,” said Mrs. Rolt. “It would do her good to talk a
little, not to shut up everything in her own heart, poor dear. Is it long
since?” she asked delicately. She did not know what it was, whether death
or separation. The question had to be put vaguely, and Cousin Julia had a
consciousness that she had put it in a very successful way.
“She will tell you herself,” said Matilda. “She does not like other people
to talk about it,” and she opened the door with great alacrity that the visitor
might go away.
CHAPTER XIV.

A RTHUR went to Durant’s chambers again next morning, with a forlorn


hope that something or other might have brought his friend back,
without whom, it appeared to him, that he did not know what measures
to take. Durant had held the keys of his fortune one way or another, and
could guide him with the right thing to do, the right way to set about
everything. He had never doubted that Durant would be in town, and would
help him, and the first sensation in his mind was one of irritation mingled
with disappointment. Of course, the only thing to be done, failing Durant,
was to go to Underhayes, where he knew his friend had already gone
without success. But what else was there to do, what other clew was there?
At the great railway-station, where he got the train to Underhayes, it was his
bad fortune to meet again with Denham, whom he had seen not very long
ago in Vienna. Arthur gnashed his teeth at sight of this butterfly fluttering in
his way again, no doubt to disturb his mind with some foolish buzz or other
—and did his best to avoid him; but he was not a man to be avoided. He
came forward with all his usual warmth of friendliness and surprise to see
the other in England.
“You here, Curtis!” he said.
“You always say, ‘you here,’ whenever we meet,” said Arthur, half-
annoyed, half-amused, remembering so clearly the greeting which this man
had given him at Paris, in the Bois. Denham was the first of his own world
whom Nancy had met, and how many little mistakes and disagreements,
quarrels which looked so ridiculously causeless at this distance, which
might have been so easily avoided, yet which raised such rapid pulses then
in their foolish young bosoms—had arisen while they were meeting him,
going to the theatre with him, or resisting his invitations; for after all he had
always been friendly, and had tried to please the bride, hard though she was
to please.
“Yes, you always turn up so unexpectedly, just when one thinks you a
hundred miles off. The other day you were in Vienna, and you said nothing
of coming here.”
“And you were the other day in Vienna, and said nothing of coming
here.”
“Of course, we are both the Queen’s servants,” said Denham; “and
public business, eh? consumes a great deal of our time. But do you know,
Curtis, I wanted to see you. I hope I did not lead you into delusion? I told
you I thought I met Mrs. Curtis on the other side of the water.”
“Yes;” Arthur’s tone was curt and sharp; he had no intention of listening
to anything about Nancy, as if it was news to him, and yet he knew so little,
and would have been so thankful to hear anything from anybody! His voice
sounded harsh and peremptory in its agitation.
“Meaning no offence,” said Denham, with a scrap of mock humility;
“but I find I made a mistake. It was at one of the stations on this line I met
Mrs. Curtis, that was my blunder. I forgot till I came here to-day, when it
suddenly flashed across me, that it was here or somewhere near. I hope I
have not caused you any anxiety.”
“Not at all,” said Arthur, with a blank countenance, which his diplomatic
experience had taught him to wear when he chose; but then Denham was a
brother of the trade, and it was scarcely worth while wasting it on him. “My
—wife’s family lived near. It is very natural that you should have met her
hereabouts. I thought it a mistake, you may remember.”
“Ah, did you? I did not recollect. I thought I might have been giving you
deluding information. I hope you have good reports?”
He did not know what to say. He was a dealer in gossip, and would have
given much to hear the full details of this separation, especially now when
he was on the verge of half-a-dozen country houses; but at the same time he
did not want to worry the man whom he was sorry for, by betraying his
partial knowledge of the facts. He had made a great deal of Nancy in Paris,
betraying her peculiarities, her ignorance to many admiring listeners, and he
would have liked a second chapter, which probably would have amused
society still more. But he did not want to affront Arthur or wound his
feelings. What could he say? ought he to make believe that he had never
heard anything? or delicately that there was a something, a mist of report,
which he knew?
“Perfectly,” said Arthur, with cold self-restraint. “I am going to her now.
Her mother, to whom she was much attached, is lately dead.”
“Oh, really!” said Denham; and he watched the young man’s face with
keen scrutiny. Fortunately, he himself was not going by the train which
went to Underhayes. He accompanied Arthur to the door of his carriage,
and stood there talking. “My hommages to Mrs. Curtis,” he said, “I daresay
she has forgotten me; but lay me at her feet, Curtis, all the same. One does
not easily forget a face like hers; you won’t mind me saying so much?”
“Oh no—surely not;” said Arthur, smiling. He put himself into a corner
of the train, glad to escape the other’s eyes. No, there were not many such
faces as hers. Then, all suddenly, her aspect as she sat in the little Victoria in
the Bois, that cold bright winter day, came up before him, he could not tell
how; how bright she had looked! no wonder that Denham said one did not
easily forget such a face. Her husband had been trying to forget it for two
years, and now, the moment he had suspended that effort, how it came
back! And where was she, where was he to find her? How slowly the train
seemed to go! Might she be visible perhaps somewhere on one of the
crowded railway platforms which they passed, where Denham had seen
her? He gazed out anxiously whenever they stopped. Why should it be
Denham, Denham! who cared nothing about her, that had seen her, and not
Arthur, to whom such a meeting would have been new life? This was what
was called providential; but what strange mistakes—mistakes that the
poorest clerk in an office would be discharged if he made—were set down
to Providence. If he had but met her, and not Denham, what trouble might
have been spared!
It was about noon when he reached Underhayes; and he went direct,
remembering what Durant had written, to the shop of Raisins, the grocer.
Sarah Jane was dusting her drawing-room, when her maid brought her word
that a gentleman wanted to see her. It was her pleasure, and not necessity
(she liked people to know this), that made her dust the drawing-room
herself. Servants were negligent, they chipped the china ornaments, and
were not half particular enough about the gilding; but Sarah Jane had nearly
completed this self-imposed task. She put down the long feather brush
which she had been using in a corner, and took off her housemaid’s gloves.
“Show the gentleman in,” she said, with some grandeur; but when she
saw who it was, Sarah Jane screamed out with surprise and excitement.
“Arthur!” she cried. She was almost as much startled as if he had come
back from the dead.
“Where is Nancy?” he said. He had got into such a state of excitement
now that he forgot all preliminaries, and plunged at once into the subject
which interested himself.
“Nancy? Oh, Arthur, wait a bit, I am so startled. You made my heart
jump! Whoever thought of seeing you here?”
“It is not so very wonderful to see me when you reflect that my wife has
been here for years. Where is she? You used to be kind and sympathetic,
Sarah Jane. Tell me where my wife is! Where is Nancy? There can be no
reason why I should not know.”
“Oh, it is so nice to see you again,” said Sarah Jane. “Such a long time
you have been away, two years and a half. It is a long time. Oh, how I wish
Nancy was here! I tried all I could to make her write to you when poor
mother died. But she was always so self-willed, you know.”
“Where is she?” said Arthur. He went up to Sarah Jane and grasped her
by the arm. He was beginning to lose the little self-control he had, and his
very eyes were dim with the heat of his excitement. It is impossible to
believe that he really hurt her, but it pleased her to assume that he did,
which came to much the same thing.
“Oh, you monster!” cried Sarah Jane. “Oh, you savage! If that is how
you used poor Nancy, I don’t wonder she wouldn’t take any notice. Let go,
or I’ll call my husband. Oh, my arm! I am sure it is black and blue.”
“Pardon me, pardon me!” said poor Arthur. “I did not mean to hurt you,
God knows; but I am almost out of my senses. My good girl, tell me where
she is. I have been travelling night and day. If I am impatient, you must
forgive me. Tell me, where is my wife?”
“Oh, Arthur, I am so sorry. I never thought you would take on so. Nancy
might be very proud if she saw you like that. I never thought a man would
mind so much, they take things so easy. Raisins never would. If I were to go
and leave him, I’m sure he’d let me. Oh, don’t you be afraid, I ain’t so silly
as to try.”
Arthur had to make a violent effort to restrain himself; but it was clear
she must be treated with in a more cunning way.
“Will you answer me a simple question? Do you know where Nancy is?”
he said; then with truer policy, “I will hear all about Raisins and yourself
after, and you must tell me what you will like for a wedding present.”
“Oh, Arthur, how kind you are! I always said you were nice. Oh,
anything that you like, I am sure! You would be sure to choose something
delightful; and we are brother and sister, ain’t we, Arthur? I must give you a
kiss to thank you,” said Sarah Jane.
There was no harm in the kiss, and Arthur accepted it meekly. He drew a
little further off when it was over, but took her hand and held it fast.
“All that afterwards,” he said. “You may be sure I will do all I can to
please you. But tell me first, tell me now, do you know where she is? I must
hear this first. You can’t tell me unless you know.”
“That is just it,” said Sarah Jane. “Of course, I should have told you
directly. They promised to write, but they never wrote but once.”
“What does they mean? Who was with her, and where was the letter
from?”
“Don’t hold me so fast, you frighten me,” cried Sarah Jane. “It was
Matilda that was with her. Charley has gone to New Zealand, and Matilda is
going after him; and Raisins and me, we don’t know whether we mayn’t
follow. Don’t crush my hand like that, Arthur, you hurt me. There was no
date to the letter. No, I can’t say that I expected to hear again just yet; five
weeks, it is not so very long.”
“And did not you want to write? You might have wished to see your
sister again.”
“In five weeks, and me married?” said Sarah Jane naïvely, “Oh, no; I
knew they’d write when they wanted me, and what should I want them for?
When you’re in trouble, it’s natural you should think of your friends; but
when you’re doing very nicely, and quite happy, what do you want with
them? But, Arthur, to show you I’m speaking true, I’ll fetch you the letter, if
you will let me go; and then if you can make anything out of it—let me go,
Arthur. I promise I’ll bring you the letter. Oh, please, I can’t tell you any
more. Let me go!”
When he did so, which he was half afraid of doing, she kept her word,
and produced out of a gay little desk, lined with red, a crumpled note, with
the marks of greasy fingers upon it, the sight of which gave Arthur, poor
fellow, a sickening sensation. Small feelings so mingle with great that the
thought that such a greasy scrap was a relic of his wife gave him as distinct
a pang as if some great disappointment had happened to him. A lover, such
as he felt himself still to be, ought to have been ready to take to his lips or
his heart the meanest message that came from the beloved; but this gave
him a feeling of disgust. And yet how he loved Nancy, and how his heart
struggled and throbbed at the idea of finding some trace of her. It was at
once a relief and a terrible disappointment to find that the greasy letter was
not from Nancy at all, but from Matilda, though, as it was the fingers of Mr.
Raisins and the pocket of his bride which had produced the stains upon the
letter, Nancy’s own autograph might have been in precisely the same
condition, unprotected by the divinity that should hedge a woman beloved.
“I don’t know where she means to settle, nor what we’re going to do,”
wrote Matilda. “She’s always the same hoity-toity creature as ever. She
talks about a house she has heard of somewhere right in the country. I can’t
tell you any more; but I’ll write again; and in the meantime you’ll be glad to
hear that I’ve got some very nice calico, and begun my outfit.”
This was all.
“She is so taken up about her outfit,” said Sarah Jane. “You would think
nobody had ever got such a thing before. But poor Matilda was always old-
maidish in her ways. Lord, Arthur! what’s the matter? Have you found out
anything? What a turn you did give me, to be sure!” cried Sarah Jane.
It was something which gave Arthur “a turn” too, as far as that effect can
be produced upon a male subject. It was simply the postmark “Oakenden”
on the envelope of the letter. He had not seen it before, nor looked for it,
being too anxious for the information inside. It startled him beyond measure
now. “Oakenden!” he repeated to himself as in a dream. Something more
than chance, some design which he could not fathom, some vague
trembling of meaning not yet comprehensible, but tending towards light,
seemed to flicker through the word. It was the post-town of home. He knew
it as well as he knew the village at his father’s park gates. What had taken
her there of all places in the world?
“Thank you,” he said, speaking, he felt, out of a mist of vague wonder
and dawning hope that seemed to envelope him in an atmosphere of his
own. “Thank you; I think this will be of some use. I know the place. Good-
bye. I must go directly and see if they are there.”
“Stop a moment,” said Sarah Jane. “Stop and have some dinner with us.
Raisins would like to see you, and—where is the place, Arthur? I should
like to know too, for one never knows what may happen, and they are two
lone women with nobody to look after them. It is so different when there is
a man.”
“I will let you know when I have found them,” said Arthur. “Good-bye, I
cannot wait longer now.”
“But, Arthur, do stop and have some dinner! Look here,” said Sarah
Jane, getting between him and the door, “do you mean to take her back? Is
that what you mean?”
“Take her back?” he said, with a half groan. “Was it I who sent her
away?”
“For look here,” said Sarah Jane, “I don’t say you haven’t a right to be
angry. Raisins would not stand the half, no, nor a tenth part from me what
you stood from Nancy. But she’s not the same now. She’s that proud she’ll
never let you see it if she can help it; but she’s very changed. She can’t live
with her own folks now. Her and me are not such friends as we were
because of that; but I suppose it will please you. She’s taken to study and so
forth, and she don’t find her own folks good enough company. She’ll be all
for us, I shouldn’t wonder, the moment she sees you; but don’t you believe
her, Arthur. It was all she could do to keep one of us as long as poor mother
lived. She’s as changed as possible. She’s a lady, that’s what she is
nowadays,” said Sarah Jane.
Arthur only partially heard this long speech; he had no patience with it.
He watched the door, and seized his opportunity, when Sarah Jane had
ended her peroration, to hasten away, waving his hand to her.
“Well, I’m sure!” she said, as he darted down the stairs; and Mr. Raisins
made many jokes at dinner upon the folly of the man who left a slice of
“that beef” to run after a rebellious wife.
“She should stay where she was if I had her in hand,” said the grocer, not
without an idea that the example was a dangerous one for Sarah Jane. “You
wouldn’t find me leaving my dinner for her, a woman as had given me up.”
He did not mean that his wife should entertain any delusions on this respect.
Whatever “swells” might be, grocers were not such fools.
Arthur rushed direct to the railway without losing a moment. He did not
make a pilgrimage to the Bates’ house, as Durant had done; he brushed past
the old haircloth sofa standing out exposed to rain and damp at the broker’s
door, and was not conscious of its existence. There was a train about to
start, that was all he knew. When he got back to London he drove, without
losing a moment, to the other railway, and went off at the earliest possible
moment to Oakenden. He arrived there late in the afternoon, with nothing,
not so much as a bag, remembering nothing beyond the fact that Nancy had
been there. But what could he do when he got there? He did not know how
to find such a needle in that bottle of hay. The town was not large, but it was
bustling and busy. It had new streets even since Arthur left home; and
through what weary labour must he go before he could find the two, who
might have veiled themselves in any one of five hundred new little brick
houses? He took a rapid walk through the new streets in the dusk of the
evening, gazing at all the parlour windows. It was not likely that fortune
would answer his appeal by bringing Nancy to look out just at the moment
he passed. Such a thing might happen to Denham, who had nothing to do
with it, but not to him, to whom it was everything. If he had been seeking a
criminal there might have been hope for him, or had he been in one of the
blessed countries where everybody has ses papiers. Why has not everybody
ses papiers in England? Arthur was ready, in the heat of his feelings, to give
up his birthright if that might have helped him to find his wife.
At last he bethought himself of the post office, and pulling his hat down
over his brows, and his coat-collar up over his chin, he betook himself there
to see if he could find any clue. Curtis? Oh, yes, there were the Curtises of
Oakley, Sir John and her ladyship, the best known people in the county; and
the Reverend Hubert at the Rectory, and old Miss Curtis at Oakley Dene. In
the town? Well, yes, there was a Mrs. Curtis in Acorn Terrace, No. 12;
hadn’t been there long; did not get very many letters. “Yes, probably that is
the lady,” said Arthur, his heart beating loudly. He went off without a
moment’s hesitation to the little new brick terrace. It seemed to him that
there could now be no doubt on the subject. He knew that Nancy would not
take a false name. How unconscious she must be who was coming to her
through the night—for it was quite dark now, the lamps lighted, the parlour
windows shining. There was bright firelight in the window of No. 12, Acorn
Terrace, and the sound of a piano, and some one singing. Could it be her?
He knocked, his heart sounding louder than any knocker, and was admitted
with innocent confidence. Yes, Mrs. Curtis was at home; and the maid had
prepared the lamp, which she carried in before him, announcing simply, “A
gentleman, please, Ma’am.” The inhabitants made Arthur out before he
made them out, and a mild old lady in a widow’s cap rose from a chair by
the fire. What could Arthur do but stammer forth apologies, his very voice
choked with disappointment. “I beg a thousand pardons, it is a mistake,” he
said, rushing out again, leaving the ladies in the parlour half angry, half
interested. What a blank of helplessness he felt closing round him as he got
outside again, hot with shame, and quivering with the shock of his
disappointment. This was no use it was evident, and where could he go to
inquire further? Not to the police, as if his innocent wife had been a culprit.
He could not subject Nancy to that indignity. He walked about the streets
for an hour or two longer, wondering what he could do. A directory? Her
name would not be in it. The post-office had failed him; and he could not go
calling her name through the streets as the Eastern princess did. Nancy!
Nancy! He might make it echo to all the four winds, but what would that do
for him? It occurred to him at last to try the hotels, as he remembered the
date of Matilda’s letter; but no ladies bearing the names of Mrs. Curtis and
Miss Bates had been heard of anywhere. At one of the hotels (probably at
all) they recognised him, and as he was by this time prostrate with
exhaustion and disappointment, he decided to remain all night, telegraphing
to his servant to meet him there next day. He must go home now that he was
so near; not to-night, but to-morrow, when he was more fit to meet
strangers. Strangers! his own father and mother, his familiar friends, the
servants who had nursed him from his childhood and loved him all his life;
but a preoccupied mind is always unnatural. They were as strangers to him
now.
CHAPTER XV.

S ATURDAY morning! very bright but cold, a sprinkling of snow on the


ground, crisp and slight like a permanent hoar frost, the trees all frosted,
too, with edges of white, like the lights in a snow-landscape. Nancy in
her blackness came out doubly distinct upon this white background, the
long sweeping line of her simple dress and cloak, her face all glowing with
animation and health, and repressed excitement. Pleasure, yet pain, a happy
sense of having pleased, an eager wistful longing to please more, were all
mingled with the feeling that she stood on the edge of an abyss, and that
nothing could excuse this deception, except the fact that it was for once,
only for once, and that when that was over, all should be told. She kissed
her sister as she went out, which was very unusual for her. “Think of me,
till I come back,” she said. Nancy felt that as yet there had been no more
desperate moment in her life. She was not afraid of it, and yet she was all
one pulsation, all one throb. She could scarcely speak to the people she met
on the road, but nodded, with a wistful sense of friendliness. If they were all
to think kindly of her, would not that support her in the present trial, and
those that were still harder that must come after? For after she had done
this, all would be over, there would be no more excuse for staying here. She
could not live under the shadow of their wing, and go on deceiving them.
And she had got to be “fond” of Oakley. It was Arthur’s place, where
everybody knew him, and to live there was a protection to her, a shield to
her imprudence, whatever happened. What else had she in the world? even
if Matilda left her she might have gone on there, living quietly; but for that
deception which she could not keep up, which she would take advantage of
this once—only this once, but no more. This was one of the rare cases in
which the person most immediately concerned judged herself more hardly
than others did. Neither Durant nor Lucy blamed her for living here
secretly; but rather were both touched by the idea that she wished thus
unknown to recommend herself humbly to the good opinion of her
husband’s parents; but Nancy’s simpler straightforward mind felt the tacit
falsehood of her position to be untenable. Whatever advantages it might
bring her, her duty was to tell the truth, and take the consequences. She had
done much that was wrong; but she had never told a lie.
Lady Curtis saw her coming from the window of the morning-room, and
could not but make observations to herself upon the fine elastic figure,
instinct she felt with some special energy, as the young stranger came up the
avenue. What was it that made her walk to-day with such firm certainty and
grace? usually there was a touch of shyness about her, almost awkwardness,
the awkwardness which is a kind of grace in its way, the wavering of youth,
not quite sure about its own movements. But Nancy was not thinking of her
appearance, or that anyone was looking at her; but only of the great moment
that was approaching. Lady Curtis came to the door of the morning-room to
meet her, holding out her hand.
“This is my pet room, my dear,” she said, smiling; “you must come here
first. Sit down by the fire, and get thawed, and then you shall see
everything. It is not according to the present taste, but for all that I am fond
of it. Won’t you take off your cloak? We can put it here, or take it upstairs
with us when we go. It must be very cold out of doors.”
“Not when one is walking,” said Nancy, and as she put off her cloak, a
little roll of paper became visible. “I brought you the—sketches,” she said,
with a blush; “they are not worth calling patterns.”
“They are a great deal better than patterns. I call them drawings,” said
Lady Curtis, with flattering kindness, spreading them out on the table. What
pains Nancy had taken over them! and consequently they wanted the
spontaneous grace of the first design, which Lady Curtis had so praised. But
my lady applauded them as if they had come from the pencil of Raffaele
himself, and showed her crewels and her pieces of work executed, which
filled Nancy with awe.
“Mine are not so good as these,” she said, shaking her head; “I will take
them back and try to do better.” She was disappointed, and tears started
suddenly to her eyes. But Lady Curtis took the drawings away carefully,
and smiled and shook her head.
“They are mine,” she said, “you have given them to me. Now look, here
is my private picture-gallery, Mrs. Arthur; my son, whom you thought you
had met, do you remember? You will be able to make sure by looking at his
portrait; and Lucy—you know Lucy? I have been very extravagant about
my children, here they are at all ages. Here is the first of my boy—and there
is the last,” said Lady Curtis, pointing to a framed photograph on the table.
She wondered that the visitor did not move to look at it. Nancy was holding
the child’s miniature in her trembling hands. She could not have spoken or
risen up to save her life. Look at him—she who belonged to him, to whom
he belonged more than to his mother—she could not do it! There was
something almost more than she could bear even in the child’s face.
“The connoisseurs of the present day will have nothing to say to my
pretty room,” said Lady Curtis; “but perhaps you are of that way of
thinking, and like darkness and neutral tints. No? I am glad of that. This is
where I have spent almost all my life,” she said, dropping into that tempting
strain of gentle reminiscence which seems to come natural to us all, when
we grow old among the young, as just the other day we were young among
the old, and liked to draw that soft babble of memory from elder lips.
Nancy felt the charm of it, which soothed her even in her excitement, and
looked up listening with eyes that grew bigger and bigger, like the listening
eyes of a child.
“I furnished it at my own pleasure, after I was married, when I came first
to Oakley;” she said. “Sir John does not care for these sort of things, he was
always pleased when I was always pleased; and all our little talks we did
here; and then the children—all that they had to say to mamma, this was the
place. When Arthur was a boy at school, he always came rushing in here the
moment he arrived; and here they made all their plans, he and his school
friend, Lewis, who is a very dear friend still. I think I can see their little
faces with the firelight upon them,” said Lady Curtis. “My Arthur! Ah, if he
had always been as open with me as he was then!”
Nancy was choking with her tears. It was all that she could do not to cry
out—it was my fault, it was my fault! all she could to keep herself from
creeping to Lady Curtis’s feet, and kissing them, and crying her heart out.
She sat still and kept silent, she could not tell how.
“But I must not talk of that, and make myself cry,” said my lady, “that
would be poor entertainment for you. All these things are presents, they
have been brought me one time or another. Sir John gave me my clock; it is
a genuine seventeenth century one, and we picked it up by the merest
chance. Arthur brought me that Sèvres the first time he went abroad. Come,
I have upset you with my absurd talk. I can see you know what it is to be in
trouble about those you love.”
My lady was behind Nancy at the moment, and suddenly put her arms
round her, and gave her a little half-embrace. It was gratitude for her
supposed feeling. Nancy stumbled up to her feet with a great cry, “Oh, my
lady—my lady! if you knew! if you only knew!”
Lady Curtis looked at her fixedly, her cheek flushed a little. After all she
knew nothing of this strange young woman whom she had received so
rashly. What if she should turn out to be—something not fit for the
company of good women? She looked at her with a momentary suspicion.
“If there was any serious reason why you should not come into my
house, I think you would not have come,” she said, with meaning. Nancy
did not reply—her thoughts were occupied by a wholly different preventing
cause from that which was in Lady Curtis’s thoughts; but neither did she
quail from the look, which she did not understand. The impulse was strong
upon her to tell everything, to go no further, to disclose the whole story
now.
“After to-day,” she said, with her lips quivering, “I meant, if you would
listen, to tell you everything about me. But perhaps, I thought to myself,
you would not like me then—perhaps you would be angry; and I thought I
might give myself first this one day.”
“Poor child!” said Lady Curtis, half smiling. “It cannot be very great
wickedness, at which you think I would be angry, which you tell with such
an innocent face. Hush, hush!” she added, “no more of this, here is Lucy.
You shall have your day, and tell me after. Before her not a word.”
Was Lady Curtis afraid of Lucy too? She came in looking as she always
did, not suspicious perhaps, but as if she knew—did she know anything?
and shook hands with Nancy. “You are showing Mrs. Arthur your own
room first, mamma; you are telling her exactly what you expect to be said,
and coaxing her to praise it. That is what you always do; but papa wishes
her to be brought to the library. No, here he is coming after me,” said Lucy,
as a heavy step came towards the door. Nancy was standing up, tremulous
and shaken, her lips with still a quiver in them, the tears not gone out of her
eyes, when Sir John came in. He came up to her holding out his large, soft,
old man’s hand.
“You need not introduce me, Lucy. I know this lady already. She was
very kind to me, as I told you. I assure you that to allow a young lady, and
one whom I should have been so happy to serve, to take so much trouble for
me, was much against my liking. But my excuse is one we must all come
to, even the fairest. When a man is old—”
“I was so very glad,” said Nancy, in a low tone, and her eyes, with the
moisture in them, looked so appealing that Sir John’s heart was touched. He
gave a look round, lifting his heavy eyelids to see if there was anything
visible that could account for this emotion. Then, seeing that his wife also
showed signs of fellow-feeling, he concluded that the poor young widow
(as he supposed her) had been telling her story to my lady’s sympathetic
ear.
“I believe you are going to be shown over the house,” he said, offering
his arm, “and you must let me show you my library myself. I have not very
much,” said Sir John with that tone of mock humility which never deceives
the experienced, “that is worth looking at; but there are one or two pictures,
and some old Roman rubbish, which, perhaps, you may not care about. Are
you fond of antiquities? I know that you are kind to them, at least,” he said,
giving her hand a little fatherly pat as she put it shyly on his arm. Nancy felt
her head swim as she walked through the great hall leaning on Sir John’s
arm. He talked to her all the way, pointing out one thing and another. “This
is one of our treasures—it is a bit of bas-relief found in an old temple near
Rome. Have you ever been so far? Ah! then you have the pleasure to come.
I think it is much better than going when you are too young to appreciate
what you see. Yes, this is my favourite room. There are plenty of books you
see—a great many more than I make any use of nowadays—some of them,
perhaps, are not quite lady’s reading; but there are a great many which I
daresay you would like, and which you will always be welcome to. This is
one of the pictures we are proud of. It is a Sir Joshua. It is the portrait of my
grandfather. Ah! you start, you see the likeness? It is very like my son. My
lady has been telling you of him, no doubt? Yes, Arthur was the apple of her
eye; and will be yet—and will be yet, please God.”
Nancy did not hear much more. The choking of those tears she dared not
shed, and those words she did not say, was more than she could bear. “Oh!
please forgive me!” she said, sobbing aloud, “I can’t help it. No, no, I am
not ill—but it brings so many things back—”
“My dear young lady,” said Sir John alarmed. “You have got upset. Shall
I take you back to Lady Curtis, or will you rest here?”
“Oh, only for a moment!” cried Nancy. The outbreak had relieved her.
He made her sit down in his own great chair, and was silent for a few
minutes, looking at her with serious sympathy. She was not afraid of Sir
John. He (she divined) would never find her out, however she might betray
herself. He was not quick, like needles, like the ladies. There was safety in
him. And this sense of security helped her to conquer herself. She got up
presently with a smile, and said she was better. The old man was in no hurry
—he was pleased with his pretty companion, and quite willing to humour
her. After this, he took her all round the library, not sparing her a single
relic. He had not been so much interested for ever so long. She listened to
all he said with the prettiest interest, and if she did not say much, what did
that matter? “I am very ignorant,” she said to begin with, and he liked her
all the better. They suited each other entirely. She did not get impatient as
my lady did, or make fun of everything, which Lucy would sometimes have
the audacity to do; but listened with the greatest interest as if she never
could hear too much. The library was nearly exhausted when the bell rang
for luncheon. “Lady Curtis will wonder what has become of us,” he said,
giving her his arm again, “and I am sure I have worn you out.”
Meanwhile Lucy and her mother were smiling at each other. “We have
no chance you see, even with your father, against a pretty stranger,” Lady
Curtis said, “but I hope she is not tired of all these antiquities, as you and I
are, Lucy, when we oughtn’t to be.”
“Oh, she will not show it,” said Lucy, with a little slight involuntary
touch of scorn; but Lady Curtis did not find this sentiment out.
“Yes, she is a sympathetic young creature. She was all but crying with
me about Arthur, though she can’t know anything of Arthur. It may not be
what hard people call quite sincere, but it is very charming and goes to
one’s heart.”
“Oh! I did not say she was not sincere,” said Lucy with compunction;
and then the luncheon bell roused them, and they went across the hall to the
dining-room, following Sir John, who issued from his library at the same
moment, and led the way with his courtly old-gentlemanly politeness
leading the stranger. Age is the period in which politeness becomes most
exquisite—like that cortesia which the old Italians make into an attribute of
God himself. Sir John placed Nancy next to himself at table. She had never
sat at a table so daintily served. The big silent footmen almost filled her
with awe. She had never seen anything of the kind but in the Paris hotel,
which after all was only an hotel, served by chattering rapid waiters, not
solemn buckram men like this. Nancy was awed, every moment more and
more.
“Now you have had her long enough,” said Lady Curtis. “She has to see
the drawing-room now, and all the state rooms.”
“I hope you have had the drawing-room properly aired. I never had any
confidence in that room. I have known it to be cold,” said Sir John with a
look of horror. “Come back to your own room, my lady, for tea. It is the
most comfortable in the house.”
“That is on his own account, not ours,” said Lady Curtis, as she, in her
turn, led Nancy away. The drawing-room, was a very large, noble room
divided by pillars, and its magnificence again took away Nancy’s breath.
They took her all round to look at the pictures, and then my Lady placed the
stranger in a large chair before the fire to rest. Never had any one been so
anxious about her, afraid to overtire her. Overtire her! if my Lady only
knew? Nancy, vigorous and young, could have carried her conductor about
as easily as a child; but she could not carry the load under which she was
tottering—the load of concealment and, as she represented it to herself,
deception. This overwhelmed her with a feverish incapacity. She was glad
when they bade her be still. What agitation was in all her veins! and yet she
was happy—wrapped in a strange, delicious, overwhelming, painful dream.
Was it her home, really her home in which she was thus reposing, or a
house which to-day she would leave for ever? She was not able to answer
the question, but sat still there, in the winter afternoon, while the sun was
still shining outside, in a trance of strange and mingled sensation, lifted out
of herself.
The drawing-room did not look towards the front of the house. Its large
windows opened into my Lady’s flower-garden, a kind of fairy paradise,
Nancy had thought, in which the grass was very green, and where there
were still flowers. Arrivals or departures did not disturb the dwellers in this
Elysian place; but as they sat together, not talking very much for the
moment, for the sake of Nancy who was “resting,” some kind of
indescribable wave of sound seemed to rise in the house. Something of
wheels, something of quick steps, then a little distant hubbub of voices, then
the ring of several doors opened and shut. “Some one calling, I suppose,”
Lady Curtis said calmly, “but you must not stir, my dear.” Lucy was near
the door. What she heard that roused her curiosity, or suggested to her the
impossible occurrence which had really come to pass, it would be
impossible to say. Her mind was in a state of high tension and excitement,
and this confers a kind of second sight and second hearing. She stole behind
the great screen that guarded the room from the possibility of a draught, and
softy opened the door. She heard her father’s heavy step come suddenly out
of his library, and then a tremulous outcry in his usually placid voice. Lady
Curtis had begun to listen too. “What is all that commotion,” she said,
“ring, Lucy, and ask?” But Lucy was out of hearing. She had rushed along
the corridor to see with her own eyes, and hear with her own ears. “Yes, Sir,
it is I; I didn’t write, for I did not know I could get here to-day. Where is my
mother?” was what she heard. Lucy’s impulse was to cry out too, to rush
out to the hall and throw herself upon her brother, and it took her no small
effort to restrain herself. Her heart gave a wild leap into her throat—and
then she turned and hurried back. What was going to happen? “Lucy—
Lucy! have you asked what is the matter?” said Lady Curtis, getting up with
natural agitation. She thought of Arthur at once, as was to be expected; but
she found time even in the tide of rising anxiety to give a kind word to her
visitor. “Never mind,” she said, “don’t stir—there is no need for you to
disturb yourself—Lucy! where are you? what is it?” said my Lady. And
then she gave a half scream, and rushed towards the door, pushing back the
screen which had veiled the space before the fire.
“Yes, mother, here I am,” said Arthur, coming in.
One of the party, at least, had no eyes for him, no thought for him. Lucy
did not even look at her brother; and when his eye caught her standing
there, and saw this, Arthur, with his arm still encircling his mother, followed
instinctively to see what interest could keep his sister from him. Nancy had
risen from her seat at the sound of his voice. Every tinge of colour had gone
from her cheeks, her eyes looked as if they had been forced wide open by a
passion of wonder which was almost agony, her lips had dropped apart. She
stood motionless, gazing, but able to see nothing.
“My God!” he cried, and put his mother aside.
Sir John had followed him into the room. They were all there, all who
were most interested, and all felt by instinct that something greater and
stranger had happened than Arthur’s coming home.
“What is it, what is it?” cried Lady Curtis, in sharp tones of pain.
Her son made but one step away from her, and caught their unknown
visitor, their strange neighbour, the young woman they had all been so kind
to, in his arms.
“No, no, no!” they all heard Nancy cry, shrill and high in terror or
anguish, they could not tell which; and then she dropped out of his arms in
a heap upon the floor.
“Have I killed her?” he said, looking round upon them with a scared and
blanched face, while Sir John and his mother looked at him, speechless with
astonishment.
“No, no,” cried Lucy, who had possession of her senses; “it is no worse
than fainting. Oh, don’t you see, don’t you see what it is, all of you? She
has scarcely been able to keep from telling you.”
“What had she to tell me? What do you mean? What is this, what is this,
Lucy? I don’t understand.”
Arthur had one arm under his wife’s head.
“She is better, she is coming back,” he cried, and stretched out his other
hand with one glance round. “Mother, God bless you! You have been
keeping her here safe while I have been looking everywhere for her,” he
said. “If I had not owed you everything before, I should owe you my life
now.”
“Arthur! What has he to do with her? Her name is—Ah!” Lady Curtis
ended with a great cry.
And Sir John, who was altogether puzzled, came forward a step and
looked at her where she lay, holding up his spectacles solemnly in his hand.
“I am afraid she has fainted,” he said. “I thought she was not very well.
It will be better to leave your mother and a maid to manage her, Arthur. We
are interested in the young lady, but we are more interested in you.”
Nancy came to herself as he spoke, and struggling up, got upon her
knees.
“I did not faint,” she said, hoarsely; “only the light went from me. I did
not mean to deceive any one. I said just this one day; I wanted to see you,
and Arthur’s home. I did not mean to deceive you. If you please, I will go
away, and never trouble you any more.”
“Nancy!” cried Arthur, “Nancy!” He put his arm round her, holding her.
He had been kneeling beside her while she lay there, and he was not aware
of the suppliant attitude which accident made him assume. “Look at me,”
he said, “look at me! If you cared for Arthur’s home, did you not care for
me, Nancy? You shall never go away, except with me.”
Nancy got up hastily, drawing herself away from him. She was at the
turn of her capricious soul. Would she burst away again, rush out into the
cold and the twilight? Everything hung on the impulse of the moment. She
gave a wild look round upon all those agitated faces. Sir John had put on his
spectacles the better to understand the extraordinary position of affairs
which had begun to dawn upon him now.
“It appears to me,” he said slowly, “if I understand, that there can be no
question here of going away, no more for this young lady than for any of us.
Is it possible—I do not mean to be uncivil, but you will excuse the question
—is it possible that you are, as I understand, my son’s wife?”
Nancy was caught at the moment of doubt. She herself turned and
looked at Arthur. Her eyes softened, her paleness began to glow. He drew
her arm within his, and she did not resist.
“Yes,” she said, with a long soft sigh. It was hardly possible to tell which
was the word and which the lingering flutter of breath.
“Then, my dear—though I have forgotten your name,” said the old
gentleman, going up to her, taking her disengaged hand, and kissing her
very solemnly on the forehead, “you are very welcome in his father’s
house.”
“And me?” said Lady Curtis, with a little moan. Grammar and emotion
do not always go together. “I have only half seen Arthur, and must I turn all
at once to Arthur’s wife?”
“If you care for me, mother!—”
“Care for you! Do you hear how he blasphemes—you, young woman,
that are his wife? And he was my little boy, my child before he ever saw
you. Care for him! that is what he calls it,” the mother said, crying, yet
smiling, too, as her manner was. “What is your name? Nancy! Yes, I know
it well enough; I only ask it out of contradiction. Here is my kiss, Nancy. I
did not know you were my daughter, but I liked you; and that is better than
giving you a kiss only for his sake. If you care for him, as he calls it, you
will like me too. Where is Lucy all this time, who was in the plot—who
knew—”
“I only divined,” said Lucy, coming forward in her turn.
But Lucy was the one of all whose salutations were the least cordial. She
was glad, but she did not like it somehow. She did not like to hear my lady
say “my daughter.” That was an unexpected stab. She went through her
salutations very prettily, but in such a way as brought the excited party back
to common life.
“And I think you will find your own room more comfortable,” said Sir
John; “and you are surely later than usual this afternoon, my lady, in having
tea.”

This tea, it may be supposed, was not the tranquillizing draught it


usually proved to these agitated people; and it was a relief to everybody
when it was settled that Arthur should walk down with his wife to the
village to tell her sister of the extraordinary event which had happened, and
to make arrangements for Nancy’s removal to the Hall. They went out into
the dark avenue together, arm-in-arm, glad of the darkness, and feeling it
had been made for them, as—if it had been morning and bright, they would
have felt that to have been made for them. To repeat what they had to say to
each other is none of our business. People do not meet again after such
separations without having in their happiness pain enough to make them
humble; and yet that walk down to the village in the wintry evening was
worth some pain. Sir John was still standing between the two rococo cupids
of the mantelpiece, with his cup in his hand, when they went away. He had
come back to the ordinary habits of his life, which, after any disturbance, it
is always a pleasant thing to do.
“It seems to me,” he said, “that it was a very fortunate thing we got hold
of Arthur’s wife accidentally, and found her to be so unexceptionable a
person, before we knew who she was; and it was pretty that she called
herself Mrs. Arthur. I did not perceive it just at first, but of course it was her
right name. And all things considered, I think we may be very thankful to
Providence, my lady, that things have turned out so well,” said Sir John,
putting down his cup, and going slowly away, as was his wont. When the
door was closed, which he always did so carefully, my lady caught Lucy by
the waist, who was going away too.
“My darling,” she said, “we must strike while the iron is hot, while your
father is so satisfied. Go this moment, and write before the post goes. Tell
Lewis to come at once, to-morrow; he ought not to lose a day.”
“Shall I, mamma?” Lucy crept a little closer to her mother, who was not
forgetting her after all.
“Yes, at once. I hate them all!” cried Lady Curtis with a little outburst,
“taking my children from me. But I suppose you will be happier; and you
know, as Arthur says, I do care—a little—for you.”

THE END.

London: Printed by A. Schulze, 13, Poland Street.


*** END OF THE PROJECT GUTENBERG EBOOK MRS. ARTHUR;
VOL. 3 OF 3 ***

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
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like