Modern Web Development Understanding domains technologies and user experience 1st Edition Dino Esposito instant download
Modern Web Development Understanding domains technologies and user experience 1st Edition Dino Esposito instant download
https://textbookfull.com/product/modern-web-development-
understanding-domains-technologies-and-user-experience-1st-
edition-dino-esposito/
Dino Esposito
PUBLISHED BY
Microsoft Press
A division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
Copyright © 2016 by Dino Esposito
All rights reserved. No part of the contents of this book may be
reproduced or transmitted in any form or by any means without the
written permission of the publisher.
Library of Congress Control Number: 2015934865
ISBN: 978-1-5093-0001-3
Printed and bound in the United States of America.
First Printing
Microsoft Press books are available through booksellers and
distributors worldwide. If you need support related to this book,
email Microsoft Press Support at [email protected]. Please
tell us what you think of this book at http://aka.ms/tellpress.
This book is provided “as-is” and expresses the author’s views and
opinions. The views, opinions and information expressed in this
book, including URL and other Internet website references, may
change without notice.
Some examples depicted herein are provided for illustration only and
are fictitious. No real association or connection is intended or should
be inferred.
Microsoft and the trademarks listed at http://www.microsoft.com on
the “Trademarks” webpage are trademarks of the Microsoft group of
companies. All other marks are property of their respective owners.
Acquisitions and Developmental Editor: Devon Musgrave
Project Editor: Steve Sagman
Editorial Production: Waypoint Press
Technical Reviewer: Marc Young
Copyeditor: Roger LeBlanc
Indexer: Toni Culley
Cover: Twist Creative • Seattle and Joel Panchot
To my wife Silvia.
You make me feel sandy like a clepsydra. I get empty
and filled all the time; but it’s such a thin kind of sand that
even when I’m full, without you, I just feel empty.
—DINO
Contents at a glance
PART I UNDERSTANDING THE DOMAIN
CHAPTER 1 Conducting a thorough domain analysis
CHAPTER 2 Selecting the supporting architecture
CHAPTER 3 UX-driven design
CHAPTER 4 Architectural options for a web solution
CHAPTER 5 The layered architecture
Part II DEVELOPMENT
CHAPTER 6 ASP.NET state of the art
Whys, wherefores, and technical aspects of
CHAPTER 7
ASP.NET Core 1.0
CHAPTER 8 Core of ASP.NET MVC
CHAPTER 9 Core of Bootstrap
CHAPTER 10 Organizing the ASP.NET MVC project
CHAPTER 11 Presenting data
CHAPTER 12 Editing data
CHAPTER 13 Persistence and modeling
Part III USER EXPERIENCE
CHAPTER 14 Creating more interactive views
CHAPTER 15 Pros and cons of responsive design
CHAPTER 16 Making websites mobile-friendly
Contents
Introduction
PART I UNDERSTANDING THE DOMAIN
Chapter 1 Conducting a thorough domain analysis
Domain-driven design to the rescue
Introducing design driven by the domain
Clearing up common misconceptions about DDD
Introducing the ubiquitous language
Creating a vocabulary of domain-specific terms
Keeping business and code in sync
Introducing the bounded context
Discovering bounded contexts
Implementing bounded contexts
Introducing context mapping
Examining relationships between bounded contexts
Introducing event storming
Having unlimited modeling space
Finding events in the domain
Leading the discussion
Summary
Chapter 2 Selecting the supporting architecture
It’s all about business logic
Examining the application logic
Examining the domain logic
Exploring patterns for the business logic
Using a single model
Exploring the elements of an object-oriented domain
model
Putting business rules inside
Discovering aggregates
Exploring the role of domain services
Implementing command and query separation
Working with the Command and Query Separation
principle
Implementing CQRS
Introducing message-based formulation
Ad-hoc infrastructure
Introducing event sourcing
Summary
Chapter 3 UX-driven design
Why a top-down approach is better than a bottom-up one
Foundation of the bottom-up approach
Planning with a top-down approach
Looking at user experience from an architectural perspective
UX is not UI
Explaining UXDD in three steps
Why UXDD is beneficial to nearly everybody
Summary
Chapter 4 Architectural options for a web solution
Assessing the available web solutions
Deciding on the best framework
Laying out a solution
Examining the role of ASP.NET Core 1.0
Considering ASP.NET as the starting point
Examining the architectural dependencies in ASP.NET Core
1.0
Exploring the reasons to choose ASP.NET Core 1.0
Determining if you should use ASP.NET Web Forms
Examining a common scenario
ASP.NET Web Forms at a glance
What’s still good with Web Forms
Why you should move away from Web Forms
Determining if you should use ASP.NET MVC
ASP.NET MVC at a glance
What’s good with ASP.NET MVC
Weak points of ASP.NET MVC
Examining the role of ASP.NET Web API
Moving from WCF to Web API
Comparing ASP.NET Web API and ASP.NET MVC
Talking about REST
Using Web API in ASP.NET Core 1.0
Single-page applications
Setting up a SPA
Hybrid SPA
Weak points of a SPA
Summary
Chapter 5 The layered architecture
Beyond classic three-tier systems
Working with a three-tier architecture today
Fifty shades of gray areas
The presentation layer
The user experience
The input model
The view model
The application layer
Entry point in the system’s back end
Orchestration of business processes
The domain layer
The mythical domain model
The equally mythical concept of domain services
A more pragmatic view of domain modeling
The infrastructure layer
Current state storage
Event stores
Caching layers
External services
Summary
PART II DEVELOPMENT
Chapter 6 ASP.NET state of the art
Web flavors
The web could have been different
Classic web is the winner
ASP.NET is feature-complete
No more to add is no more to add
Is it full potential or software obsolescence?
ASP.NET Core 1.0 has no new functions
It’s about the new runtime
It’s about the business model
It’s about the development model
What is the state of ASP.NET?
Chapter 7 Whys, wherefores, and technical aspects of
ASP.NET Core 1.0
The background of ASP.NET Core
The cost of a large memory footprint
Reconsidering the cloud as the silver bullet
Making the case for the necessity of a different
programming model
The impact on everyday work
The ASP.NET Core runtime at a glance
The DNX host
Hosting web applications in DNX
ASP.NET Core HTTP pipeline
ASP.NET Core for ASP.NET developers
Creating a new project
Application startup
Application settings
Authentication
Other aspects of web programming
Summary
Chapter 8 Core of ASP.NET MVC
Routing incoming requests
Simulating the ASP.NET MVC runtime
Exploring the URL routing HTTP module
Using application routes
Exploring the controller class
Looking at aspects of a controller
Writing controller classes
Processing input data
Manual parameter binding
Model binding
Producing action results
Wrapping results
Returning HTML markup
Returning JSON content
Summary
Chapter 9 Core of Bootstrap
Bootstrap at a glance
LESS and the foundation of Bootstrap
Setting up Bootstrap
Putting Bootstrap into perspective
Responsive layouts
The grid system
Screen-based rendering
Taxonomy of today’s web elements
Restyling basic HTML elements
Restyling list HTML elements
A look at more advanced components
Bootstrap extensions
Autocompletion
Date picking
Custom components
Summary
Chapter 10 Organizing the ASP.NET MVC project
Planning the project solution
Mapping projects to the Layered Architecture pattern
Application startup
Examining application services
Adding in other assets
Creating presentation layouts
Serving resources more effectively
Working with Bundling
Using minification
Examining other aspects
Exploring error handling
Configuring user authentication
Summary
Chapter 11 Presenting data
Structuring an HTML view
Exploring the view model
Examining the page layout
Presenting the elements of a view
Displaying a list of data items
Creating a grid view
Adding paging capabilities
Adding scrolling capabilities to page elements
Adding a detail view
Popover views
Drill-down views
Summary
Chapter 12 Editing data
A common form for the login page
Presenting the form
Processing posted data
Input forms
The Post-Redirect-Get pattern
Form validation
Modal input forms
Quick tips for improving the user experience
Using date pickers is great, but...
Using autocompletion instead of long drop-down lists
Miscellaneous tips for large input forms
Summary
Chapter 13 Persistence and modeling
Examining the different flavors of a model
The persistence model
The domain model
The input model
The view model
Designing a persistence layer
Using an implicit and legacy data model
Using Entity Framework
The Repository pattern
Polyglot persistence
Polyglot persistence by example
Costs of polyglot persistence
Summary
PART III USER EXPERIENCE
Chapter 14 Creating more interactive views
Exposing JSON content
Creating JSON endpoints
Negotiating content
Solving the cross-origin puzzle
Designing a Web API
Purpose of the ASP.NET Web API
Web API in the context of ASP.NET MVC
Securing a standalone Web API
Pulling content
The Ajax core
The jQuery tools
Binding data to the current DOM
Pushing content to the client
ASP.NET SignalR at a glance
Monitoring remote tasks
Other scenarios for ASP.NET SignalR
Summary
Chapter 15 Pros and cons of responsive design
Foundation of Responsive Web Design
A brief history of RWD
CSS media queries
RWD and device independence
Adapting RWD to non-desktop devices
Dealing with images
Dealing with fonts
Dealing with orientation
Summary
Chapter 16 Making websites mobile-friendly
Adapting views to the actual device
The best of HTML5 for mobile scenarios
Feature detection
Client-side device detection
A look into the future
Device-friendly images
The ImageEngine platform
Resizing images automatically
Serving device-friendly views
What’s the best way to offer mobile content?
Server-side detection
Summary
Index
Assumptions
This book assumes you are familiar with the Microsoft web stack.
This experience can range from having done years of Web Forms
development to being a JavaScript angel. The main focus is ASP.NET
MVC, because that will be the standard with ASP.NET Core and
remain so for the future of the ASP.NET platform. Here are some key
goals for readers of the book: learning a method general enough so
that you can start development projects with a deep understanding
of the domain of the problem, select the right approach, and go
forward with reliable coding practices.
This book might not be for you if...
If you’re looking for a step-by-step guide to some ASP.NET MVC or
perhaps Bootstrap, this book is probably not the best option you
have. It does cover basic aspects of both technologies, but it hardly
does that with the necessary slow pace of a beginner book.
Most of the book’s chapters include hands-on samples you can use
to try out the concepts you just learned. No matter which sections
you choose to focus on, be sure to download and install the sample
applications on your system.
System requirements
To open and run provided examples, you just need a working edition
of Microsoft Visual Studio.
Downloads
All sample projects can be downloaded from the following page:
http://aka.ms/ModernWebDev/downloads
Acknowledgments
A bunch of great people made this book happen: Devon Musgrave,
Roger LeBlanc, Steve Sagman, and Marc Young. It’s a battle-tested
team that works smoothly and effectively to turn draft text into
readable and, hopefully, pleasantly readable text.
When we started this book project, we expected to cover a new
product named ASP.NET vNext, but the new product, now known as
ASP.NET Core, is still barely in sight. In light of this, we moved the
target along the way, and Devon was smart enough and flexible
enough to accept my suggestions on variations to the original plan.
Although you’ll find some information about ASP.NET Core in the
book, a new ASP.NET Core book is on its way. Ideally, it will be from
the same team!
Stay in touch
Let’s keep the conversation going! We’re on Twitter:
http://twitter.com/MicrosoftPress
Part I: Understanding the
domain
CHAPTER 1 Conducting a thorough domain analysis
CHAPTER 2 Selecting the supporting architecture
CHAPTER 3 UX-driven design
CHAPTER 4 Architectural options for a web solution
CHAPTER 5 The layered architecture
Chapter 1. Conducting a thorough
domain analysis
Developers have to steep themselves in the domain to build
up knowledge of the business.
—Eric Evans
More and more developers and managers seem to agree that writing
software today is hard and getting harder every day. I, myself, can
see that software projects sometimes fail, exceed allocated budgets
or, when things don’t really go too bad, reach the production stage
only a few weeks late. I wonder why development projects so often
disappoint in this way and look around. I see some possible answers,
but I still I have no certainties to share with confidence.
When I find it hard to understand the mechanics of things, I try to
look back at the steps I went through and that reasonably led to the
current situation. At some point in my life, I was a teenager learning
about driving and parking cars. One day my dad challenged me to
take the car out of the tiny space he had parked it in.
“It’s impossible,” I said after 20 minutes of unsuccessful efforts.
“You’re wrong,” he said and patiently explained the maneuvers he
did to actually park the car. The message was clear: if there was a
way to pull it into the spot, there was a way to pull it out.
So the question that this chapter will attempt to answer is this:
what should we do to turn the process of writing applications into a
reliably successful process? I believe we have to change our current
perspective of software and, subsequently, the approach we take to
designing it.
Software is increasingly pervasive in our social and business lives.
Therefore, software is more frequently expected to mirror social and
business processes rather than approximate discrete models. But
modeling is what the current generation of software architects grew
up with.
Ultimately, writing software is not that difficult. And this is
especially true if you stop modeling and start planning it to just
mirror what you see in the real world.
“DOAG,” said the beggar, addressing the yellow cur, “you an’ me’ll
need to be speerin’ aboot this. Whiles, it’s no sae easy tellin’ havers
frae truth.”
Though Skirling Wattie was on good terms with the whole of his
team, the member of it whom he singled out for complete
confidence, whom he regarded as an employer might regard the
foreman of a working gang, was the yellow cur. The abuse he
poured over the heads of his servants was meant more as incentive
than as rebuke, and he fed them well, sharing his substance
honestly with them, and looking to them for arduous service in
return. They were a faithful, intelligent lot, good-tempered, but for
one of the collies, and the accepted predominance of the yellow cur
was merely one more illustration of the triumph of personality. His
golden eyes, clear, like unclouded amber, contrasted with the thick
and vulgar yellow of his close coat, and the contrast was like that
between spirit and flesh. He was a strong, untiring creature, with
blunt jaws and legs that seemed to be made of steel, and it was
characteristic of him that he seldom laid down but at night, and
would stand turned in his traces as though waiting for orders,
looking towards his master as the latter sang or piped, whilst his
comrades, extended in the dust, took advantage of the halt.
The party was drawn up under the lee of a low wall by the grassy
side of the Brechin road, and its grotesqueness seemed greater than
ever because of its entirely unsuitable background.
The wall encircled the site of an ancient building called Magdalen
Chapel, which had long been ruined, and now only survived in one
detached fragment and in the half-obliterated traces of its
foundations. Round it the tangled grass rose, and a forest of
withered hemlock that had nearly choked out the nettles, stood up,
traced like lacework against the line of hills beyond the Basin. In
summer its powdery white threw an evanescent grace over the spot.
The place was a haunt of Skirling Wattie’s, for it was a convenient
half-way house between Montrose and Brechin, and the trees about
it gave a comforting shelter from both sun and rain.
The tailboard of the cart was turned to the wall so that the piper
could lean his broad back against it, and there being not a dozen
inches between the bottom of his cart and the ground, he was
hidden from anyone who might chance to be in the chapel precincts.
The projecting stone which made a stile for those who entered the
enclosure was just level with his shoulder, and he had laid his pipes
on it while he sat with folded arms and considered the situation. He
had just been begging at a farm, and he had heard a rumour there
that Archie Flemington was gone from Balnillo, and had been seen in
Brechin, riding westwards, on the preceding morning. The beggar
had got a letter for him behind his sliding boards which had to be
delivered without delay.
“Doag,” said he again, “we’ll awa’ to auld Davie’s.”
Skirling Wattie distrusted rumour, for the inexactitudes of human
observation and human tongues are better known to a man who
lives by his wits than to anybody else. He was not going to accept
this news without sifting it. To Balnillo he would go to find out
whether the report was true. The only drawback was that “auld
Davie,” as he called the judge, abhorred and disapproved of
beggars, and he did not know how he might stay in the place long
enough to find out what he wanted. He was a privileged person at
most houses, from the sea on the east to Forfar on the west, but
Lord Balnillo would none of him. Nevertheless, he turned the wheels
of his chariot in his direction.
He wondered, as he went along, why he had not seen Archie by
the way; but Archie had not left Balnillo by the Brechin road, being
anxious to avoid him. What was the use of receiving instructions that
he could not bring himself to carry out? The last person he wished to
meet was the beggar.
Wattie turned into the Balnillo gates and went up the avenue
towards the stable. His pipes were silent, and the fallen leaves
muffled the sound of his wheels. He knew about the mishap that
had brought Flemington as a guest to the judge, and about the
portrait he was painting, for tidings of all the happenings in the
house reached the mill sooner or later. That source of gossip was
invaluable to him. But, though the miller had confirmed the report
that Flemington had gone, he had been unable to tell him his exact
destination.
He drove into the stable yard and found it empty but for a man
who was chopping wood. The latter paused between his strokes as
he saw who had arrived.
“A’m seekin’ his lordship,” began Wattie, by way of discovering
how the land lay.
“Then ye’ll no find him,” replied the woodman, who was none
other than the elder, Andrew Robieson, and who, like his master,
disapproved consistently of the beggar. He was a sly old man, and
he did not think it necessary to tell the intruder that the judge,
though not in the house, was within hearing of the pipes. It was his
boast that he “left a’ to Providence,” but he was not above an
occasional shaping of events to suit himself.
The beggar rolled up to the back-door at the brisk pace he
reserved for public occasions. A shriek of delight came from the
kitchen window as the blast of his pipes buzzed and droned across
the yard. The tune of the ‘East Nauk of Fife’ filled the place. A couple
of maidservants came out and stood giggling as Wattie
acknowledged their presence by a wag of the head that spoke
gallantry, patronage, ribaldry—anything that a privileged old rogue
can convey to young womanhood blooming near the soil. A groom
came out of the stable and joined the group.
The feet of the girls were tapping the ground. The beggar’s
expression grew more genially provocative, and his eyeballs rolled
more recklessly as he blew and blew; his time was perfect. The
groom, who was dancing, began to compose steps on his own
account. Suddenly there was a whirl of petticoats, and he had seized
one of the girls round the middle.
They spun and counter-spun; now loosing each other for the more
serious business of each one’s individual steps, now enlacing again,
seeming flung together by some resistless elemental wind. The
man’s gaze, while he danced alone, was fixed on his own feet as
though he were chiding them, admiring them, directing them
through niceties which only himself could appreciate. His partner’s
hair came down and fell in a loop of dull copper-colour over her
back. She was a finely-made girl, and each curve of her body
seemed to be surging against the agitated sheath of her clothes.
The odd-woman-out circled round the pair like a fragment thrown off
by the spin of some travelling meteor. The passion for dancing that
is even now part of the life of Angus had caught all three, let loose
upon them by the piper’s handling of sound and rhythm.
In the full tide of their intoxication, a door in the high wall of the
yard opened and Lord Balnillo came through it. The fragment broke
from its erratic orbit and fled into the house with a scream; the
meteor, a whirling twin-star, rushed on, unseeing. The piper, who
saw well enough, played strong and loud; not the king himself could
have stopped him in the middle of a strathspey. The yellow dog, on
his feet among his reposing companions, showed a narrow white line
between his lips, and the hackles rose upon his plebeian neck.
“Silence!” cried Lord Balnillo. But the rest of his words were
drowned by the yell of the pipes.
As the dancers drew asunder again, they saw him and stopped.
His wrath was centred on the beggar, and man and maid slunk away
unrebuked.
Wattie finished his tune conscientiously. To Balnillo, impotent in
the hurricane of braying reeds, each note that kept him dumb was a
new insult, and he could see the knowledge of that fact in the
piper’s face. As the music ceased, the beggar swept off his bonnet,
displaying his disreputable bald head, and bowed like the sovereign
of some jovial and misgoverned kingdom. The yellow dog’s attitude
forbade Balnillo’s nearer approach.
“Go!” shouted the judge, pointing a shaking forefinger into space.
“Out with you instantly! Is my house to be turned into a house of
call for every thief and vagabond in Scotland? Have I not forbidden
you my gates? Begone from here immediately, or I will send for my
men to cudgel you out!”
But he leaped back, for he had taken a step forward in his
excitement, and the yellow cur’s teeth were bare.
“A’m seekin’ the painter-laddie,” said the beggar, giving the dog a
good-humoured cuff.
“Away with you!” cried the other, unheeding. “You are a plague to
the neighbourhood. I will have you put in Montrose jail! To-morrow,
I promise you, you will find yourself where you cannot make
gentlemen’s houses into pandemoniums with your noise.”
“A’d like Brechin better,” rejoined the beggar; “it’s couthier in
there.”
Balnillo was a humane man, and he prided himself, as all the
world knew, on some improvements he had suggested in the
Montrose prison. He was speechless.
“Ay,” continued Wattie, “a’m thinkin’ you’ve sent mony a better
man than mysel’ to the tolbooth. But, dod! a’m no mindin’ that. A’m
asking ye, whaur’s the painter-lad?”
One of Balnillo’s fatal qualities was his power of turning in mid-
career of wrath or eloquence to daily with side-issues.
He swallowed the fury rising to his lips.
“What! Mr. Flemington?” he stammered. “What do you want of Mr.
Flemington?”
“Is yon what they ca’ him? Well, a’m no seekin’ onything o’ him.
It’s him that’s seekin’ me.”
Astonishment put everything else out of Balnillo’s mind. He glared
at the intruder, his lips pursed, his fingers working.
“He tell’t me to come in-by to the muckle hoose and speer for
him,” said the other. “There was a sang he was needin’. He was
seekin’ to lairn it, for he liket it fine, an’ he tell’t me to come awa’ to
the hoose and lairn him. Dod! maybe he’s forgotten. Callants like
him’s whiles sweer to mind what they say, but auld stocks like you
an’ me’s got mair sense.”
“I do not believe a word of it,” protested Balnillo.
“Hoots! ye’ll hae to try, or the puir lad ’ll no get his sang,”
exclaimed Skirling Wattie, smiling broadly. “Just you cry on him to
come down the stair, an’ we’ll awa’ ahint the back o’ yon wa’, an’ a’ll
lairn him the music! It’s this way.”
He unscrewed the chanter and blew a few piercing notes. The
sound flew into the judge’s face like the impact of a shower of
pebbles. He clapped his hands to his ears.
“I tell you Mr. Flemington is not here!” he bawled, raising his voice
above the din. “He is gone. He is at Ardguys by this time.”
“Man, is yon true? Ye’re no leein’?” exclaimed Wattie, dropping his
weapon.
“Is yon the way to speak to his lordship?” said the deep voice of
Andrew Robieson, who had come up silently, his arms full of wood,
behind the beggar’s cart.
“Turn this vagabond away!” exclaimed Balnillo, almost beside
himself. “Send for the men; bring a horsewhip from the stable!
Impudent rogue! Go, Robieson—quick, man!”
But Wattie’s switch was in his hand, and the dogs were already
turning; before the elder had time to reach the stables, he had
passed out under the clock and was disappearing between the trees
of the avenue. He had learned what he wished to know, and the
farther side of Brechin would be the best place for him for the next
few days. He reflected that fortune had favoured him in keeping
Captain Logie out of the way. There would have been no parleying
with Captain Logie.
BOOK II
CHAPTER X
ADRIFT
WHEN Archie lay and pictured James on the other side of the water
his vision was a true one, but, while he saw him on the quay among
the sheds and windlasses, he had set him in the wrong place.
James stood at the point of the bay formed by the Basin of
Montrose, at the inner and landward side of the town, not far from
the empty fort from which Hall had taken the guns. The sands at his
feet were bare, for the tide was out, and the salt, wet smell of the
oozing weed blew round him on the faint wind. He was waiting for
Ferrier.
They had chosen this night, as at this hour the ebbing water
would make it possible for the hundred men of Ferrier’s regiment to
keep clear of the roads, and to make their way from Brechin on the
secluded shore of the Basin. Logie had not been there long when he
heard the soft sound of coming feet, and the occasional knocking of
shoes against stone. As an increasing shadow took shape, he struck
his hand twice against his thigh, and the shadow grew still. He
struck again, and in another minute Ferrier was beside him; the
soldiers who followed halted behind their leader. The two men said
little to each other, but moved on side by side, and the small
company wound up the rising slope of the shore to the deserted fort
and gathered at its foot.
James and his friend went on a little way and stood looking east
down the townward shore of the strait past the huddled houses
massed together at this end of Montrose. The water slid to the sea,
and halfway down the long quay in front of them was moored the
unrigged barque that held the town guns—the four-pounders and
six-pounders that had pointed their muzzles for so many years from
the fort walls towards the thundering bar.
Hall had not concerned himself to bring the vessel into his own
immediate neighbourhood, nor even to put a few dozen yards of
water between her and the shore. He knew that no organized rebel
force existed within nine miles of where she lay, and that the
Jacobites among the townsmen could not attempt any hostile
movement unaided. He had eighty men on board the Venture with
him, and from them he had taken a small guard which was left in
charge of the barque. Every two or three days he would send a
party from the sloop to patrol the streets of Montrose, and to
impress disloyally inclined people. His own investigations of the place
had not been great, for, though he went ashore a good deal, it
cannot be said that King George’s interests were much furthered by
his doings when he got there.
When Logie and Ferrier had posted a handful of men in the empty
fort, they went on towards the barque’s moorings followed by the
rest, and leaving a few to guard the mouth of each street that
opened on the quay. The whole world was abed behind the
darkened windows and the grim stone walls that brooded like blind
faces over the stealthy band passing below. When they reached the
spot where the ferry-boat lay that plied between Montrose and the
south shore of the strait, two men went down to the landing-stage,
and, detaching her chains, got her ready to push off. Then, with no
more delay, the friends pressed on to the main business of their
expedition. As they neared the barque, a faint shine forward where
her bows pointed seaward suggested that someone on board was
waking, so, judging it best to make the attack before an alarm could
be given, the two captains ran on with their men, and were climbing
over the bulwarks and tumbling on to her deck before Captain Hall’s
guard, who were playing cards round a lantern, had time to collect
their senses.
The three players sprang to their feet, and one of them sent a
loud cry ringing into the darkness before he sprawled senseless, with
his head laid open by the butt-end of Ferrier’s pistol. In this
unlooked-for onslaught, that had come upon them as suddenly as
the swoop of a squall in a treacherous sea, they struck blindly about,
stumbling into the arms of the swarming, unrecognized figures that
had poured in on their security out of the peaceful night. James had
kicked over the lantern, and the cards lay scattered about under
foot, white spots in the dimness. The bank of cloud was thinning a
little round the moon, and the angles of the objects on deck began
to be more clearly blocked out. One of the three, who had contrived
to wrench himself from his assailant’s hold, sprang away and raced
towards the after-part of the ship, where, with the carelessness of
security, he had left his musket. Three successive shots was the
signal for help from the Venture in case of emergency, and he made
a gallant effort to get free to send this sign of distress across the
strait. But he was headed back and overpowered before he could
carry out his intention. One of his companions was lying as if dead
on the deck, and the other, who had been cajoled to silence by the
suggestive caress of a pistol at the back of his ear, was having his
arms bound behind him with his own belt.
Not a shot had been fired. Except for that one cry from the man
who lay so still at their feet, no sound but the scuffling and cursing
on the barque disturbed the quiet. Ferrier’s men hustled their
prisoners below into the cabin, where they were gagged and
secured and left under the charge of a couple of soldiers. No roving
citizen troubled the neighbourhood at this hour, for the fly-by-nights
of Montrose looked farther inland for their entertainment, and the
fisher-folk, who were the principal dwellers in the poor houses
skirting the quays, slept sound, and recked little of who might be
quarrelling out of doors so long as they lay warm within them. The
barque was some way up-stream from the general throng of
shipping—apart, and, as Hall had thought, the more safe for that, for
his calculations had taken no count of an enemy who might come
from anywhere but the town. He had never dreamed of the silent
band which had been yielded up by the misty stretches of the Basin.
James leaned over the vessel’s side towards the Venture, and
thought of Captain Hall. He had seen him in a tavern of the town,
and had been as little impressed by his looks as was Flemington. He
had noticed the uncertain eye, the restless fingers, the trotting gait,
and had held him lightly as a force; for he knew as well as most men
know who have knocked about this world that character—none other
—is the hammer that drives home every nail into the framework of
achievement.
But he had no time to spend in speculations, for his interest was
centred in the ferry-boat that was now slipping noiselessly towards
them on the current, guided down-stream by the couple of soldiers
who had unmoored her. As she reached the barque a rope was
tossed down to her, and she was made fast. The stolen guns were
hauled from their storage, and a six-pounder lowered, with its
ammunition, into the great tub that scarcely heaved on the slow
swirl of the river; and whilst the work was going on, Ferrier and
James stepped ashore to the quay, and walked each a short way
along it, watching for any movement or for the chance of surprise.
There was nothing: only, from far out beyond the shipping, a soft
rush, so low that it seemed to be part of the atmosphere itself, told
that the tide was on the turn.
In the enshrouding night the boat was loaded, and a dozen or so
of the little company pushed off with their spoil. Ferrier went with
them, and Logie, who was to follow with the second gun, watched
the craft making her way into obscurity, like some slow black river
monster pushing blindly out into space.
The scheme he had been putting together since the arrival of the
Venture was taking reality at last, and though he could stand with
folded arms on the bulwark looking calmly at the departing boat, the
fire in his heart burned hot. Custom had inured him to risks of every
kind, and if his keenness of enterprise was the same as it had been
in youth, the excitement of youth had evaporated. It was the depths
that stirred in Logie, seldom the surface. Like Archie Flemington, he
loved life, but he loved it differently. Flemington loved it consciously,
joyously, pictorially; James loved it desperately—so desperately that
his spirit had survived the shock which had robbed it of its glory, for
him. He was like a faithful lover whose mistress has been scarred by
smallpox.
He could throw himself heart and soul into the Stuart cause, its
details and necessities—all that his support of it entailed upon him,
because it had, so to speak, given him his second wind in the race of
life. Though he was an adventurer by nature, he differed from the
average adventurer in that he sought nothing for himself. He did not
conform to the average adventuring type. He was too
overwhelmingly masculine to be a dangler about women, though
since the shipwreck of his youth he had more than once followed in
the train of some complaisant goddess, and had reaped all the
benefits of her notice; he was no snatcher at casual advantages, but
a man to whom service in any interest meant solid effort and
unsparing sacrifice. Also he was one who seldom looked back. He
had done so once lately, and the act had shaken him to the heart.
Perhaps he would do so oftener when he had wrought out the
permanent need of action that lay at the foundation of his nature.
When the boat had come back, silent on the outflowing river, and
had taken her second load, he lowered himself into the stern as her
head was pulled round again towards Inchbrayock.
The scheme fashioned by the two men for the capture of the
vessel depended for its success on their possession of this island. As
soon as they should land on it, they were to entrench the two guns,
one on its south-eastern side, as near to the Venture as possible,
and the other on its northern shore, facing the quays. By this means
the small party would command, not only the ship, but the whole
breadth of the river and its landing-places, and would be able to
stop communication between Captain Hall and the town. Heavy
undergrowth covered a fair portion of Inchbrayock, and the only
buildings upon it—if buildings they could be called—were the walls of
an old graveyard and the stones and crosses they encircled. Though
the island lay at a convenient part of the strait, no bridge connected
it with Montrose, and those who wished to cross the Esk at that
point were obliged to use the ferry. The channel dividing its southern
shore from the mainland being comparatively narrow, a row of
gigantic stepping-stones carried wayfarers dry-shod across its bed,
for at low tide there was a mere streak of water curling serpent-wise
through the mud.
When the guns were got safely into position on the island it was
decided that Ferrier was to return to the barque and take the
remaining four-pounders with all despatch to a piece of rising
ground called Dial Hill, that overlooked the mass of shipping
opposite Ferryden.
He did not expect to meet with much opposition, should news of
his action be carried to the town, for its main sympathies were with
his side, and the force on the Government vessel would be
prevented from coming over the strait to oppose him until he was
settled on his eminence by the powerful dissuaders he had left
behind him on Inchbrayock. He was to begin firing from Dial Hill at
dawn, and James, who was near enough to the Venture to see any
movement that might take place on her, was to be ready with his fire
and with his small party of marksmen to check any offensive force
despatched from the ship to the quays. Hall would thus be cut off
from the town by the fire from Inchbrayock, on the one hand, and,
should he attempt a landing nearer to the watermouth, by the guns
on Dial Hill, on the other.
James had placed himself advantageously. The thicket of elder
and thorn which had engulfed one end of the burial-ground made
excellent concealment, and in front of him was the solid wall,
through a gap in which he had turned the muzzle of his six-pounder.
He sat on the stump of a thorn-tree, his head in his hands, waiting,
as he knew he would have to wait, for some time yet, till the first
round from Dial Hill should be the signal for his own attack. The
moon had made her journey by this hour, and while she had been
caught in her course through the zenith in the web of cloud and mist
that thickened the sky, she was now descending towards her rest
through a clear stretch; she swung, as though suspended above the
Basin, tilted on her back, and a little yellower as she neared the
earth, a dying, witch-like thing, halfway through her second quarter.
James, looking up, could see her between the arms of the crosses
and the leaning stones.
The strangeness of the place arrested his thoughts and turned
them into unusual tracks, for, though far from being an
unimaginative man, he was little given to deliberate contemplation.
The distant inland water under the lighted half disc was pale, and a
faintness seemed to lie upon the earth in this hour between night
and morning. His thoughts went to the only dwellers on
Inchbrayock, those who were lying under his feet—seamen, for the
most part, and fisher-folk, who had known the fury of the North Sea
that was now beginning to crawl in and to surround them in their
little township with its insidious arms, encircling in death the bodies
that had escaped it in life. Some of them had been far afield, farther
than he had ever been, in spite of all his campaigns, but they had
come in over the bar to lie here in the jaws of the outflowing river
by their native town. He wondered whether he should do the same;
times were so uncertain now that he might well take the road into
the world again. The question of where his bones should lie was a
matter of no great interest to him, and though there was a vague
restfulness in the notion of coming at last to the slopes and shadows
of Balnillo, he knew that the wideness of the world was his natural
home. Then he thought of Bergen-op-Zoom. . . .
After a while he raised his head again, roused, not by the streak
of light that was growing upon the east, but by a shot that shattered
the silence and sent the echoes rolling out from Dial Hill.
CHAPTER XII
INCHBRAYOCK
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.
textbookfull.com