100% found this document useful (7 votes)
26 views

(Ebook) Web Application Design and Implementation: Apache 2, PHP5, MySQL, JavaScript, and Linux UNIX (Quantitative Software Engineering Series) by Steven A. Gabarró ISBN 9780471773917, 0471773913instant download

The document is an overview of various ebooks available for download, including titles on web application design, cooking, mathematics, SAT preparation, and history. It features a specific focus on 'Web Application Design and Implementation' by Steven A. Gabarró, which covers technologies like Apache, PHP, MySQL, and JavaScript. Additionally, it provides links to other educational resources and emphasizes the importance of Wiley's contributions to knowledge over the years.

Uploaded by

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

(Ebook) Web Application Design and Implementation: Apache 2, PHP5, MySQL, JavaScript, and Linux UNIX (Quantitative Software Engineering Series) by Steven A. Gabarró ISBN 9780471773917, 0471773913instant download

The document is an overview of various ebooks available for download, including titles on web application design, cooking, mathematics, SAT preparation, and history. It features a specific focus on 'Web Application Design and Implementation' by Steven A. Gabarró, which covers technologies like Apache, PHP, MySQL, and JavaScript. Additionally, it provides links to other educational resources and emphasizes the importance of Wiley's contributions to knowledge over the years.

Uploaded by

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

(Ebook) Web Application Design and

Implementation: Apache 2, PHP5, MySQL,


JavaScript, and Linux UNIX (Quantitative
Software Engineering Series) by Steven A.
Gabarró ISBN 9780471773917, 0471773913 download
https://ebooknice.com/product/web-application-design-and-
implementation-apache-2-php5-mysql-javascript-and-linux-unix-
quantitative-software-engineering-series-2495740

Explore and download more ebooks at ebooknice.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebooknice.com
to discover even more!

(Ebook) Biota Grow 2C gather 2C cook by Loucas, Jason; Viles,


James ISBN 9781459699816, 9781743365571, 9781925268492,
1459699815, 1743365578, 1925268497

https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374

(Ebook) Matematik 5000+ Kurs 2c Lärobok by Lena Alfredsson, Hans


Heikne, Sanna Bodemyr ISBN 9789127456600, 9127456609

https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312

(Ebook) SAT II Success MATH 1C and 2C 2002 (Peterson's SAT II


Success) by Peterson's ISBN 9780768906677, 0768906679

https://ebooknice.com/product/sat-ii-success-math-1c-and-2c-2002-peterson-
s-sat-ii-success-1722018

(Ebook) Master SAT II Math 1c and 2c 4th ed (Arco Master the SAT
Subject Test: Math Levels 1 & 2) by Arco ISBN 9780768923049,
0768923042

https://ebooknice.com/product/master-sat-ii-math-1c-and-2c-4th-ed-arco-
master-the-sat-subject-test-math-levels-1-2-2326094
(Ebook) Cambridge IGCSE and O Level History Workbook 2C - Depth
Study: the United States, 1919-41 2nd Edition by Benjamin
Harrison ISBN 9781398375147, 9781398375048, 1398375144,
1398375047
https://ebooknice.com/product/cambridge-igcse-and-o-level-history-
workbook-2c-depth-study-the-united-states-1919-41-2nd-edition-53538044

(Ebook) Professional LAMP : Linux, Apache, MySQL and PHP Web


Development by Jason Gerner ISBN 9780471790884, 9780764597237,
0471790885, 076459723X

https://ebooknice.com/product/professional-lamp-linux-apache-mysql-and-php-
web-development-2001692

(Ebook) The Apache Modules Book: Application Development with


Apache (Prentice Hall Open Source Software Development Series)
by Nick Kew ISBN 9780132409674, 0132409674

https://ebooknice.com/product/the-apache-modules-book-application-
development-with-apache-prentice-hall-open-source-software-development-
series-978224

(Ebook) JavaScript for Modern Web Development: Building a Web


Application Using HTML, CSS, and Javascript by ALOK RANJAN,
ABHILASHA SINHA, RANJIT BATTEWAD

https://ebooknice.com/product/javascript-for-modern-web-development-
building-a-web-application-using-html-css-and-javascript-49177184

(Ebook) Setting Up LAMP: Getting Linux, Apache, MySQL, and PHP


Working Together by Eric Filson ISBN 9780782143379, 0782143377

https://ebooknice.com/product/setting-up-lamp-getting-linux-apache-mysql-
and-php-working-together-2022622
Web Application Design
and Implementation
•• e T ..

~I t 807 ~
=1~WlLEY:
:12007 ;
-;
• '
. l e . . . T ..... I ...
.
r

THE WILEY BICENTENNIAL-KNOWLEDGE FOR GENERATIONS

<S achgeneration has its unique needsand aspirations. When Charles Wiley first
opened his small printing shop in lower Manhattan in 1807, it was a generation
of boundless potential searching for an identity. And we were there, helping to
define a new American literary tradition. Over half a century later, in the midst
of the Second Industrial Revolution, it was a generationfocusedon building the
future. Once again, we werethere,supplyingthe criticalscientific,technical,and
engineering knowledge that helped frame the' world. Throughout the 20th
Century, and into the :new millennium, nations began to reach out beyond their
own borders and a new international community was born. Wiley was there,
expanding its operationsaround the world to enable a global exchangeof ideas,
opinions, and know-how.

For 200 years, Wiley has been an integral part of each generation's journey,
enablingthe flowof information and understanding necessaryto meet their needs
and fulfill their aspirations. Today, bold new technologies are changing the way
we live and learn. Wiley will be there, providing you the must-have knowledge
you need to imaginenew worlds, new possibilities, and new opportunities.

Generations come and go, but you can always count on Wiley to provide you the
knowledge you need,when and whereyou need it!

Lu~';'~~.~ ~~u~
WILLIAM .... PESCE PETER BaaTH WILEY
PRESIDENT AND CHIEF' EXECUTIVE DFFlCER CHAIRMAN OF" THE BOARD
Web Application Design
and Implementation
Apache 2, PHP5, MySQL,
JavaScript, and Linux/UNIX

Steven A. Gabarro
Stevens Institute of Technology
Hoboken, New Jersey

IEEE
~computer
SOciety
60TH anniversary

"'
BICENTENNIAL

it807~
.
=~WILEY=z
.-
z
:2007~
,.~
BICENTENNIAL

WILEY-INTERSCIENCE
A John Wiley & Sons, Inc., Publication
Copyright © 2007 by John Wiley & Sons, Inc. All rights reserved.

Published by John Wiley & Sons, Inc., Hoboken, New Jersey.


Published simultaneously in Canada.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted in


