100% found this document useful (1 vote)
49 views56 pages

Learning Node 1st Edition Shelley Powers - Instantly access the complete ebook with just one click

The document promotes the availability of various eBooks for download, including titles on Node.js and JavaScript by Shelley Powers. It provides links to specific eBooks and highlights the instant digital formats available. Additionally, it includes publication details and a comprehensive table of contents for the 'Learning Node' book, covering various aspects of Node.js development.

Uploaded by

kdeykutani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
49 views56 pages

Learning Node 1st Edition Shelley Powers - Instantly access the complete ebook with just one click

The document promotes the availability of various eBooks for download, including titles on Node.js and JavaScript by Shelley Powers. It provides links to specific eBooks and highlights the instant digital formats available. Additionally, it includes publication details and a comprehensive table of contents for the 'Learning Node' book, covering various aspects of Node.js development.

Uploaded by

kdeykutani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Endless Ebook, One Click Away – Start Downloading at ebookname.

com

Learning Node 1st Edition Shelley Powers

https://ebookname.com/product/learning-node-1st-edition-
shelley-powers/

OR CLICK HERE

DOWLOAD EBOOK

Browse and Get More Ebook Downloads Instantly at https://ebookname.com


Click here to visit ebookname.com and download ebook now
Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Learning JavaScript 2nd Edition Shelley Powers

https://ebookname.com/product/learning-javascript-2nd-edition-
shelley-powers/

Node js Blueprints Tsonev

https://ebookname.com/product/node-js-blueprints-tsonev/

Node js By Example 1st Edition Tsonev

https://ebookname.com/product/node-js-by-example-1st-edition-
tsonev/

Alternative Digital Photography 1st Edition John G.


Blair

https://ebookname.com/product/alternative-digital-
photography-1st-edition-john-g-blair/
SAS R 9 1 3 Language Reference Concepts Second Edition
2 Volume Set Inc Sas Institute

https://ebookname.com/product/sas-r-9-1-3-language-reference-
concepts-second-edition-2-volume-set-inc-sas-institute/

Political Parties and Terrorist Groups 2nd ed Extremism


and Democracy 2nd Edition Leonar Weinberg

https://ebookname.com/product/political-parties-and-terrorist-
groups-2nd-ed-extremism-and-democracy-2nd-edition-leonar-
weinberg/

Postcolonial Literature 1st Edition Dave Gunning

https://ebookname.com/product/postcolonial-literature-1st-
edition-dave-gunning/

Inspiration 1st Edition David R. Law

https://ebookname.com/product/inspiration-1st-edition-david-r-
law/

Plate Tectonics Steve Tomecek

https://ebookname.com/product/plate-tectonics-steve-tomecek/
A Very Social Time Crafting Community in Antebellum New
England Karen V. Hansen

https://ebookname.com/product/a-very-social-time-crafting-
community-in-antebellum-new-england-karen-v-hansen/
Learning Node

Shelley Powers

Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo


Learning Node
by Shelley Powers

Copyright © 2012 Shelley Powers. All rights reserved.


Printed in the United States of America.

Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.