any form or by any means, electronic, mechanical, photocopying, recording, scanning, or
otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright
Act, without either the prior written permission of the Publisher, or authorization through
payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222
Rosewood Drive, Danvers, M,A 01923, (978) 750-8400, fax (978) 750-4470, or on the web at
www.copyright.com. Requests to the Publisher for permission should be addressed to the
Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030,
(201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permission.

Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their
best efforts in preparing this book, they make no representations or warranties with respect
to the accuracy or completeness of the contents of this book and specifically disclaim any
implied warranties of merchantability or fitness for a particular purpose. No warranty may be
created or extended by sales representatives or written sales materials. The advice and
strategies contained herein may not be suitable for your situation. You should consult with a
professional where appropriate. Neither the publisher nor author shall be liable for any loss
of profit or any other commercial damages, including but not limited to special, incidental,
consequential, or other damages.

For general information on our other products and services or for technical support, please
contact our Customer Care Department within the United States at (800) 762-2974, outside
the United States at (317) 572·-3993 or fax (317) 572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears
in print may not be available in electronic formats. For more information about Wiley
products, visit our web site at www.wiley.com.

Library of Congress Cataloging-in-Publication Data:


Gabarr6, Steven A., 1979-
Web application design and implementation: Apache 2, PHP5, MySQL,
JavaScript, and Linux/Unix / by Steven A. Gabarro,
p. em.
Includes index.
ISBN-13: 978-0-471-77391-7 (cloth)
ISBN-I0: 0-471-77391-3 (cloth)
1. Web site development. 2. Web sites-Design. 3. Application
software-Development. I. Title.
TK5105.8883.G33 2007
006.7-dc22
2006014999
Contents

Preface xiii
About the Author / xiii
Before We Get Started I xiii
Who Should Read This Book? I xiv
About the Examples I xiv
How to Read This Book I xiv

Acknowledgments xv

Introduction: Web Application Recipe 1


Overview I I
Procedure I I
Step I-Understanding the Problem and Finding the
Solution / 1
Step 2-Designing the Database / 2
Step 3-Major Functionalities / 2
Step 4-Backside / 2
Step 5-Irnprovements on Functionality I 2
Step 6-Irnprovements on Looks / 3
Step 7-Thorough Testing, Hacking Attempts / 3
Step 8-Presentation / 3
Step 9-Publication / 3
Step IO-Celebration (and Maintenance) I 4
v
vi CONTENTS

1. Fundamentals 5
The Origins of the Internet I 5
The World Wide Web I 6
The Web Browsers I 7
The Web Servers I 7
TCP/IP BASICS I 8
The Internet Layer I 9
The Transport Layer I 11
The Application Layer I 11
The Toolbox I 12
Browsers I 12
FTP I 13
Email Clients I 14
Programming Tools I 14
Other Useful Tools I 15

2. The Different Approaches of Web Programming 17


Before We Get Started I 17
The Basics-HTMloJ I 17
The Creator-SGML I 18
Other SGML-Based Languages-XML and XSL I 19
The Good Old Java / 20
Something Different-JavaScript / 21
The Savior-PHP I 22
The Rival-ASP.N]~T I 22
The Myth-CGI I 23
Another Big Option-Perl / 23
The Future?-C# / 24
Client-Side versus Server-Side-Which Side to Pick? I 24
My Choices-PHP, MySQL, JavaScript I 25

3. Introduction to HTML 27
What Do You Need to Get Started? I 27
How Does HTML Work? I 28
Syntax Basics / 28
File Structure I 28
Tag Parameters I 30
Basic Text Formatting I 30
External References I 32
Links I 32
Images I 33
CONTENTS vii

Organizing Data / 34
Lists / 35
Tables / 36
Frames / 39
Special Characters I 43

4. Work Environment 45
Introduction I 45
Downloading the Software I 45
Installing the Apache Server I 46
Installation Steps I 46
Checking the Installation I 47
Possible Errors I 47
Configuring Apache I 48
Installing PHP5 I 48
Testing PHP I 50
Installing MySQL I 50
Adding a MySQL User I 51
How Do I Know if MySQL is Running? I 51
Installing PhpMyAdmin I 51
Installing a Bulletin Board: phpBB I 52
Installation Steps I 52
Basic Security Considerations I 54
Conclusion I 55

5. PHP-A Server-Side Scripting Language 57


How Does It Work? I 57
Some "New" Words on PHP / 57
Syntax Generalities I 58
Instructions I 58
Operators I 61
Mathematical Functions I 61
Data Types I 63
Constants I 64
Variables I 65

6. PUP Arrays and Flow of Control 69


Arrays I 69
Basic Arrays / 69
Associative Arrays I 70
viii CONTENTS

Multidimensional Arrays / 71
Array Functions / 74
PHP Program Structure and Flow of Control / 77
Conditions / 77
Loops / 80
Functions / 82

7. Using Files, Folders, and Strings in PUP 85


Using Files / 85
Folder Manipulation / 89
Basic String Manipulation / 90
Changing a String / 90
Finding and Comparing / 93
Formatting Strings / 94
Manipulating HT~f1L Files / 95
PHP Information Functions / 96
Closing Remarks / 97
Writing a Basic File Explorer / 97
Requirements / 97
Hints / 98
Case Study: An Indexer/Searcher-Step 1 / 98
Overview / 98
The Indexer-Step 1 / 99

8. PUPS and Object-Oriented Programming 101


Overview / 101
Classes and Objects / 101
Classes in PHP / 102
Constructors and Destructors / 103
Visibility / 104
The Scope Resolution Operator / 105
The Static Keyword / 105
Class Constants / 106
Class Abstraction / 106
Object Interfaces / 106
Copying and Cloning Objects / 107
Comparing Objects / 108
Type Hinting / 109
Exceptions / 109
Final Words / 110
CONTENTS ix

9. Creating Some Interactivity 111


Overview / 111
Forms / 111
Writing a Form in HTML / 111
GET versus POST / 115
Retrieving the Form Infomation on a PHP Script / 115
Dynamically Creating Forms / 116
Transferring Data Between PHP Scripts / 117
Cookies / 117
Sessions / 120
One Last Useful Function and Design Techniques I 122
Assignments I 123
File Explorer-Step 2 / 123
Case Study: Indexer/Searcher-Step 2 / 124
10. Making Cleaner Code and Output 127
Cleaning Up Your Code / 127
What You Need / 127
How to Use It?-HTML Side I 128
How to Use It?-PHP Side / 128
Cleaning Up Your Output / 131
The CSS File I 132
Useful Tools / 134
Assignment / 135
11. Using Databases 137
Overview I 137
Database Basics I 137
The Entity Relationship Model / 137
More Practical Examples I 138
Typical Sources of Error / 139
Simplifying the Diagrams I 140
Using MySQL I 140
MySQL Syntax / 141
Data Types / 142
MySQL Numeric Data 1)rpes / 142
Date and Time Data Types / 143
String Data Types / 144
MySQL Operators / 144
MySQL Instructions / 145
Using Functions in MySQL / 150
X CONTENTS

12. Using PhpMyAdmin 151


Overview / 151
Creating a Database / 151
Creating Tables / 152
Accessing an Existing Table / 154
Exporting/Importing a Database Structure and Content / 154
Assignment-Final Project / 157

13. Creating Database-Driven Websites with PHP/MySQL 159


Overview / 159
Connecting to Your MySQL Server with PHP / 159
Submitting SQL Queries / 160
Processing the Results of a Query / 161
Example of Login Procedure / 162
Other Useful Functions / 163
Grouping Our Methods in a Class / 164
Indexer/Searcher-Steps 3 and 4 / 168

14. JavaScript-A Client-Side Scripting Language 171


Introduction / 171
JavaScript Syntax / 173
Types of Data and Variables I 173
Operations and Calculations / 173
Arrays / 175
Decisions / 176
Loops / 176
Using Functions / 177
Using Objects / 178
The String Objects / 178
The Math Class / 179
The Array Objects / 181
The Date Objects / 181

15. Programming the Browser 185


Overview / 185
The Window Object / 185
The Location Object / 186
The History Object / 186
The Navigator Object / 186
The Screen Object / 187
The Document Object / 187
CONTENTS xi

Using Events / 191


Timers / 194
Time to Practice! / 195

16. Windows and Frames 197


Frames and JavaScript / 197
Windows and JavaScript / 201
Assignments / 206
One Last Funny Example / 206

17. String Manipulations Revisited 209


Overview / 209
New Basic String Methods / 209
Regular Expressions in JavaScript / 210
Regular Expressions in PHP / 213
The Set of PCRE / 214

18. JavaScript and DHTML 217


Overview / 217
Positioning Elements / 217
Writing Dynamic Menus in DHTML / 222
Your Turn!! / 225

19. Putting It All Together! 227


Overview / 227
Procedure / 227
Step I-Understanding the Problem and Finding the
Solution / 227
Step 2-Designing the Database / 228
Step 3-Main Functionalities / 230
Step 4-Backside / 231
Step 5-Improvements on Functionality / 231
Step 6-Improvements on Looks / 232
Step 7-Thorough Testing, Hacking Attempts / 232
Step 8-Presentation / 233
Step 9-Publication / 233
Step IO-Celebration © (and Maintenance) / 234
What Language to Use? / 234
xli CONTENTS

Appendix A: Special Characters 237

Appendix B: Installing on UNIX 241


Overview / 241
Installing Apache and PHP / 241
Installing MySQL / 243

Appendix C: Advanced phpBB 247

Appendix D: class.FastTemplate.php 251

Appendix E: File Upload Script 267

Bibliography 269

Index 271
Preface

ABOUT THE AUTHOR

Steven Gabarr6 was born in 1979 and raised in Alicante, Spain. He started
programming early, learning BASIC (Beginner's All-purpose Symbolic
Instruction Code) at age 9. Later on, in high school, he learned Turbo Pascal
and C. At that point it was pretty obvious that he was going to end up as a
computer scientist. He ended up studying for a master's degree in computer
science in the Ecole Pour l'Informatique et les Techniques Avancees, where
he specialized in advanced multimedia and Web technologies, graduating
with honors, finishing third in his class. He went to the United States in
January 2002, enrolling in the Masters of Science in Information Systems at
the Stevens Institute of Technology, in Hoboken, New Jersey. There he quickly
advanced from teaching assistant to full-time instructor. On his appointment
as full-time faculty, he created the first Web programming course at Stevens,
based on his personal experiences. This book is the result of that course, and
is a close reflection of what Steven teaches his students.

BEFORE WE GET STARTED

In my years of programming, I have learned tons of different programming


languages, ranging from Basic to Java, and including C, PHP, JavaScript,
Visual Basic, C++, Assembly 68k, and many others. Because of this variety I
have always been obsessed with utilizing the tools I had available to combine
the best aspects of each programming language.
xiii
xiv PREFACE

With this mentality I decided to create a Web programming course


that would teach the ins and outs of the most commonly used free Web tech-
nologies. I have always supported free software, and as the big UNIX fan that
I am, I had to teach open-source technologies. This book is the result of the
work I did on the course, with added content to take it a step further.

WHO SHOULD READ THIS BOOK?

The way this book is organized, it should be ideal for anyone trying to learn
how to create complete Websites with no previous knowledge of any of the
languages presented. It does require some minimum knowledge of program-
ming in general, as well as object-oriented programming basics to understand
Chapter 8.
It is also a good read for Web designers that know about making pages
look nice, but have no knowledge of how to create dynamic pages built
through a database or anyone who would like to pick up on the art of pro-
gramming pages. Realize: that I have never been a good graphic designer, so
this book will not tell you how to do things like making decisions regarding
the proper colors, fonts, or sizes to use, or other cosmetic details. I will deal
with how to set those features up, but will not tell you how to pick your layout
or color schemes, because I am definitely not good at it. Instead, I will con-
centrate on how to actually program useful pages with loads of functionality.

ABOUT THE EXAMPLES

All the examples have been tested, and if any are not compatible with a spe-
cific browser, this will be stated in the text. You can find all the example files,
as well as an example solution for the mini exercises and the indexer/searcher
case study at ftp://ftp.wiley.com/public/sci_tech_med/web_application. I will
also work on extra examples that I will make available to illustrate other areas
of the book that did not get a full example. I would have included many more
examples, but then you would need two or three volumes this size. Instead, I
will just put everything in a Website for you to download and test. I hope you
enjoy it all!

HOW TO READ THIS BOOK

The book is organized to be read front to back, but you may skip chapters as you
see fit, or use the book as a reference. The Introduction is a summary of Chapter
19 and should be used by people already experienced in Web development. It is
basically meant as a guide to using this book as a "Web programming cook-
book." You may read this Introduction for brief guidelines or go straight to
Chapter 19 if you need an in-depth explanation with a practical example.
Acknowledgments

I'd like to express great thanks to my family first for always being there for
me. I wouldn't be where I am without them, and I'll never manage to thank
them enough for that. To my very close (and special, a.k.a. N.B.) friends, I
thank you for your support and patience over the years; it is not easy putting
up with me for so long, but you have always given me some of the best times
I could hope for. Quick "howdy" to my online friends at COTW and BF2C
for helping me steam off when I had too much work and needed a break.
Thanks to Larry Bernstein for allowing me the opportunity to write this
book, and of course thanks to the people at John Wiley & Sons for getting
my first book published even though I'm still "a kid." Special thanks to
Whitney, Paul and Melissa for all of their help and patience; and to Ben for
the cover image. ©

xv
Introduction

Web Application Recipe

OVERVIEW

You might be wondering why you are reading an "Introduction" chapter and
why this chapter is called "Web Application Recipe." Well, this chapter is
your quick guide to professional Web application design and implementation.
It is in essence a summary of the last chapter of the book (Chapter 19),
created mainly for people with enough experience in Web programming to
skip some of the chapters presented. This chapter will give you the rundown
of the major steps in the lifecycle of a Web project, and will refer to the chap-
ters where you might find more in-depth information on the topics covered.
I call it the "recipe" because it gives you the general layout of what needs to
be done, before getting into the specific details that each individual chapter
will cover. For a more in-depth guideline with a practical example, be sure to
read Chapter 19.

PROCEDURE

Step 1-Understanding the Problem and Finding the Solution


The first step in Web development (and any type of project, to be honest) is
to understand what the problem is, as well as what input will be used and

Web Application Design and Implementation: Apache 2, PHP5, MySQL, JavtiScript, and
Linux/UNIX, by Steven A. Gabarr6
Copyright © 2007 by John Wiley & Sons, Inc.

1
2 WEB APPLICATION RECIPE

what output should be produced. This phase is usually done in meetings


between the project manager and the project sponsor (the person paying for
the project). This is a crucial phase as it defines the scope of the project, such
as the features that need to be implemented, and the feel that the page should
have. The main area of discussion in this step is what the project will do,
without concentrating on the "how."

Step 2-Designing the Database


When creating web applications, chances are your program will need to store
data; hence the use of databases. Many developers create the database as they
implement the program, but this can cause serious troubles as they realize
well into the project that: the initial design of the database is flawed and all
the work needs to be redone. This is why you should always start by designing
the database, keeping in mind what the project needs are. Chapters 11 and
12 will show you how to design and create a database. In a database-driven
project the database is the heart of the project.

Step 3-Major Functionalities


Once the database is created, it is time to program the major functionalities
of your application. Many programmers tend to spend a lot of time making
sure that the pages they create look good, without worrying about whether
they actually do something. Webpage appearance is obviously important, but
you will get more out of an ugly functional Web application than with a pretty-
looking useless page. Most of the work needed in this phase will require
accessing the database. To find out more about how to do so, check Chapter
13. This step is basically like programming the brain of your application,
ensuring that its core runs perfectly well.

Step 4-Backside
Once the core of the project is up and running, you need to implement the
back end of the project. This is the section of the project that will be used by
administrators to manage the Website after it has been published, and it is a
good idea to have it up and running before the regular users start meddling
with the Web application. If you need some information on writing scripts in
PHP, check out Chapters 5-9.

Step 5-lmprovements on Functionality


This is the phase where you start having fun with the project and improve
its functionalities. It is the opportunity to begin improving the client-side
functionalities by adding some JavaScript scripts to your pages, such as form
PROCEDURE 3

verifications. Check Chapters 14-18 for more information on how to program