O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (http://my.safaribooksonline.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or [email protected].

Editor: Simon St. Laurent Indexer: Aaron Hazelton, BIM Publishing Services
Production Editor: Rachel Steely Cover Designer: Karen Montgomery
Copyeditor: Rachel Monaghan Interior Designer: David Futato
Proofreader: Kiel Van Horn Illustrators: Robert Romano and Rebecca Demarest

September 2012: First Edition.

Revision History for the First Edition:


2012-08-24 First release
See http://oreilly.com/catalog/errata.csp?isbn=9781449323073 for release details.

Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. Learning Node, the image of a hamster rat, and related trade dress are trademarks
of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a
trademark claim, the designations have been printed in caps or initial caps.

While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.

ISBN: 978-1-449-32307-3

[LSI]

1345837731
Table of Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

1. Node.js: Up and Running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


Setting Up a Node Development Environment 2
Installing Node on Linux (Ubuntu) 2
Partnering Node with WebMatrix on Windows 7 4
Updating Node 9
Node: Jumping In 10
Hello, World in Node 10
Hello, World from the Top 11
Asynchronous Functions and the Node Event Loop 13
Reading a File Asynchronously 14
Taking a Closer Look at Asynchronous Program Flow 16
Benefits of Node 19

2. Interactive Node with REPL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21


REPL: First Looks and Undefined Expressions 21
Benefits of REPL: Getting a Closer Understanding of JavaScript Under the
Hood 23
Multiline and More Complex JavaScript 24
REPL Commands 27
REPL and rlwrap 28
Custom REPL 29
Stuff Happens—Save Often 32

3. The Node Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35


Globals: global, process, and Buffer 35
global 36
process 38
Buffer 39
The Timers: setTimeout, clearTimeout, setInterval, and clearInterval 40

iii
Servers, Streams, and Sockets 41
TCP Sockets and Servers 42
HTTP 44
UDP/Datagram Socket 46
Streams, Pipes, and Readline 48
Child Processes 50
child_process.spawn 50
child_process.exec and child_process.execFile 52
child_process.fork 53
Running a Child Process Application in Windows 53
Domain Resolution and URL Processing 54
The Utilities Module and Object Inheritance 56
Events and EventEmitter 59

4. The Node Module System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63


Loading a Module with require and Default Paths 63
External Modules and the Node Package Manager 65
Finding Modules 69
Colors: Simple Is Best 71
Optimist: Another Short and Simple Module 72
Underscore 73
Creating Your Own Custom Module 74
Packaging an Entire Directory 75
Preparing Your Module for Publication 75
Publishing the Module 78

5. Control Flow, Asynchronous Patterns, and Exception Handling . . . . . . . . . . . . . . . . 81


Promises, No Promises, Callback Instead 81
Sequential Functionality, Nested Callbacks, and Exception Handling 84
Asynchronous Patterns and Control Flow Modules 91
Step 92
Async 95
Node Style 100

6. Routing Traffic, Serving Files, and Middleware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103


Building a Simple Static File Server from Scratch 103
Middleware 110
Connect Basics 111
Connect Middleware 113
Custom Connect Middleware 118
Routers 121
Proxies 123

iv | Table of Contents
7. The Express Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Express: Up and Running 128
The app.js File in More Detail 129
Error Handling 132
A Closer Look at the Express/Connect Partnership 133
Routing 134
Routing Path 136
Routing and HTTP Verbs 139
Cue the MVC 145
Testing the Express Application with cURL 150

8. Express, Template Systems, and CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153


The Embedded JavaScript (EJS) Template System 153
Learning the Basic Syntax 154
Using EJS with Node 155
Using the EJS for Node Filters 157
Using a Template System (EJS) with Express 158
Restructuring for a Multiple Object Environment 160
Routing to Static Files 161
Processing a New Object Post 163
Working with the Widgets Index and Generating a Picklist 165
Showing an Individual Object and Confirming an Object Deletion 166
Providing an Update Form and Processing a PUT Request 168
The Jade Template System 172
Taking the Nickel Tour of the Jade Syntax 172
Using block and extends to Modularize the View Templates 174
Converting the Widget Views into Jade Templates 176
Incorporating Stylus for Simplified CSS 180

9. Structured Data with Node and Redis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187


Getting Started with Node and Redis 188
Building a Game Leaderboard 190
Creating a Message Queue 196
Adding a Stats Middleware to an Express Application 201

10. Node and MongoDB: Document-Centric Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207


The MongoDB Native Node.js Driver 208
Getting Started with MongoDB 208
Defining, Creating, and Dropping a MongoDB Collection 209
Adding Data to a Collection 210
Querying the Data 213
Using Updates, Upserts, and Find and Remove 217
Implementing a Widget Model with Mongoose 221

Table of Contents | v
Refactoring the Widget Factory 222
Adding the MongoDB Backend 223

11. The Node Relational Database Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229


Getting Started with db-mysql 230
Using Query String or Chained Methods 230
Updating the Database with Direct Queries 233
Updating the Database with Chained Methods 236
Native JavaScript MySQL Access with node-mysql 237
Basic CRUD with node-mysql 237
MySQL Transactions with mysql-queues 239
ORM Support with Sequelize 242
Defining a Model 242
Using CRUD, ORM Style 244
Adding Several Objects Easily 246
Overcoming Issues Related to Going from Relational to ORM 247

12. Graphics and HTML5 Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249


Creating and Working with PDFs 249
Accessing PDF Tools with Child Processes 250
Creating PDFs with PDFKit 258
Accessing ImageMagick from a Child Process 260
Properly Serving HTML5 Video with HTTP 264
Creating and Streaming Canvas Content 268

13. WebSockets and Socket.IO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273


WebSockets 273
An Introduction to Socket.IO 274
A Simple Communication Example 274
WebSockets in an Asynchronous World 278
About That Client Code 279
Configuring Socket.IO 279
Chat: The WebSockets “Hello, World” 281
Using Socket.IO with Express 284

14. Testing and Debugging Node Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287


Debugging 287
The Node.js Debugger 287
Client-Side Debugging with Node Inspector 290
Unit Testing 292
Unit Testing with Assert 292
Unit Testing with Nodeunit 296
Other Testing Frameworks 297

vi | Table of Contents
Acceptance Testing 301
Selenium Testing with Soda 301
Emulating a Browser with Tobi and Zombie 305
Performance Testing: Benchmarks and Load Tests 306
Benchmark Testing with ApacheBench 307
Load Testing with Nodeload 311
Refreshing Code with Nodemon 313

15. Guards at the Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315


Encrypting Data 316
Setting Up TSL/SSL 316
Working with HTTPS 317
Safely Storing Passwords 319
Authentication/Authorization with Passport 322
Authorization/Authentication Strategies: OAuth, OpenID, Username/
Password Verification 323
The Local Passport Strategy 324
The Twitter Passport Strategy (OAuth) 331
Protecting Applications and Preventing Attacks 337
Don’t Use eval 338
Do Use Checkboxes, Radio Buttons, and Drop-Down Selections 338
Scrub Your Data and Sanitize It with node-validator 339
Sandboxed Code 340

16. Scaling and Deploying Node Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345


Deploying Your Node Application to Your Server 345
Writing That package.json File 346
Keeping Your Application Alive with Forever 349
Using Node and Apache Together 351
Improving Performance 353
Deployment to a Cloud Service 353
Deploying to Windows Azure via Cloud9 IDE 354
Joyent Development SmartMachines 356
Heroku 357
Amazon EC2 357
Nodejitsu 357

Appendix: Node, Git, and GitHub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

Table of Contents | vii


Preface

Not Your Ordinary JavaScript


You picked the perfect time to learn Node.
The technology evolving around Node is still young and vibrant, with interesting new
variations and twists popping up on a regular basis. At the same time, the technology
has reached a level of maturity that assures you your time learning Node will be well
spent: installation has never been easier, even on Windows; the “best of breed” modules
are beginning to surface from the seeming hundreds available for use; the infrastructure
is becoming robust enough for production use.
There are two important things to keep in mind when you work with Node. The first
is that it is based in JavaScript, more or less the same JavaScript you’re used to working
with in client-side development. True, you can use another language variation, such as
CoffeeScript, but JavaScript is the lingua franca of the technology.
The second important thing to remember is that Node isn’t your ordinary JavaScript.
This is server-side technology, which means some of the functionality—and safeguards
—you’ve come to expect in your browser environment just won’t be there, and all sorts
of new and potentially very unfamiliar capabilities will.
Of course, if Node were like JavaScript in the browser, what fun would that be?

Why Node?
If you explore the source code for Node, you’ll find the source code for Google’s V8,
the JavaScript (technically, ECMAScript) engine that’s also at the core of Google’s
Chrome browser. One advantage to Node.js, then, is that you can develop Node ap-
plications for just one implementation of JavaScript—not half a dozen different brows-
ers and browser versions.
Node is designed to be used for applications that are heavy on input/output (I/O), but
light on computation. More importantly, it provides this functionality directly out of
the box. You don’t have to worry about the application blocking any further processing

ix
while waiting for a file to finish loading or a database to finish updating, because most
of the functionality is asynchronous I/O by default. And you don’t have to worry about
working with threads, because Node is implemented on a single thread.

Asynchronous I/O means that applications don’t wait for an input/out-


put process to finish before going on to the next step in the application
code. Chapter 1 goes into more detail on the asynchronous nature of
Node.

Most importantly, Node is written in a language that many traditional web developers
are familiar with: JavaScript. You may be learning how to use new technologies, such
as working with WebSockets or developing to a framework like Express, but at least
you won’t have to learn a new language along with the concepts. This language famil-
iarity makes it a lot easier to just focus on the new material.

This Book’s Intended Audience


One of the challenges associated with working with Node is that there is an assumption
that most people coming into Node development have come from a Ruby or Python
environment, or have worked with Rails. I don’t have this assumption, so I won’t ex-
plain a Node component by saying it’s “just like Sinatra.”
This book’s only assumption is that you, the reader, have worked with JavaScript and
are comfortable with it. You don’t have to be an expert, but you should know what I’m
talking about when I mention closures, and have worked with Ajax and are familiar
with event handling in the client environment. In addition, you’ll get more from this
book if you have done some traditional web development and are familiar with concepts
such as HTTP methods (GET and POST), web sessions, cookies, and so on. You’ll also
need to be familiar with working either with the Console in Windows, or the Unix
command line in Mac OS X or Linux.
You’ll also enjoy the book more if you’re interested in some of the new technologies
such as WebSockets, or working with frameworks to create applications. I cover these
as a way of introducing you to how Node can be used in real-world applications.
Most importantly, as you progress through the book, keep an open mind. Be prepared
to hit an occasional alpha/beta wall and run into the gotchas that plague a dynamic
technology. Above all, meet the prospect of learning Node with anticipation, because
it really can be a lot of fun.

If you’re not sure you’re familiar enough with JavaScript, you might
want to check out my introductory text on JavaScript, Learning Java-
Script, Second Edition (O’Reilly).

x | Preface
How to Best Use This Book
You don’t have to read this book’s chapters in order, but there are paths through the
book that are dependent on what you’re after and how much experience you have with
Node.
If you’ve never worked with Node, then you’re going to want to start with Chapter 1
and read through at least Chapter 5. These chapters cover getting both Node and the
package manager (npm) installed, how to use them, creating your first applications,
and utilizing modules. Chapter 5 also covers some of the style issues associated with
Node, including how to deal with Node’s unique approach to asynchronous develop-
ment.
If you have had some exposure to Node, have worked with both the built-in Node
modules and a few external ones, and have also used REPL (read-eval-print loop—the
interactive console), you could comfortably skip Chapter 1–Chapter 4, but I still
recommend starting no later than Chapter 5.
I incorporate the use of the Express framework, which also utilizes the Connect mid-
dleware, throughout the book. If you’ve not worked with Express, you’re going to want
to go through Chapter 6–Chapter 8, which cover the concepts of routing, proxies, web
servers, and middleware, and introduce Express. In particular, if you’re curious about
using Express in a Model-View-Controller (MVC) framework, definitely read Chap-
ter 7 and Chapter 8.
After these foundation chapters, you can skip around a bit. For instance, if you’re
primarily working with key/value pairs, you’ll want to read the Redis discussion in
Chapter 9; if you’re interested in document-centric data, check out Chapter 10, which
introduces how to use MongoDB with Node. Of course, if you’re going to work only
with a relational database, you can go directly to Chapter 11 and skip the Redis and
MongoDB chapters, though do check them out sometime—they might provide a new
viewpoint to working with data.
After those three data chapters, we get into specialized application use. Chapter 12
focuses purely on graphics and media access, including how to provide media for the
new HTML5 video element, as well as working with PDF documents and Canvas.
Chapter 13 covers the very popular Sockets.io module, especially for working with the
new web socket functionality.
After the split into two different specialized uses of Node in Chapter 12 and Chap-
ter 13, we come back together again at the end of the book. After you’ve had some time
to work with the examples in the other chapters, you’re going to want to spend some
in Chapter 14, learning in-depth practices for Node debugging and testing.
Chapter 15 is probably one of the tougher chapters, and also one of the more important.
It covers issues of security and authority. I don’t recommend that it be one of the first

Preface | xi
chapters you read, but it is essential that you spend time in this chapter before you roll
a Node application out for general use.
Chapter 16 is the final chapter, and you can safely leave it for last, regardless of your
interest and experience. It focuses on how to prepare your application for production
use, including how to deploy your Node application not only on your own system, but
also in one of the cloud servers that are popping up to host Node applications. I’ll also
cover how to deploy a Node application to your server, including how to ensure it plays
well with another web server such as Apache, and how to ensure your application
survives a crash and restarts when the system is rebooted.
Node is heavily connected with the Git source control technique, and most (if not all)
Node modules are hosted on GitHub. The Appendix provides a Git/GitHub survival
guide for those who haven’t worked with either.
I mentioned earlier that you don’t have to follow the chapters in order, but I recommend
that you do. Many of the chapters work off effort in previous chapters, and you may
miss out on important points if you skip around. In addition, though there are numer-
ous standalone examples all throughout the book, I do use one relatively simple Express
application called Widget Factory that begins life in Chapter 7 and is touched on, here
and there, in most of the rest of the chapters. I believe you’ll have a better time with
the book if you start at the beginning and then lightly skim the sections that you know,
rather than skip a chapter altogether.
As the king says in Alice in Wonderland, “Begin at the beginning and go on till you come
to the end: then stop.”

The Technology
The examples in this book were created in various releases of Node 0.6.x. Most were
tested in a Linux environment, but should work, as is, in any Node environment.
Node 0.8.x released just as this book went to production. The examples in the chapters
do work with Node 0.8.x for the most part; I have indicated the instances where you’ll
need to make a code change to ensure that the application works with the newest Node
release.

The Examples
You can find the examples as a compressed file at the O’Reilly web page for this book
(http://oreil.ly/Learning_node). Once you’ve downloaded and uncompressed it, and
you have Node installed, you can install all the dependency libraries for the examples
by changing to the examples directory and typing:
npm install -d

I’ll cover more on using the Node package manager (npm) in Chapter 4.

xii | Preface
Conventions Used in This Book
The following typographical conventions are used in this book:
Plain text
Indicates menu titles, menu options, menu buttons, and keyboard accelerators
(such as Alt and Ctrl).
Italic
Indicates new terms, URLs, email addresses, filenames, file extensions, pathnames,
directories, and Unix utilities.
Constant width
Indicates commands, options, switches, variables, attributes, keys, functions,
types, classes, namespaces, methods, modules, properties, parameters, values, ob-
jects, events, event handlers, XML tags, HTML tags, macros, the contents of files,
or the output from commands.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values.

This icon signifies a tip, suggestion, or general note.

This icon indicates a warning or caution.

Using Code Examples


This book is here to help you get your job done. In general, you may use the code in
this book in your programs and documentation. You do not need to contact us for
permission unless you’re reproducing a significant portion of the code. For example,
writing a program that uses several chunks of code from this book does not require
permission. Selling or distributing a CD-ROM of examples from O’Reilly books does
require permission. Answering a question by citing this book and quoting example
code does not require permission. Incorporating a significant amount of example code
from this book into your product’s documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the
title, author, publisher, and ISBN. For example: “Learning Node by Shelley Powers
(O’Reilly). Copyright 2012 Shelley Powers, 978-1-449-32307-3.”

Preface | xiii
Other documents randomly have
different content
HARRODS, Ltd.
HARRODS SADDLE SOAP SADDLE SOAP
HARROD’S LIMITED Harrods’ Saddle Soap.
SADDLE SOAP In bars.
Harrods’ Saddle Soap. Per bar ... ... ... 0/6
Per tin ... 0/6 Per doz. bars ... 5/6
Per doz. ... 5/6

BRILLIANT
Metallic Powder
HARRODS Ltd. LONDON
GREEN REVIVER
Brilliant Metallic Powder. HARDING’S MOROCCO REVIVER
For cleaning brass, copper, etc. HARDING & Cº
Per box ... 0/6 Per doz. ... 5/6 Morocco Leather
Per lb. tin 1/0 Per doz. ... 10/6 Reviver (Harding’s).
In various colours.
Per bottle ... 1/0
AXLE OIL HARRODS. LIMITED
HARRODS, LIMITED VETERINARY
Brompton Road. London s.w. HOOF DRESSING
Harrods’ Axle Oil. BROMPTON ROAD. LONDON
Per pint ... 0/9 Harrods’ Veterinary
,, quart ... 1/4 Hoof Dressing.
,, ½ gallon ... 2/0 Per pint tin ... 1/6
,, gallon ... 3/6 ,, quart tin ... 2/9
,, ½ gallon tin ... 5/0
,, gallon tin ... 9/0
Jet=Black HARNESS OIL
Harrods’ Black Oil.
Per pint ... 0/10½
,, quart ... 1/6
THE Nortthcote Preparation
,, ½ gallon ... 2/9
Scarlet Coats
,, gallon ... 4/6 T.C. MANN
Mann’s Scarlet Coat Preparation.
Per bottle ... 2/6

MANN’S MANN’S
Nortthcote Breeches and Glove Paste THE NORTTHCOTE BREECHES POLISH

Mann’s Breeches Paste. Mann’s Breeches Polish.


Per tin ... ... 1/4½ Per tin ... ... 1/4½

HARNESS AND SADDLERY CLEANING PREPARATIONS, HOOF


OINTMENTS, ETC.
pint, 0/9; qt., 1/4; ½
Axle Oil gal., 2/0
2 oz. tin 0/10½; 6 oz. tin 1/10; 1 lb.
Bickmore’s Gall Cure 3/3
Blanco, for whitening buff leather per tin 0/6
,, Cakes only, for refills each 0/1
Boot Top Powder, various colours, Goddard’s per box 0/6
,, ,, ,, ,, E. Brown & Sons ,, 1/3
,, ,, ,, ,, Propert’s ,, 1/6
,, Polish, Propert’s per bottle 1/1½
Breeches Balls, various colours, Propert’s 0/9
,, or Glove Paste, Propert’s per jar 1/10½
,, ,, ,, Pullman’s ,, 1/6
per box, 0/6 and 1/0; doz., 5/6 and
Brilliant Metallic Powder 10/6
Cloth Balls, Propert’s (White) 0/9
,, Harrods’ (white and various
colours) 0/6½
“Cornucrescine,” for sand cracks, and making horn of
hoof grow per tin 2/11
per tin, 0/4½; per doz.
Electric Brass Paste, Lane’s 4/3
Embrocation, Elliman’s per bottle, 1/9 3/0
Harness Blacking, Clark’s per bottle 0/8
,, Composition, E. Brown & Sons per tin, 0/5½ and 0/10½
,, ,, P. Jamieson’s ,, 0/10 and 1/3
tin, 0/6 and 0/9; per doz. 5/6
,, ,, Harrods’, and 8/6
,, ,, Harrods’ “Special” per tin, 0/7 and 1/0
,, ,, ,, ,, per doz., 6/6 and 11/0
,, ,, Lane’s Improved Blue- per tin, 0/7 and
black, 1/0
,, ,, Propert’s ,, 0/7½ and 0/11½
,, ,, Nugget ,, 0/8
per bottle
,, Dye, Clark’s 0/6
per bottle, 0/5½; gallon
,, ,, Harrods’ 2/0
,, Dressing, “Frank Miller” pint tin, 0/10; ,, 5/0
pint tin, 0/10½; qt., 1/6; ½ gal., 2/9;
Harness Black Oil, Harrods’, per gal. 4/6
,, ,, Propert’s per bottle 0/9½
,, Dubbin Dye, Newman’s per tin 0/9½
,, Sponge Composition, Evans’s ,, 1/2
pint tin, 1/6; qt., 2/9; ½ gal., 5/0; gal.
Hoof Dressing, Harrods’, 9/0
Hoplemuroma, Clark’s per pot 4/0
tin, 0/5 and 0/8½; 3 lb., 5/3; 6
Leather Preservative, Griffin’s, lb. 9/9
Mann’s Breeches Paste per tin 1/4½
,, ,, Polish ,, 1/4½
,, ,, Polisher per ball 1/6
,, Scarlet Cloth Cleaner for Hunting
Coats per bottle 2/6
per bottle
Morocco Leather Reviver, Harding’s, various colours, 1/0
per box, 0/6; per doz.
Plate Powder, Harrods’ 5/6
per pint tin, 1/3; quart, 2/3; ½
Quinn’s Hoof Liniment gal. 4/3
Saddle Soap, Harrods’ per tin, 0/6; per doz. 5/6
,, Chiswick Improved ,, 0/6; ,, 5/6
,, Propert’s per box 0/7½
per box, 0/6; per doz.
,, Brecknell & Turner’s 5/9
,, Harrods’, in bars per bar 0/6
per tin 0/5½; per doz.
Saddle Paste, Harrods’ 5/0
,, Chiswick Improved per box, 0/6; ,, 5/6
,, Wren’s per tin, 0/5½; ,, 5/0
,, E. Brown & Sons per tin, 0/5½ and 0/10½
,, Propert’s per tin 0/9
,, Evans’s ,, 0/7½
Soft Soap, specially recommended, made from pure 3 lb., 1/3; 7
olive oil, lb. 2/3
Veterinary Vaseline per 1 lb. tin 0/8½
Waterproof Jet, for carriage heads per bottle 1/0
[519]

BAG, TRUNK AND PORTMANTEAU


DEPARTMENT.
HARROD’S Ld
No. S A 1500. Folding Portmanteau, made of best quality
butt leather, turn-over edges, hand-sewn and riveted, 8 solid
capped corners, extra strong frames, 2 long straps all round,
lever lock and 2 keys. Size 36 in. made to order only.
Length. Width. Depth. Price. Length. Width. Depth. Price.
27 in. 15 in. 13 in. 77/6 33 in. 16 in. 16 in. 102/6
30 15½ 14½ 92/6 36 17 17 113/0
No. S A 1501. Folding Portmanteau, as above, No. 2 quality.
Size 36 in. made to order only.
Length. Width. Depth. Price. Length. Width. Depth. Price.
27 in. 14½ in. 13 in. 59/6 33 in. 15 in. 15 in. 74/0
30 15 14 65/6 36 15½ 16 81/0
No. S A 1502. Shallow Imperial or Cabin Trunk, made of
finest quality solid butt leather, hand-sewn and riveted, 8 solid
capped corners, 2 extra quality long straps all round, best lever
lock and 2 keys, lined superior quality roan leather, as
illustration.
Length. Width. Depth. Price. Length. Width. Depth. Price.
30 in. 21 in. 12½ in. 231/0 36 in. 23 in. 12½ in. 273/0
33 22 12½ 252/0
HARRODS Ltd.
No. S A 1503. Expanding Top Portmanteau, or Coat Case,
made of finest quality butt leather, turn-over edges and hand-
sewn throughout, best lever lock.
Length. Width. Depth. Price. Length. Width. Depth. Price.
24 in. 15 in. 7½ in. 73/6 30 in. 16 in. 8½ in. 107/6

27 16 8 95/0 33 17 9½ 122/6
The 33 in. has 2 end handles.
No. S A 1504. Shallow Imperial or best butt leather
Steamer Trunk, turn-over edge, extra large solid leather-
capped corners, steel banded and hand-sewn, fitted with tray,
strong lever lock and 2 keys, extra stout luggage straps all
round, leather ledges, etc.
Length. Width. Depth. Price. Length. Width. Depth. Price.
30 in. 21 in. 12½ in. 126/0 36 in. 23 in. 12½ in. 145/0
33 22 12½ 135/0
No. S A 1505. Shallow Imperial or Cabin Trunk, as above,
No. 2 quality.
Length. Width. Depth. Price. Length. Width. Depth. Price.
27 in. 20 in. 12½ in. 79/0 33 in. 22 in. 12½ in. 95/0
30 21 12½ 86/0 36 23 12½ 104/0
HARRODS Ltd.
No. S A 1506. The Imperial Trunk, made of best butt leather,
turn-over edge, extra large solid leather-capped corners, steel
banded, and hand-sewn throughout, fitted with tray, strong
lever lock and 2 keys extra stout luggage straps all round.
Length. Width. Depth. Price. Length. Width. Depth. Price.
30 in. 19 in. 16 in. 130/0 36 in. 20½ in. 18 in. 152/6
33 19½ 17 139/6
No. S A 1507. The Imperial Trunk, as above, No. 2 quality.
Length. Width. Depth. Price. Length. Width. Depth. Price.
30 in. 19 in. 16 in. 86/0 36 in. 20½ in. 18 in. 104/0
33 19½ 17 95/0
No. S A 1508. P. & O. Cabin Trunk, made of extra stout
portmanteau hide welted edge, 4 bottom capped corners, lever
lock, 2 keys, straps all round, with tray.
36 in. long and 21 in. wide × 14 in. deep, 97/6

For Illustrations and Prices of Covers for


above Trunks see page 530.
[520]
HARRODS
TWILL CANVAS CABIN TRUNK.
No. S A 1510. Special quality, Drop-back Lid, best Lever
Lock and 2 Keys, Hand-sewn, best make and finish.
Length. Width. Depth. Price.
27 in. 18 in. 12 in. 42/0
30 ,, 19 ,, 12 ,, 46/9
33 ,, 19 ,, 12 ,, 51/9
36 ,, 20 ,, 12 ,, 56/9
THE “UNIVERSAL” CABIN TRUNK.
No. S A 1511. Black Japanned Canvas, Brown Leather
Corners, and fitted with Tray.
Length. Width. Depth. Price.
27 in. 18 in. 12 in. 30/0
30 ,, 18 ,, 12 ,, 33/6
33 ,, 19 ,, 12 ,, 37/0
36 ,, 20 ,, 12 ,, 40/0
HARRODS
P. & O. CABIN TRUNK.
No. S A 1512. Extra large size, best Twill Canvas, Hand-sewn
Leather Corners, Lever Lock and 2 Keys, Straps over Top. All
Black Leather Fittings. 36 in. long × 24 in. wide × 14 in. deep,
60/0
Troopship Cabin Trunk, Regulation Size, 30 × 24 × 12 in., Twill
Canvas, Leather Corners, Straps over Top, 47/6
HARRODS
P & O. CABIN TRUNK.
No. S A 1513. Best Twill Canvas, Leather Corners, Best
Lever Lock and 2 Keys, Straps over Top.
36 × 21 × 14 in. ... ... 56/9
No. S A 1514.
P. & O. CABIN TRUNK.
Best Twill Canvas, Lever Lock, Straps over Top. Black
Leather Fittings. 36 in. long × 21 in. wide × 14 in. deep
47/6. As illustration.
HARRODS
CANVAS IMPERIAL TRUNK.
No. S A 1515. Covered best Flax Canvas on “Flaxite”
Fibre. Drop-back Lid, Leather Corners, Lever Lock with 2
Keys, Hand-sewn throughout.
Length. Width. Depth. Price.
27 in. 19 in. 15 in. 44/0
30 ,, 19 ,, 15 ,, 49/6
33 ,, 20 ,, 16 ,, 54/0
36 ,, 20 ,, 17 ,, 59/6
IMPERIAL TRUNK.
No. S A 1516. “Flaxite” Fibre, covered Green Willesden
Waterproof Canvas, fitted with Steel Frame, Tray, and
Brass Front Clips, 2 Straps, and Lever Locks.
Length. Width. Depth. Price.
27 in. 18 in. 15 in. 37/6
30 ,, 19 ,, 16 ,, 40/0
33 ,, 20 ,, 17 ,, 45/0
36 ,, 21 ,, 18 ,, 49/6
[521]

BEST QUALITY ONLY KEPT IN STOCK. FITTED WITH


PATENT STEEL FRAME.
THE ORIGINAL MAKE OF “FLAXITE” FIBRE TRUNKS. These
Trunks are all London made, and were first known as
“Compressed Fibre,” but owing to numerous cheap
imitations now being sold, customers are advised when
purchasing to ask for the “ORIGINAL FLAXITE FIBRE.”
HARRODS
No. S A 1517. Cabin or Flat Imperial Trunk. Good quality
Portmanteau Hide, stiffened on “Flaxite” Fibre, fitted with Tray,
Leather Straps, Brass Clips, and Solid Leather Moulded Corners,
and fitted with the new Improved Steel Frame.
Length. Width. Depth. Price. Length. Width. Depth. Price.
27 in. 18 in. 12 in. 57/6 33 in. 20 in. 12 in. 68/6
30 in. 19 in. 12 in. 63/0 36 in. 21 in. 12 in. 75/0
No. S A 1519. Cabin or Flat Imperial Trunk. Green
Willesden or Brown Japanned Waterproof Canvas stiffened on
“Flaxite” Fibre, fitted with Tray, Leather Straps, Brass Clips and
Solid Leather Moulded Corners. This Trunk is also fitted with
the new Improved Steel Frame, as illustration.
Length. Width. Depth. Price. Length. Width. Depth. Price.
27 in. 18 in. 14 in. 42/0 33 in. 20 in. 14 in. 51/6
30 in. 19 in. 14 in. 46/9 36 in. 21 in. 14 in. 56/9
No. S A 1521. Flat Top Imperial Trunk. Green Willesden or
Brown Japanned Waterproof Canvas, stiffened on “Flaxite”
Fibre, fitted with Tray and Riveted Bentwood Battens, 2 good
quality strong Brass Locks and Solid Moulded Leather Riveted
Corners. Size 33 in. has 2 Battens and 1 Lock, other sizes as
illustrated.
Length. Width. Depth. Price. Length. Width. Depth. Price.
33 in. 20 in. 17 in. 58/6 39 in. 21 in. 20 in. 72/6
36 in. 20 in. 18 in. 64/6 42 in. 22 in. 21 in. 82/0
No S A 1518. Cabin or Flat Imperial Trunk. Green Willesden
or Brown Japanned Waterproof Canvas stiffened on “Flaxite”
Fibre, fitted with Riveted Bentwood Battens, Tray, Solid
Moulded Leather Corners and the new Improved Steel Frame.
Length. Width. Depth. Price. Length. Width. Depth. Price.
30 in. 19 in. 13 in. 54/0 36 in. 21 in. 13 in. 63/0
33 in. 20 in. 13 in. 57/6
HARROD’S Ltd.
No. S A 1520. Ball Dress Trunk. Green Willesden or Brown
Japanned Waterproof Canvas stiffened on “Flaxite” Fibre, fitted
with Riveted Bentwood Battens, Solid Moulded Leather
Corners, new Improved Steel Frame and Tray as illustration.
Length. Width. Depth. Price. Length. Width. Depth. Price.
36 in. 20 in. 17½ in. 64/0 42 in. 22½ in. 19½ in. 75/0
39 in. 21 in. 18½ in. 70/0
HARRODS
No. S A 1522. Ladies’ Oval Top Dress Trunk. Green
Willesden or Brown Japanned Waterproof Canvas stiffened on
“Flaxite” Fibre, fitted with Riveted Bentwood Battens, Solid
Moulded Leather Corners, new Improved Steel Frame and Tray.
Length. Width. Depth. Price. Length. Width. Depth. Price.
33 in. 19½ in. 22 in. 58/6 39 in. 21 in. 24 in. 72/0
36 in. 20 in. 23 in. 66/0

For Illustrations and Prices of Covers for above


Trunks see page 530.
[522]
HARRODS Ltd.
No. S A 1523. SUIT OR SHORT VISIT CASE.
Made in Green Willesden or Brown Japanned Canvas, stiffened
on “Flaxite” Fibre, 8 Solid Leather Moulded Corners, Lined
Holland, fitted with 2 Slide Nozzle Locks, as Illustration.
Length. Width. Depth. Price. Length. Width. Depth. Price.
20 in. 14½ in. 6 in. 18/9 24 in. 15½ in. 7 in. 22/9
22 in. 15 in. 6½ in. 20/9 26 in. 16 in. 7½ in. 25/6
No. S A 1524. Ditto, covered Superior Case Hide, made as
above.
20 in. 14½ in. 6 in. 32/6 24 in. 15½ in. 7 in. 38/6
22 in. 15 in. 6½ in. 35/6 26 in. 16 in. 7½ in. 42/0
HARRODS
No. S A 1526. CABIN OR FLAT IMPERIAL TRUNK.
Extra Strong, covered Superior Quality Green Willesden Canvas,
stiffened on “Flaxite” Fibre, large Solid Leather Moulded
Corners, Superior Quality long Straps all round, large Lock
Flaps, good Lever Locks and Centre Clip, fitted with Tray and
new improved Steel Frame.
Length. Width. Depth. Price. Length. Width. Depth. Price.
27 in. 18 in. 14 in. 68/6 36 in. 21 in. 14 in. 84/0
30 in. 19 in. 14 in. 72/6 39 in. 22 in. 14 in. 92/6
33 in. 20 in. 14 in. 77/6
HARRODS
No. S A 1529. EXTRA WIDE P. & O. CABIN TRUNK.
Good Quality Portmanteau Hide, stiffened on “Flaxite” Fibre,
fitted with Tray, Leather Straps, Brass Clips, Solid Leather
Moulded Corners, and new improved Steel Frame.
Size ... ... 36 in. long, 24 in. wide, 13 in. deep.
Price 92/6
HARRODS Ltd.
No. S A 1525. SUIT OR SHORT VISIT CASE. Extra Deep.
Made in Green Willesden or Brown Japanned Canvas, stiffened
on “Flaxite” Fibre, 8 Solid Leather Moulded Corners, Lined
Holland, fitted with 2 Slide Nozzle Locks, as Illustration.
Length. Width. Depth. Price. Length. Width. Depth. Price.
20 in. 14½ in. 7½ in. 20/6 24 in. 15½ in. 8½ in. 24/6
22 in. 15 in. 8 in. 22/6 26 in. 16 in. 9 in. 26/9
HARRODS Ltd.
No. S A 1527. EXTRA WIDE SUIT CASE.
Made in Green Willesden or Brown Japanned Canvas, stiffened
on “Flaxite” Fibre, 8 Solid Leather Moulded Corners, Lined
Holland, 2 Slide Nozzle Locks and Centre Clip.
Length. Width. Depth. Price.
27 in. 16½ in. 8½ in. 31/6
30 in. 17½ in. 9½ in. 35/6
No. S A 1528. Ditto, as above, covered Superior Quality Case
Hide.
27 in. 16½ in. 8½ in. 53/6
30 in. 17½ in. 9½ in. 58/6
HARRODS
No. S A 1530. CABIN OR FLAT IMPERIAL TRUNK.
Good Quality Portmanteau Hide, stiffened on “Flaxite” Fibre,
fitted with Tray, Leather Straps, Brass Clips, Solid Leather
Moulded Corners and new improved Steel Frame.
Length. Width. Depth. Price. Length. Width. Depth. Price.
27 in. 18 in. 12 in. 57/6 33 in. 20 in. 12 in. 68/6
30 in. 19 in. 12 in. 63/0 36 in. 21 in. 12 in. 75/0
Also made extra deep. Size: 36 in. long, 21 in. wide, 13 in. deep.
84/0
For Illustrations and Prices of Covers for above
Trunks, see page 530.
[523]
HARRODS Ltd.
No. S A 1531. LADIES’ HAT BOX.
Very strong make; made in Brown or Black
Japanned Flax Canvas, stiffened on Flaxite fibre,
lined Embossed Sateen, fitted with Patent
removable Wire Fittings to affix Hats or Bonnets
Size. Price.
20 in. Long × 16 in. Wide × 16 in. Deep ... 35/6
to take 6 Hats.
22 in. Long × 18 in. Wide × 18 in. Deep ... 42/0
LADIES’ HAT BOX.
No. S A 1535. Black Japanned Canvas,
Welted Leather, fitted with 6 Wire
Cones, 20 in. × 16 in. × 16 in. ... 34/0
,, S A 1536. Black Japanned Canvas,
Welted Leather, fitted with 6 Wire
Cones, 22 in. × 18 in. × 18 in. ... 36/0
,, S A 1537. Green Willesden Canvas,
Welted Leather, best quality, 6 Wire
Cones, 20 in. × 16 in. × 16 in. ... 40/0
,, S A 1538. Green Willesden Canvas,
Welted Leather, best quality, 6 Wire
Cones, 22 in. × 18 in. × 18 in. 45/0
,, S A 1539. Black Japanned Canvas,
extra strong make, 6 Wire Cones,
20 in. × 16 in. × 16 in. ... ... 38/9
,, S A 1540. Black Japanned Canvas,
extra strong make, 6 Wire Cones,
22 in × 18 in × 18 in 43/6
22 in. × 18 in. × 18 in. ... ... 43/6

HARRODS Ltd.
No. S A 1532. LADIES’ HAT BOX.
Superior quality, covered extra strong Green or
Brown Canvas, large Leather Corners, Lever Lock
and two end clips.
Size. Price.
24 in. Long × 20 in. Wide × 20 in. Deep, 60/0
Ditto as Illustration, with Long Strap all round
and End Handles.
Size. Price.
26 in. Long × 22 in. Wide × 22 in. Deep, 70/0
28 in. Long × 24 in. Wide × 24 in. Deep, 77/6
HARRODS Ltd.
No. S A 1541. LADIES’ HAT BOX, Patent Compressed
Cane, fitted with 6 Patent movable Gauze Wire Fittings.
Size 20 in. × 18 in. × 18 in., 50/9
,, 22 in. × 18 in. × 18 in., 53/6
,, 22 in. × 20 in. × 20 in., 58/9
,, 24 in. × 22 in. × 22 in., 70/6
,, 26 in. × 24 in. × 24 in., 81/6
HARRODS Ltd.
No. S A 1533. LADIES’ HAT BOX.
Made in Green Willesden, Brown or Black
Canvas, stiffened on “Flaxite” fibre, fitted with
Patent Removable Wire Fittings to affix Hats or
Bonnets.
Size. Price.
20 in. Long × 16 in. Wide × 16 in. Deep
to take 6 Hats. 27/6
22 in. Long × 18 in. Wide × 18 in. Deep 34/6
24 in. Long × 20 in. Wide × 20 in. Deep 42/0
26 in. Long × 22 in. Wide × 22 in. Deep 47/6
No. S A 1534. As above, but stronger make, and
large Leather Corners.
Size. Price.
24 in. Long × 20 in. Wide × 20 in. Deep 47/6
26 in. Long × 22 in. Wide × 22 in. Deep 55/0
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!

ebookname.com

You might also like