in JavaScript. Just make sure that the improvements you decide to work on
are within the scope of the project, to avoid what is known as "scope creep"
(see Chapter 19).

Step 6-lmprovements on Looks


Once your project is working, you may start working on the esthetics. Start
by using style sheets (Chapter 10), and do not hesitate to ask your favorite
Web designer for help. In case you wonder about the difference between
a web developer and a Web designer, in essence, a Web designer takes
care of the looks (appearance) of Websites and Web developers write the
scripts that make the pages work. This is the step that adds the skin to the
project.

Step 7-Thorough Testing, Hacking Attempts


This is probably one of the most important phases in the project. The goal of
this phase is to ensure that the project is flawless and that you have made it
hackerproof. The best asset in this phase is imagination and a bit of paranoia.
Never assume that your users will be friendly, using your application for what
it was meant to be. The true secret to a hacker-safe program is to think like
a hacker. Try to think of any security hole that you might not have fixed yet
and fix it! This step is the equivalent of getting some immunizations for your
project. The more time you spend here, the less time you will spend dealing
with attacks.

Step 8-Presentation
Assuming that you are not writing the application for yourself and there is
money involved, you will need to present your final project to your project
sponsor. The key here is to be relaxed and be confident that your project
is rock-solid. If you follow the guidelines in this book, this should not be
a problem. If you are presenting to a nontechnical person, start by showing
the general features of the project, getting into details only when asked to
do so. If you are presenting to a fellow developer, go straight to the
functionalities.

Step 9-Publication
When the project has been approved, it is time to release it. Place it in your
desired host and make sure that everything is set up properly so that users
worldwide can access it. This phase should be fairly fast.
4 WEB APPLICATION RECIPE

Step 10-Celebration (and Maintenance)


Once the project is published, this is your chance for a small break. Enjoy
your favorite brew, have a good night's sleep, and get back to work! Once a
project is published, you need to maintain it, updating the database as needed
or fixing bugs that users might have found.
1
Fundamentals

THE ORIGINS OF THE INTERNET

Not that long ago, in a galaxy pretty close by, men and women used to live
without practical means of communication. Paper was the main medium used
for information sharing and horses the main carrier for that medium. But
science kept working, and in 1831 Joseph Henry invented the first electric
telegraph. Four years later, Samuel Morse invented the Morse code, and
worked on the very first long-distance electric telegraph line, which he fin-
ished in 1843. A bigger leap in communication progress was made by Alex-
ander Graham Bell, who patented the electric telephone in 1876.Long-distance
communication was finally a reality, but still archaic compared to what was
to be achieved. With the arrival of computers in the midtwentieth century,
people realized the potential of storing and processing data in those amazing
new machines. Furthermore, the United States and the Soviet Union were
deep in the Cold War, and the fear of a possible strike was constantly present
in the military's mind. One of the main concerns was the possibility that all
communication between remote locations could be interrupted by an attack.
Telephone and telegraph lines were out in the open, and could be easily
damaged, so the National Security Agency (NSA) thought of a way to
preserve communications. Emulating the principles of telephone commu-
nication, in the 1960s, the NSA thought of connecting computers through

Web Application Design and Implementation: Apache 2, PHP5, MySQL, JavaScript, and
Linux/UNIX, by Steven A. Gabarr6
Copyright © 2007 by John Wiley & Sons, Inc.

5
Random documents with unrelated
content Scribd suggests to you:
contained not a Constitution, as many so rashly took for granted, but
the promise of Constitutional Government.
I stayed at the Hôtel Dresden, which when I arrived was still
without lamps or light of any kind, and the lift was not working.
The first thing which brought home to me that Russia had been
granted the promise of a Constitution was this. I went to the big
Russian baths. Somebody came in and asked for some soap, upon
which the barber’s assistant, aged about ten, said, with the air of a
Hampden: “Give the citizen some soap” (“Daite grazhdaninu
mwilo”). Coming out of the baths I found the streets decorated with
flags and everybody in a state of frantic and effervescing
enthusiasm. I went to one of the big restaurants. There old men
were embracing each other and drinking the first glass of vodka to
free Russia. After luncheon I went out into the theatre square. There
is a fountain in it, which forms an excellent public platform. An
orator mounted it and addressed the crowd. He began to read the
Emperor’s Manifesto. Then he said: “We are all too much used to the
rascality of the Autocracy to believe this; down with the Autocracy!”
The crowd, infuriated—they were evidently expecting an enthusiastic
eulogy—cried: “Down with you!” But instead of attacking the speaker
who had aroused their indignation they ran away from him! It was a
curious sight. The spectators on the pavement were seized with
panic and ran too. The orator, seeing his speech had missed fire,
changed his tone and said: “You have misunderstood me.” But what
he had said was perfectly clear. This speaker was an ordinary Hyde
Park orator. University professors spoke from the same platform.
Later in the afternoon a procession of students arrived opposite my
hotel with red flags and collected outside the Governor-General’s
house. The Governor-General appeared on the balcony and made a
speech, in which he said that now there were no police he hoped
that they would be able to keep order themselves. He asked them
also to exchange the red flag, which was hanging on the lamp-post
opposite the Palace, for the national flag. One little student climbed
like a monkey up the lamp-post and hung a national flag there, but
did not remove the red flag. Then the Governor asked them to sing
the National Anthem, which they did; and as they went away they
sang the “Marseillaise”:

“On peut très bien jouer ces deux airs à la fois


Et cela fait un air qui fait sauver les rois!”

At one moment a Cossack arrived, but an official came out of the


house and told him he was not needed, upon which he went away,
amidst the jeers, cheers, hoots, and whistling of the crowd. On the
whole, the day passed off quietly. There were some tragic incidents:
the death of a woman, the wounding of a student and a workman
who tried to rescue the student from the prisoners’ van, and the
shooting of a veterinary surgeon called Bauman.
While I was standing on the steps of the hotel in the afternoon a
woman rushed up frantically and said the Black Gang were coming.
A student who came from a good family and who was standing by
explained that the Black Gang were roughs who supported the
autocracy. His hand, which was bandaged, had been severely hurt
by a Cossack, who had struck it with his whip, thinking he was about
to make a disturbance. He came up to my room, and from the hotel
window we had a good view of the crowd, which proceeded to

“Attaquer la Marseillaise en la
Sur les cuivres, pendant que la flute soupire,
En mi bémol: ‘Veillons an salut de l’Empire!’”

That night I dined at the Métropole Restaurant, and a strange


scene occurred. At the end of dinner the band played the
“Marseillaise,” and after it the National Anthem. Everybody stood up
except one mild-looking man with spectacles, who went on calmly
eating his dinner; upon which a man who was sitting at the other
end of the room, rather drunk, rushed up to him and began to pull
him about and drag him to his feet. He made a display of passive
resistance, which proved effectual, and when he had finished his
dinner he went away.
The outward aspect of the town during these days was strange.
Moscow was like a besieged city. Many of the shops had great
wooden shutters. Some of the doors were marked with a large red
cross. The distress, I was told, during the strike had been terrible.
There was no light, no gas, no water; all the shops were shut;
provisions and wood were scarce. On the afternoon of 2nd
November I went to see Bauman’s funeral procession, which I
witnessed from many parts of the town. It was an impressive sight.
A hundred thousand men took part in it. The whole of the
Intelligentsia was in the streets or at the windows. The windows and
balconies were crowded with people. Order was perfect. There was
not a hitch nor a scuffle. The men walking in the procession were
students, doctors, workmen—people in various kinds of uniform.
There were ambulances, with doctors dressed in white in them, in
case there should be casualties. The men carried great red banners,
and the coffin was covered with a scarlet pall. As they marched they
sang in a low chant the “Marseillaise,” “Viechni Pamiat,” and the
“Funeral March”[10] of the fighters for freedom. This last tune is
most impressive. From a musician’s point of view it is, I am told, a
bad tune; but then, as Du Maurier said, one should never listen to
musicians on the subject of music any more than one should listen
to wine merchants on the subject of wine. But it is the tune which to
my mind exactly expressed the Russian Revolution, with its dogged
melancholy and invincible passion. It was as befitting as the
“Marseillaise” (which, by the way, the Russians sang in parts and
slowly) was inappropriate. The “Funeral March” had nothing defiant
in it; but it is one of those tunes which, when sung by a multitude,
makes the flesh creep; it is commonplace, if you will; and it
expresses—as if by accident—the commonplaceness of all that is
determined and unflinching, mingled with an accent of weary
pathos. As it grew dark, torches were brought out, lighting up the
red banners and the scarlet coffin of the unknown veterinary
surgeon, who in a second, by a strange freak of chance, had
become a hero, or rather a symbol; an emblem and a banner, and
who was being carried to his last resting-place with a simplicity
which eclipsed the pomp of royal funerals, and to the sound of a low
song of tired but indefatigable sadness, stronger and more
formidable than the pæans which celebrate the triumphs of kings.
The impression left on my mind by this funeral was deep. As I saw
these hundred thousand men march past so quietly, so simply, in
their bourgeois clothes, singing in careless, almost conversational,
fashion, I seemed nevertheless to hear the “tramping of innumerable
armies,” and to feel the breath of the—

“Courage never to submit or yield,


And what is else not to be overcome.”

After Bauman’s funeral, which had passed off without an incident,


at eleven o’clock a number of students and doctors were shot in
front of the University, as they were on their way home, by
Cossacks, who were stationed in the Riding School, opposite the
University. The Cossacks fired without orders. They were incensed,
as many of the troops were, by the display of red flags, and the
processions.
The day after Bauman’s funeral (3rd November) was the
anniversary of the Emperor’s accession, and all the “hooligans” of
the city, who were now called the “Black Gang,” used the
opportunity to make counter demonstrations under the ægis of the
national flag. The students did nothing; they were in no way
aggressive; but the hooligans when they came across students beat
them and in some cases killed them. The police did nothing; they
seemed to have disappeared. These hooligans paraded the town in
small groups, sometimes uniting, blocking the traffic, demanding
money from well-dressed people, wounding students, and making
themselves generally objectionable. When the police were appealed
to they shrugged their shoulders and said: “Liberty.” The hooligans
demanded the release of the man who had killed Bauman. “They
have set free so many of their men,” they said, referring to the
revolutionaries, “we want our man set free.” The town was in a state
of anarchy; anybody could kill anyone else with impunity. In one of
the biggest streets a hooligan came up to a man and asked him for
money; he gave him ten kopecks. “Is that all?” said the hooligan.
“Take that,” and he killed him with a Finnish knife. I was myself
stopped by a band on the Twerskaia and asked politely to contribute
to their fund—the fund of the “Black Gang”—which I did with
considerable alacrity. Students, or those whom they considered to be
students in disguise, were the people they mostly attacked. The
citizens of the town in general soon began to think that this state of
things was intolerable, and vigorous representations were made to
the town Duma that some steps should be taken to put an end to it.
The hooligans broke the windows of the Hôtel Métropole and those
of several shops. Liberty meant to them doing as much damage as
they pleased. This state of things lasted three days, and then it was
stopped—utterly and completely stopped. A notice was published
forbidding all demonstrations in the streets with flags. The police
reappeared, and everything resumed its normal course. These bands
of hooligans were small and easy to deal with. The disorders were
unnecessary. But they did some good in one way: they brought
home to everybody the necessity for order and the maintenance of
order, and the plain fact that removal of the police meant anarchy.
In spite of all this storm and stress the theatres were doing
business as usual, and at the Art Theatre I saw a fine and moving
performance of Tchekov’s Chaika and also of Ibsen’s Ghosts. On 7th
November I went to see a new play by Gorky, which was produced
at the Art Theatre. It was called The Children of the Sun. It was the
second night that it had been performed. M. Stanislavsky, one of the
chief actors of the troupe and the stage manager, gave me his place.
The theatre was crammed. There is a scene in the play where a
doctor, living in a Russian village, and devoting his life to the welfare
of the peasants, is suspected of having caused an outbreak of
cholera. The infuriated peasants pursue the doctor and bash
someone on the head. On the first night this scene reduced a part of
the audience to hysterics. It was too “actual.” People said they saw
enough of their friends killed in the streets without going to the play
for such a sight. On the second night it was said that the offensive
scene had been suppressed. I did not quite understand what had
been eliminated. As I saw the scene it was played as follows: A roar
is heard as of an angry crowd. Then the doctor runs into a house
and hides. The master of the house protests; a peasant flies at his
throat and half strangles him until he is beaten on the head by
another peasant who belongs to the house. The play was full of
interesting moments, and was played with finished perfection. But
Gorky had not Tchekov’s talent of representing on the stage the
uneventful passage of time, the succession of the seemingly
insignificant incidents of people’s everyday lives, chosen with such
skill, depicted with such an instinct for mood and atmosphere that
the result is enthrallingly interesting. Gorky’s plays have the faults
and qualities of his stories. They are unequal, but contain moments
of poignant interest and vividness.
The next night (8th November) I went to St. Petersburg. There I
saw Spring-Rice, Dr. Dillon, and heard Fidelio at the opera. The
young lions in the gallery did not realise that Fidelio is a
revolutionary opera and the complete expression of the “Liberation
movement” in Germany.
A Post Office strike, followed by a strike of other unions, was
going on, and one night while I was at the Opéra Bouffe, where the
Country Girl was being given, the electric light went out. The
performance continued all the same, the actors holding bedroom
candles in their hands, while the auditorium remained in the
dimmest of twilights.
I stayed in St. Petersburg till the 21st of November, when I went
to London. I travelled to the frontier with a Japanese Military Attaché
and a Russian student. We three passengers had a curious
conversation. The Japanese gentleman rarely spoke, but he nodded
civilly, and made a sneezing noise every now and then. The student
talked of English literature with warm enthusiasm. His two favourite
English modern authors were Jerome K. Jerome and Oscar Wilde.
When I showed some surprise at this choice, he said I probably only
thought of Jerome as a comic author. I said that was the case.
“Then,” he said, “you have not read Paul Kelver, which is a
masterpiece, a real human book—a great book.”
When we got out at the frontier the Japanese officer wanted to
fetch something but as there was no porter in sight, was loath to
leave his bag. The student offered to keep watch over it, but the
Japanese would not trust him to do this, and stood by his bag till a
porter arrived. The student was astonished and slightly hurt.
After I had stayed a little over a fortnight in London I went back
first to St. Petersburg, then to Moscow.
I had not been two days in Moscow before there was another
strike. It began on Wednesday, the 20th of December, punctually at
midday. The lift ceased working in the hotel, the electric light was
turned off, and I laid in a large store of books and cigarettes against
coming events. The strike was said to be an answer to the summary
proceedings of the Government and its action in arresting leaders of
the revolutionary committee. Its watchword was to be: “A
Constituent Assembly based upon universal suffrage.” Beyond the
electric light going out, nothing happened on this day. On Thursday,
the 21st, most of the shops began to shut. The man who cleaned
the boots in the hotel made the following remark: “I now understand
that the people exercise great power.” I heard a shot fired
somewhere from the hotel at nine o’clock in the evening. I asked the
hall porter whether the theatres were open. He said they were shut,
and added: “And who would dream of going to the theatre in these
times of stress?”
The next day I drove with Marie Karlovna von Kotz into the
country to a village called Chernaya, about twenty-five versts from
Moscow on the Novgorod road, which before the days of railways
was famous for its highway robberies and assaults on the rich
merchants by the hooligans of that day. We drove in a big wooden
sledge drawn by two horses, the coachman standing up all the
while. We went to visit two old maids, who were peasants and lived
in the village. One of them had got stranded in Moscow, and, owing
to the railway strike, was unable to go back again, and so we took
her with us; otherwise she would have walked home. We started at
10.30 and arrived at 1.30. The road was absolutely still—a thick
carpet of snow, upon which fresh flakes drifting in the fitful gusts of
wind fell gently. Looking at the drifting flakes which seemed to be
tossed about in the air, the first old maid said that a man’s life was
like a snowflake in the wind, and that she had never thought she
would go home with us on her sister’s name-day.
When we arrived at the village we found a meal ready for us,
which, although the fast of Advent was being strictly observed and
the food made with fasting butter, was far from jejune. It consisted
of pies with rice and cabbage inside, and cold fish and tea and jam,
and some vodka for me—the guest. The cottage consisted of one
room and two very small ante-rooms—the walls, floors, and ceilings
of plain deal. Five or six rich ikons hung in the corner of the room,
and a coloured oleograph of Father John of Kronstadt on one of the
walls. A large stove heated the room. Soon some guests arrived to
congratulate old maid No. 2 on her name-day, and after a time the
pope entered, blessed the room, and sat down to tea. We talked of
the strike, and how quiet the country was, and of the hooligans in
the town. “No,” said the pope, with gravity, “we have our own
hooligans.” A little later the village schoolmaster arrived, who looked
about twenty years old, and was a little tiny man with a fresh face
and gold-rimmed spectacles, with his wife, who, like the æsthetic
lady in Gilbert and Sullivan’s Patience, was “massive.” I asked the
pope if I could live unmolested in this village. He said: “Yes; but if
you want to work you won’t be quiet in this house, because your
two hostesses chatter and drink tea all day and all night.” At three
o’clock we thought we had better be starting home; it was getting
dark, the snow was falling heavily. The old maids said we couldn’t
possibly go. We should (1) lose our way; (2) be robbed by tramps;
(3) be massacred by strikers on the railway line; (4) not be allowed
to enter the town; (5) be attacked by hooligans when we reached
the dark streets. We sent for Vassili, the coachman, to consult with
him. “Can you find your way home?” we asked. “Yes, I can,” he said.
“Shall we lose our way?” “We might lose our way—it happens,” he
said slowly—“it happens times and again; but we might not—it often
doesn’t happen.” “Might we be attacked on the way?” “We might—it
happens—they attack; but we might not—sometimes they don’t
attack.” “Are the horses tired?” “Yes, the horses are tired.” “Then we
had better not go.” “The horses can go all right,” he said. Then we
thought we would stay; but Vassili said that his master would curse
him if he stayed unless we “added” something.
So we settled to stay, and the schoolmaster took us to see the
village school, which was clean, roomy, and altogether an excellent
home of learning. Then he took us to a neighbouring factory which
had not struck, and in which he presided over a night class for
working men and women. From here we telephoned to Moscow, and
learned that everything was quiet in the city. I talked to one of the
men in the factory about the strike. “It’s all very well for the young
men,” one of them said; “they are hot-headed and like striking; but
we have to starve for a month. That’s what it means.” Then we went
to the school neighbouring the factory where the night class was
held. There were two rooms—one for men, presided over by the
schoolmaster; and one for women, presided over by his wife. They
had a lesson of two hours in reading, writing, and arithmetic. The
men came to be taught in separate batches, one batch coming one
week, one another. This day there were five men and two boys and
six women. The men were reading a story about a bear—rather a
tedious tale. “Yes, we are reading,” one of them said to me, “and we
understand some of it.” That was, at any rate, consoling. They read
to themselves first, then aloud in turn, standing up, and then they
were asked to tell what they had read in their own words. They read
haltingly, with difficulty grasping familiar words. They related
fluently, except one man, who said he could remember nothing
whatsoever about the doings of the bear. One little boy was doing
with lightning rapidity those kinds of sums which, by giving you too
many data and not enough—a superabundance of detail, leaving out
the all that seems to be imperatively necessary—are to some minds
peculiarly insoluble. The sum in question stated that a factory
consisted of 770 hands—men, women, and children—and that the
men received half as much again as the women, etc. That particular
proportion of wages seems to exist in the arithmetic books of all
countries, to the despair of the non-mathematical, and the little boy
insisted on my following every step of his process of reckoning; but
not even he with the wisdom and sympathy of babes succeeded in
teaching me how to do that kind of sum. He afterwards wrote in a
copybook pages of declensions of Russian nouns and adjectives.
Here I found I could help him, and I saved him some trouble by
dictating them to him; though every now and then we had some
slight doubt and discussion about the genitive plural. In the women’s
class, one girl explained to us, with tears in her eyes, how difficult it
was for her to attend this class. Her fellow-workers laughed at her
for it, and at home they told her that a woman’s place was to be at
work and not to meddle with books. Those who attended this school
showed that they were really anxious to learn, as the effort and self-
sacrifice needed were great.
We stayed till the end of the lesson, and then we went home,
where an excellent supper of eggs, etc., was awaiting us. We found
the two old maids and their first cousin, who told us she was about
to go to law for a legacy of 100,000 roubles which had been left her,
but which was disputed by a more distant relation on the mother’s
side. We talked of lawsuits and politics and miracles, and real and
false faith-healers, till bedtime came. A bed was made for me
alongside of the stove. Made is the right word, for it was literally
built up before my eyes. A sleeping-place was also made for the
coachman on the floor of the small ante-room; then the rest of the
company disappeared to sleep. I say disappeared, because I literally
do not know where in this small interior there was room for them to
sleep. They consisted of the two old maids, their niece and her little
girl, aged three, and another little girl, aged seven. Marie Karlovna
slept in the room, but the rest disappeared, I suppose on the top of
the stove, only it seemed to reach the ceiling; somewhere they
were, for the little girl, excited by the events of the day, sang
snatches of song till a late hour in the night. The next morning, after
I got up, the room was transformed from a bedroom into a dining-
room and aired, breakfast was served, and at ten we started back
again in the snow to Moscow.
On the 23rd we arrived in the town at one o’clock. The streets of
the suburbs seemed to be unusually still. Marie Karlovna said to me:
“How quiet the streets are, but it seems to me an uncanny, evil
quietness.” Marie Karlovna lived in the Lobkovsky Pereulok, and I
had the day before sent my things from the hotel to an apartment in
the adjoining street, the Mwilnikov. When we arrived at the entrance
of these streets, we found them blocked by a crowd and guarded by
police and dragoons. We got through the other end of the street,
and we were told that the night before Fiedler’s School, which was a
large building at the corner of these two streets, had been the scene
of a revolutionary meeting; that the revolutionaries had been
surrounded in this house, had refused to surrender, had thrown a
bomb at an officer and killed him, had been fired at by artillery, and
had surrendered after killing 1 officer and 5 men, with 17 casualties
—15 wounded and 2 killed. All this had happened in my very street
during my absence. An hour later we again heard a noise of guns,
and an armed rising (some of the leaders of which, who were to
have seized the Governor-General of the town and set up a
provisional Government, had been arrested the night before in my
street) had broken out in all parts of the town in spite of the arrests.
A little later I saw a crowd of people on foot and in sledges flying in
panic down the street shouting: “Kazaki!” I heard and saw nothing
else of any interest during the day. There were crowds of people in
the streets till nightfall.
On Sunday, Christmas Eve, I drove to the Hôtel Dresden in the
centre of Moscow to see Mamonov. The aspect of the town was
extraordinary. The streets were full of people—flâneurs who were
either walking about or gathered together in small or large groups at
the street comers. Distant, and sometimes quite near, sounds of
firing were audible, and nobody seemed to care a scrap; they were
everywhere talking, discussing, and laughing. Imagine the difference
between this and the scenes described in Paris during the street
fighting in ’32, ’48, and ’71.
People went about their business just as usual. If there was a
barricade they drove round it. The cabmen never dreamt of not
going anywhere, although one of them said to me that it was most
alarming. Moreover, an insuperable curiosity seemed to lead them to
go and look where things were happening. Several were killed in this
way. On the other hand, at the slightest approach of troops they ran
in panic like hares, although the troops did not do the passers-by
any mischief. Two or three times I was walking in the streets when
dragoons galloped past, and came to no harm. We heard shots all
the time, and met the same groups of people and passed two
barricades. The barricades were mostly not like those of the
Faubourg St. Antoine, but small impediments made of branches and
an overturned sledge; they were put there to annoy and wear out
the troops and not to stand siege. The revolutionaries adopted a
guerilla street warfare. They fired or threw bombs and rapidly
dispersed; they made some attempts to seize the Nikolayev Railway
Station, but in all cases they were repulsed. The attitude of the man
in the street was curious; sometimes he was indignant with the
strikers, sometimes indignant with the Government. If you asked a
person of revolutionary sympathies he told you that sympathy was
entirely with the revolution; if you asked a person of moderate
principles, he told you that the “people” were indignant with the
strikers; but the attitude of the average man in the street seemed to
me one of sceptical indifference in spite of all—in spite of trade
ceasing, houses being fired at, and the hospitals being full to
overflowing of dead and wounded. The fact was that disorders had
lost their first power of creating an impression; they had become an
everyday occurrence.
Here are various remarks I heard. One man, a commissionaire,
asked whether I thought it was right to fire on the revolutionaries. I
hesitated, gathering my thoughts to explain that I thought that they
thoroughly deserved it since they began it, but that the Government
nevertheless had brought it about by their dilatoriness. (This is
exactly what I thought.) Misunderstanding my hesitation, he said:
“Surely you, a foreigner, need not mind saying what you think, and
you know it is wrong.” (This was curious, because these people—
commissionaires, porters, etc.—were often reactionary.) A cabman
said to me: “Who do you think will get the best of it?” I said: “I don’t
know; what do you think?” “Nothing will come of it,” he said. “There
will still be rich people like you and poor people like me; and
whether the Government is in the hands of the chinovniks or the
students is all one and the same.” Another man, a porter, an ex-
soldier, said it was awful. You couldn’t go anywhere or drive
anywhere without risking being killed. Soldiers came back from the
war and were killed in the streets. A bullet came, and then the man
was done for. Another man, a kind of railway employee, said that the
Russians had no stamina; that the Poles would never give in, but the
Russians would directly. Mamonov, who was fond of paradox, said to
me that he hoped all the fanatics would be shot, and that then the
Government would be upset. A policeman was guarding the street
which led to the hotel. I asked if I could pass. “How could I not let a
Barine with whom I am acquainted pass?” he said. Then a baker’s
boy came up with a tray of rolls on his head, also asking to pass—to
go to the hotel. After some discussion the policeman let him go, but
suddenly said: “Or are you a rascal?” Then I asked him what he
thought of it all. He said: “We fire as little as possible. They are
fools.” The wealthier and educated classes were either intensely
sympathetic or violently indignant with the revolutionaries; the lower
classes were sceptically resigned or indifferent—“Things are bad;
nothing will come of it for us.”
At midnight the windows of our house had been shaken by the
firing of guns somewhere near; but on Christmas morning (not the
Russian Christmas) one could get about. I drove down one of the
principal streets, the Kuznetski Most, into another large street, the
Neglinii Proiesd (as if it were down Bond Street into Piccadilly), when
suddenly in a flash all the cabs began to drive fast up the street. My
cabman went on. He was inquisitive. We saw nothing. He shouted to
another cabman, asking him what was the matter. No answer. We
went a little farther down, when along the Neglinii Proiesd we saw a
patrol and guns advancing. “Go back,” shouted one of the soldiers,
waving his rifle—and away we went. Later, I believe there was firing
there. Farther along we met more patrols and ambulances. The
shops were not only shut but boarded up.
Next day I walked to the Nikolayev Station in the afternoon. It was
from there that the trains went to St. Petersburg. The trains were
running then, but how the passengers started I didn’t know, for it
was impossible to get near the station. Cabs were galloping away
from it, and the square in front of it had been cleared by Cossacks. I
think it was attacked that afternoon. I walked into the Riask Station,
which was next door. It was a scene of desolation; empty trains,
stacked-up luggage, third-class passengers encamped in the waiting-
room. There was a perpetual noise of firing. The town was under
martial law. Nobody was allowed to be out of doors after nine
o’clock under penalty of three months’ imprisonment or a 3000
roubles fine. Householders were made responsible for people firing
out of their windows.
On the morning of 27th December there was considerable
movement and traffic in the streets; the small shops and the
tobacconists were open. Firing was still going on. They said a factory
was being attacked. The troops who were supposed to be
disaffected proved loyal. The one way to make them loyal was to
throw bombs at them. The policemen were then armed with rifles
and bayonets. A cabman said to me: “There is an illness abroad—we
are sick; it will pass—but God remains.” I agreed with him.
CHAPTER XVII
RUSSIA: THE BEGINNING OF THE
REVOLUTION

I spent all the winter of 1905-6 at Moscow with occasional visits to


St. Petersburg and to the country. The strikes were over, but it was
in a seething, restless state. Count Witte was Prime Minister. When
he took office after making peace with the Japanese he was idolised
as a hero, but he soon lost his popularity and his prestige. He
satisfied neither the revolutionaries nor the reactionaries, and he
was neither King Log nor King Stork. Elections were held in the
spring for the convening of the Duma, the first Russian Parliament,
but they were not looked upon with confidence and they were
boycotted by the more extreme parties. Russia was swarming with
political parties, but of all these divisions and subdivisions, each with
its programme and its watchword, there were only two which had
any importance: the Constitutional Democrats called Kadets,[11]
which represented the Intelligentsia, and the Labour Party, which
represented the artisans and out of which the Bolsheviks were
ultimately to grow. The peasants stood aloof, and remained
separate.
None of these parties produced either a statesman or remarkable
man. There were any amount of clever men and fine orators in their
ranks, but no man of action.
A man of action did ultimately appear, but in the ranks of the
Government—P. A. Stolypin—and he governed Russia for several
years, till he was murdered.
At Moscow I had two little rooms in the Mwilnikov pereulok on the
ground floor. I was now a regular correspondent to the Morning
Post, and used to send them a letter once a week. Their St.
Petersburg correspondent was Harold Monro, who wrote fiction
under the pseudonym of “Saki.”
The stories that Monro wrote under the name of “Saki” in the
Westminster Gazette and the Morning Post attracted when they
came out in these newspapers, and afterwards when they were
republished, a considerable amount of attention; but because they
were witty, light, and ironical, and sometimes flippant, few people
took “Saki” seriously as an artist. I venture to think he was an artist
of a high order, and had his stories reached the public from Vienna
or Paris, there would have been an artistic boom round his work of a
deafening nature.
As it is, people dismissed him as a funny writer. Funny he was,
both in his books and in his conversation; irresistibly witty and droll
sometimes, sometimes ecstatically silly, so that he made you almost
cry for laughter, but he was more than that—he was a thoughtful
and powerful satirist, an astonishing observer of human nature, with
the power of delineating the pathos and the irony underlying the
relations of human beings in everyday life, with exquisite delicacy
and a strong sureness of touch. A good example of his wit is his
answer when a lady asked him how his book could be got: “Not at
an ironmonger’s.” His satire is seen at its strongest in the fantasy,
When William Came, in which he describes England under German
domination, but the book in which his many gifts and his intuition for
human things are mingled in the finest blend is perhaps The
Unbearable Bassington, which is a masterpiece of character-drawing,
irony, and pathos. And yet in literary circles in London, or at dinner-
parties where you would hear people rave over some turgid piece of
fiction, that because it was sordid was thought to be profound, and
would probably be forgotten in a year’s time, you would never have
heard “Saki” mentioned as an artist to be taken seriously.
“No one will buy,” as the seller of gold-fish remarked at the fair
—“no one will buy the little gold-fish, for men do not recognise the
gifts of Heaven, the magical gifts, when they meet them.”
Nobody sought the suffrages of the literary and artistic circle less
than “Saki.” I think he would have been pleased with genuine
serious recognition, as every artist would be, but the false réclame
and the chatter of coteries bored him to extinction.
In 1914 he showed what he was really made of by enlisting in the
army, and he was killed in the war as a corporal after he had several
times refused a commission.
I spent Easter in Moscow, and this was one of the most impressive
experiences I ever had.
I have spent Easter in various cities—in Rome, Florence, Athens,
and Hildesheim—and although in each of these places the feast has
its own peculiar aspect, yet by far the most impressive and the most
interesting celebration of the Easter festival I have ever witnessed
was that of Moscow. This is not to be wondered at, for Easter is the
most important feast of the year in Russia, the season of festivity
and holiday-making in a greater degree than Christmas or New
Year’s Day. Secondly, Easter, which is kept with equal solemnity all
over Russia, was especially interesting in Moscow, because Moscow
is the stronghold of old traditions and the city of churches. Even
more than Cologne, it is

“Die Stadt die viele hundert


Kapellen und Kirchen hat.”

There is a church almost in every street, and the Kremlin is a citadel


of cathedrals. During Holy Week, towards the end of which the
evidences of the fasting season grow more and more obvious by the
closing of restaurants and the impossibility of buying any wine and
spirits, there were, of course, services every day. During the first
three days of Holy Week there was a curious ceremony to be seen in
the Kremlin, which was held every two years. This was the
preparation of the chrism or holy oil. While it was slowly stirred and
churned in great cauldrons, filling the room with hot fragrance, a
deacon read the Gospel without ceasing (he was relieved at intervals
by others), and this lasted day and night for three days. On Maundy
Thursday the chrism was removed in silver vessels to the Cathedral.
The supply had to last the whole of Russia for two years. I went to
the morning service in the Cathedral of the Assumption on Maundy
Thursday. The church was crowded to suffocation. Everybody stood
up, as there was no room to kneel. The church was lit with countless
small wax tapers. The priests were clothed in white and silver. The
singing of the noble plain chant without any accompaniment ebbed
and flowed in perfect discipline; the bass voices were unequalled in
the world. Every class of the population was represented in the
church. There were no seats, no pews, no precedence nor privilege.
There was a smell of incense and a still stronger smell of poor
people, without which, someone said, a church is not a church. On
Good Friday there was the service of the Holy Shroud, and besides
this a later service in which the Gospel was read out in fourteen
different languages, and finally a service beginning at one o’clock in
the morning and ending at four, to commemorate the Burial of Our
Lord. How the priests endured the strain of these many and
exceedingly long services was a thing to be wondered at; for the
fast, which was kept strictly during all this period, precluded butter,
eggs, and milk, in addition to all the more solid forms of
nourishment, and the services were about six times as long as those
of the Catholic or other churches.
The most solemn service of the year took place at midnight on
Saturday in Easter week. From eight until ten o’clock the town,
which during the day had been crowded with people buying
provisions and presents and Easter eggs, seemed to be asleep and
dead. At about ten people began to stream towards the Kremlin. At
eleven o’clock there was already a dense crowd, many of the people
holding lighted tapers, waiting outside in the square, between the
Cathedral of the Assumption and that of Ivan Veliki. A little before
twelve the cathedrals and palaces on the Kremlin were all lighted up
with ribbons of various coloured lights. Twelve o’clock struck, and
then the bell of Ivan Veliki began to boom: a beautiful, full-voiced,
immense volume of sound—a sound which Clara Schumann said was
the most beautiful she had ever heard. It was answered by other
bells, and a little later all the bells of all the churches in Moscow
were ringing together. Then from the Cathedral came the
procession: first, the singers in crimson and gold; the bearers of the
gilt banners; the Metropolitan, also in stiff vestments of crimson and
gold; and after him the officials in their uniforms. They walked round
the Cathedral to look for the Body of Our Lord, and returned to the
Cathedral to tell the news that He was risen. The guns went off,
rockets were fired, and illuminations were seen across the river,
lighting up the distant cupola of the great Church of the Saviour with
a cloud of fire.
The crowd began to disperse and to pour into the various
churches. I went to the Manège—an enormous riding school, in
which the Ekaterinoslav Regiment had its church. Half the building
looked like a fair. Long tables, twinkling with hundreds of wax
tapers, were loaded with the three articles of food which were eaten
at Easter—a huge cake called kulich; a kind of sweet cream made of
curds and eggs, cream and sugar, called Paskha (Easter); and Easter
eggs, dipped and dyed in many colours. They were waiting to be
blessed. The church itself was a tiny little recess on one side of the
building. There the priests were officiating, and down below in the
centre of the building the whole regiment was drawn up. There were
two services—a service which began at midnight and lasted about
half an hour; and Mass, which followed immediately after it, lasting
till about three in the morning. At the end of the first service, when
the words, “Christ is risen,” were sung, the priest kissed the deacon
three times, and then the members of the congregation kissed each
other, one person saying, “Christ is risen,” and the other answering,
“He is risen, indeed.” The colonel kissed the sergeant; the sergeant
kissed all the men one after another. While this ceremony was
proceeding, I left and went to the Church of the Saviour, where the
first service was not yet over. Here the crowd was so dense that it
was almost impossible to get into the church, although it was
immense. The singing in this church was ineffable. I waited until the
end of the first service, and then I was borne by the crowd to one of
the narrow entrances and hurled through the doorway outside. The
crowd was not rough; they were not jostling one another, but with
cheerful carelessness people dived into it as you dive into a
scrimmage at football, and propelled the unresisting herd towards
the entrance, the result being, of course, that a mass of people got
wedged into the doorway, and the process of getting out took longer
than it need have done; and had there been a panic, nothing could
have prevented people being crushed to death. After this I went to a
friend’s house to break the fast and eat kulich, Paskha, and Easter
eggs, and finally returned home when the dawn was faintly shining
on the dark waters of the Moscow River, whence the ice had only
lately disappeared.
In the morning people came to bring me Easter greetings, and to
give me Easter eggs, and to receive gifts. I was writing in my sitting-
room and I heard a faint mutter in the next room, a small voice
murmuring, Gospodi, Gospodi (“Lord, Lord”). I went to see who it
was, and found it was the policeman, sighing for his tip, not wishing
to disturb, but at the same time anxious to indicate his presence. He
brought me a crimson egg. Then came the doorkeeper and the cook.
The policeman must, I think, have been pleased with his tip,
because policemen kept on coming all the morning, and there were
not more than two who belonged to my street.
In the afternoon I went to a hospital for wounded soldiers to see
them keep Easter, which they did by playing blind man’s buff to the
sound of a flute played by one poor man who was crippled for life.
One of the soldiers gave me as an Easter gift a poem, a curious
human document. It is in two parts called “Past and Present.” This
one is “Present”:
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