PDF Practical Web Development 1st Edition Wellens Paul download
PDF Practical Web Development 1st Edition Wellens Paul download
com
https://ebookmeta.com/product/practical-web-development-1st-
edition-wellens-paul/
OR CLICK HERE
DOWLOAD NOW
https://ebookmeta.com/product/web-service-apis-and-libraries-1st-
edition-jason-paul-michel/
ebookmeta.com
https://ebookmeta.com/product/practical-salesforce-architecture-paul-
mccollum/
ebookmeta.com
https://ebookmeta.com/product/web-development-with-clojure-build-
large-maintainable-web-applications-interactively-3rd-edition-
sotnikov/
ebookmeta.com
https://ebookmeta.com/product/artificial-intelligence-and-applied-
mathematics-in-engineering-problems-1st-edition-d-jude-hemanth/
ebookmeta.com
VCE Philosophy assessment and examination supplement for
VCE units 3 4 Third Edition. Edition Anna Symes Lenny
Robinson Mccarthy
https://ebookmeta.com/product/vce-philosophy-assessment-and-
examination-supplement-for-vce-units-3-4-third-edition-edition-anna-
symes-lenny-robinson-mccarthy/
ebookmeta.com
https://ebookmeta.com/product/greek-lyric-a-selection-2019th-edition-
felix-budelmann-editor/
ebookmeta.com
https://ebookmeta.com/product/the-software-developers-career-handbook-
retail-copy-1st-edition-michael-lopp/
ebookmeta.com
https://ebookmeta.com/product/sassy-and-the-boss-1st-edition-m-k-
moore/
ebookmeta.com
Practical Web Development
Table of Contents
Practical Web Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. The World Wide Web
World Wide Web
The Internet
HTTP and HTML
HTML
HTTP
The World Wide Web Consortium (W3C)
Mosaic
The first browser
Netscape
Internet Explorer
The explosion of the Web
Amazon.com and e-commerce
Google and Yahoo!
Social networking
Web development
HTML
HTML editors and other tools
Browsers and web servers
CSS
JavaScript
PHP
Data
Summary
2. HTML
HTML versions
Semantic and presentational HTML
The structure and syntax of an HTML document
Doctype
<html>
<head>
<body>
Syntax for tags or elements inside the document
HTML comments
Links
The <a> tag and attributes
The href attribute
The <a> name attribute
The <a> target attribute
Classic document elements
<h1>, <h2>, <h3>, … <h6> – headings
<p> – paragraph
<span> – span
Lists
Images
<img> element and attributes
Image width and height
Input forms
Form elements
Form attributes
The label attribute
Input attributes
The name attribute
The value attribute
The checked attribute
The readonly attribute
Textarea
Dropdown lists
The disabled attribute
The selected attribute
Tables
Table elements
<table>
<thead> <tbody>
<tr>
<th> <td>
Table attributes
colspan (td)
rowspan (td)
<div>, the "uebertag"
HTML entities
HTML5-specific tags
Summary
3. CSS
Adding styles to our documents
External style sheets
Internal CSS
Inline styles
The Document Object Model (DOM)
Selectors
Multiple classes
Descendants
Selecting children or siblings
Specificity
Block elements and inline elements
Colors
Fonts
So what are fonts?
Font families
Serif fonts
Sans-serif fonts
Monospace fonts
The font-family property
Font-weight and font-style
Font-size
Line-height
The box model
Padding
Border
Margin
Collapsing margins
Positioning
Float
position:relative
position:absolute
Styling lists
list-style-type
list-style-image
list-style-position
Styling anchors – pseudo-classes
Firebug
Summary
4. JavaScript
Programming 101
Compiled and interpreted languages compared
JavaScript is not the same as Java
Java
JavaScript
Our first JavaScript program
Variables
Variable declarations
Values of variables
Numbers
Strings
Converting strings to numbers
Expressions and operators
Arithmetic operators
Addition(+)
Subtraction (-)
Multiplication (*)
Division (/)
Modulo (%)
Relational operators
Control flow
if
while
switch
Functions
Scope of variables
Objects
JSON
DOM objects, properties, methods, and events
The Window object
The Document object
write and writeln methods
Nodes and DOM traversing
Events
Summary
5. PHP
Introduction to PHP
Our first real PHP program
PHP and web hosting
Web hosting 101
Domain name
Web hosting companies
Server-side setup
Additional server-side services
PHP development environment
PHP as a web development language
Variables, values, operators, and expressions
Scope of variables
Local variables
Global variables
Static variables
String operators
To double quote or to single quote, that is the question
Control flow
Functions
String functions
strpos()
strlen()
substr()
Date functions
time()
date()
strtotime()
Arrays
Numeric arrays or indexed arrays
Associative arrays
Cool control statements for associative arrays
Sending data back to the server – forms
POST or GET, what should we get?
$_POST and $_GET arrays
Files
include, require, and require_once
Regular files
File functions or f-functions
fopen
file_exists(), is_file(), and is_dir()
fread and fwrite
One line at a time – fgets()
The printf family
Syntax of printf family of functions
Summary
6. PHP and MySQL
Databases
Relational databases
SQL
MySQL
phpMyAdmin
Creating databases
Creating and managing users
Creating and managing database tables
MySQLi in PHP
Connecting to the database
Our first SQL query, really!
Writing a MySQL query in PHP
Fetching the result
Obtaining data from more than one table
Adding data
Updating data
Summary
7. jQuery
Obtaining the jQuery library
Where to place the jQuery library on your page?
jQuery UI and jQuery Mobile
Using jQuery selectors and methods
html()
text()
attr()
.val()
show() and hide()
.find()
.parent()
.next()
.css()
jQuery documentation
Event handlers and jQuery
preventDefault()
$(this)
updateNewsContent()
Summary
8. Ajax
XMLHttpRequest
Ajax and jQuery
jQuery Ajax methods
$.load() method
$.post()
$.ajax()
Summary
9. The History API – Not Forgetting Where We Are
The problem we are trying to solve
The self-service restaurant
HTML5 History API and the history object
pushState()
popstate event
popstate and different browsers
The History plugin
Bookmarking
Summary
10. XML and JSON
XML
XML format
Displaying XML files
XML editors
XML Schema
SimpleXML
The XML file
The XML Schema file
The CSS file
The PHP file
Creating XML files with SimpleXML
Generating our HTML on the client side
XSLT
JSON
JSON syntax
JSON values
JSON objects
JSON strings
JSON arrays
JSON numbers
JSON and PHP
JSON with Ajax and jQuery
Two useful JSON methods
Summary
11. MongoDB
Relational database management systems
NoSQL databases
MongoDB
Installing MongoDB
The MongoDB shell
Creating databases, collections, and documents
_id and ObjectIds
Loading scripts
Removing documents
Updating documents
MongoDB data types
Basic data types
Dates
Embedded documents
One more example
MongoDB and PHP
Getting our gallery data
CRUD operations with MongoDB and PHP
Insert documents
Update documents
Queries with conditions
MongoDB cursor object
Summary
12. Mobile First, Responsive Design with Progressive Enhancement
Responsive design
Déjà vu
Media queries
Using the media attribute
Do more with less
Mobile first
Why mobile first?
We have come a long way
Mobile devices have newer capabilities
Mobile devices are not only used while on the road
Content first, navigation next
Small means big
Mobile input
Mobile first recap
Progressive enhancement
EnhanceJS
enhance.js
loadStyles and loadScripts
enhanced and FOUC
Modernizr
The Modernizr object
Polyfills and Modernizr
yepnope.js or Modernizr.load
Summary
13. Foundation – A Responsive CSS/JavaScript Framework
Our responsive toolkit – Foundation
Foundation components
The grid system
Class end
Visibility classes
The block grid system
Useful UI elements
Thumbnails – for simple galleries
Reveal modals – your better pop-up
Dropdowns
Example – a simple photo gallery
Accordions
Awesome Font awesome
Equalizer – the hardest thing to do with two <div>s made easy
Navigation
Top bar – not just your regular menu bar
Adding more magic
Yet more magic – off-canvas, the coolest thing
Summary
14. Node.js
Node.js
Installing node.js
npm
node
Adding HTML
Serving up static content
A tale of two (JavaScript) cities
node.js and MongoDB
Déjà vu … once more
Express
Installing Express
Our first Express app
An example with middleware
Templating and handlebars.js
Creating a layout
Our last Hello, World example
Summary
A. Bootstrap – An Alternative to Foundation
Bootstrap components
The Bootstrap grid system
Visibility classes
Buttons
Other UI elements
Thumbnails
Dropdowns
Modal – the Bootstrap popup
Combining dropdowns and modals
Collapse – an accordion for Bootstrap
Navigation
Summary
Index
Practical Web Development
Practical Web Development
Copyright © 2015 Packt Publishing All rights reserved. No part of this book
may be reproduced, stored in a retrieval system, or transmitted in any form or by
any means, without the prior written permission of the publisher, except in the
case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.
Livery Place
35 Livery Street
ISBN 978-1-78217-591-9
www.packtpub.com
Credits
Author
Paul Wellens
Reviewers
Jorge Albaladejo
Elvis Boansi
Adam Maus
Commissioning Editor
Edward Gordon
Acquisition Editors
James Jones
Sonali Vernekar
Ritika Singh
Technical Editor
Ryan Kochery
Copy Editors
Alpha Singh
Ameesha Green
Jasmine Nadar
Jasmine Nadar
Project Coordinator
Milton Dsouza
Proofreader
Safis Editing
Indexer
Rekha Nair
Production Coordinator
Manu Joseph
Cover Work
Manu Joseph
About the Author
Paul Wellens has been a senior product manager for a major computer company
in the Los Angeles area and Silicon Valley for over two decades. Before that, he
used to install Unix systems and train companies in Europe, from his native
Belgium. Later in his career, he became a web development aficionado because
it brought him back to another passion of his: programming.
This is not his first book. His prior publication is of a different nature. Nature is
what it is all about as it is a guidebook on Eastern California, which is illustrated
with his own photographs. Therefore, it should not come as a surprise to learn
that, besides experimenting with new web technologies, his major hobbies are
photography and hiking in the Eastern Sierra.
Acknowledgments
I have written books before and I know that the result can only be successful if
there are some nice people to assist you. This is the first time that I have worked
with a publisher, Packt Publishing, so these are the first people I would like to
thank. I would like to thank Shivani Wala for discovering me and James Jones
for working with me to figure out the right book for me to write and for you to
read. I enjoyed working with Priyanka Shah, Ritika Singh, and Ryan Kochery
who assisted me in bringing this cool project to completion, without a single
complaint, even though I was once again late with a deliverable. Thank you for
being so patient with me.
I would also like to thank (yes, this is a note of cynicism) the three companies
that "manage" the railroads in Belgium. Without their comedy of errors with
trains—delays, cancellations, failure to depart because of mechanical problems,
or trains departing from the station where you want to get to, as opposed to
depart from, I would never had so much time to work on this book on my iPad.
It is not in their honor, but, because for 2 years, it was the highlight of my day to
safely arrive at Antwerp Central Station—which was rated by an American
newspaper as the most beautiful train station in the world—that we decided to
use it as the cover photo.
Next, I would like to thank my web developer buddy, Björn Beheydt, for taking
the time to read the early versions of the chapters of this book and providing
constructive feedback. I would also like to mention Steve Drach and Bart
Reunes for always being there when I needed some technical advice.
Then, there are places that I would like to call a home away from home, where
folks did not mind that I was typing away on my Bluetooth keyboard when
inspiration kicked in. Most notably, I have to thank the folks at Trapke Op
(Caro, Maressa, Evi, Klaartje and Jill) in Brecht, Belgium, where I typed these
sentences. These wonderful people helped me make it to the finish line. Het
Boshuisje in Zoersel, where Hendrik Conscience wrote books over a hundred
years before I did, also comes to mind. I would like to thank Theo for always
giving me a seat to land with my iPad, keyboard, and work.
Less related to this book, but still in need of a mention, are all my friends in
California that inspired me to carry on doing great things in hard times. In
particular, I want to express my appreciation to the people that work(ed) at the
particular, I want to express my appreciation to the people that work(ed) at the
Gordon Biersch Restaurant in Palo Alto, which I can still proudly call my photo
gallery. I thank them for their support for over 11 years and for still welcoming
me when I visit them; they make me feel as if I only left last night. That also
includes the patrons of the place with whom I've had numerous conversations
and enjoyed every single one of them.
If you read this book, or my previous book, you will notice that I have a certain
affinity and passion for a particular part of California. So, I would like to thank
all the wonderful folks that live in the town of June Lake, California, for always
having inspired me to come back and be creative. My goal in life is to go there
as often as I can.
Finally, I would like to thank my mother. It has been hard for her since my father
passed away and her son returned. I am dedicating this book to her, not that I
expect her to read it, but I really appreciate the patience she had with me while I
was writing it.
About the Reviewers
Jorge Albaladejo is a software engineer with a master's degree in information
and communication technologies from HES-SO, Switzerland. With over a
decade of experience building cloud, SaaS, and web applications, he considers
himself to be a passionate and versatile full-stack web developer.
I'd like to thank my employers at John Jay College for all of their support. I
would also like to thank my supervisors, Ana and Juan, for their feedback. I
thank my friends, Sanga, Steve, and Loric, for constantly sharing their
knowledge with me.
His main area of work is design, and he integrates the user interface (or
frontend) of web pages / applications; however, lately, he has been diving into
backend stuff and has become a full-stack web developer.
He loves the open/free Internet and thinks that the Internet is a global public
resource that must remain open and accessible to everyone.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit
www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with
PDF and ePub files available? You can upgrade to the eBook version at
www.PacktPub.com and as a print book customer, you are entitled to a discount
on the eBook copy. Get in touch with us at <service@packtpub.com> for more
details.
https://www2.packtpub.com/books/subscription/packtlib
Then, I felt the need to have my own website to display my photographs and
inform people about the beauty and interesting places of the parts of California
that I had discovered during my many journeys travelling around the state. So, I
created one. One day, I was telling a friend about it and he tried to look at it on
his mobile phone. It looked terrible. So, I bought a Nokia phone (a brick
compared to what we have today) so that I could test my own site to make sure
that it looked good on a phone as well. This is how I caught the bug of
responsive design, years before someone started calling it this.
As the classes took place in Leuven, a major university town in Belgium, I went
to the local university bookstore and bought book after book on all kinds of
related topics and quickly became a jQuery fan. jQuery, by the way, was not
even included in the course. I started wondering why someone needed to have 35
different books to learn about web development and that writing a single book
that gave a comprehensive overview of what you need to know to engage in web
development would not be a bad idea.
Since then, web development has changed a lot; more books were needed,
eBooks this time, but the concept remained the same. So, now you know why I
wrote the book.
This book gives you an overview of all the general aspects of web development,
in a traditional way, using plain HTML to do static websites, as well as the
current way, to enable you to create your web pages dynamically and make sure
that they look great on mobile devices as well, by using responsive design. We
conclude by giving you a hint of what is yet to come if you replace the
traditional web server by writing your own using node.js.
What this book covers
Chapter 1, The World Wide Web, gives you an overview of the history of what
we know today as the World Wide Web.
Chapter 2, HTML, introduces HTML and gives you an overview of the most
commonly used HTML tags to do web development. You will be able to create a
basic website after reading this chapter.
Chapter 3, CSS, explains how to use Cascading Style Sheets (CSS). This is used
for the presentation part or layout of your website, from color to dimensions to
typefaces. The most commonly used CSS properties are explained here. Once
you are done with this chapter, you will be able to make your basic website look
good.
Chapter 6, PHP and MySQL, introduces MySQL, an open source database. You
will learn how to create a database, manage it using the phpMyAdmin tool, and
perform basic CRUD (create, replace, update, delete) operations from within a
PHP program.
Chapter 10, XML and JSON, describes XML and JSON. They are two popular
formats to exchange data, for example the server and the client. Although XML
is used in a variety of environments, JSON is closer to the web development
community.
Chapter 14, Node.js, gives an overview of what I call the avant-garde of web
development. It introduces node.js, which allows you to write your server-side
code in JavaScript, including your own web server, which is facilitated by using
the Express framework.
“Fine!” laughed Bert. “We got in some good ones. But they’ll make
it hot for us when they come back.”
“I wonder if they’ll catch Harold and Sewall,” said Lanny. “There’s
someone coming now.”
Into the dim radiance of the two lights on the platform came two
boys dragging a toboggan. They were Ben and Stanley Pierce.
“I say,” whispered Bert, “let’s get up there ahead and keep them
off. We can do it. Take all the snowballs you’ve got, fellows.” And
Bert started for the steps on the run. Had the others had time to
reflect they might have hesitated. As it was, they followed at once
and had gained the platform before Ben and Pierce had reached the
foot of the steps. When they did reach them a snowball, sent with
beautiful accuracy, banged against Ben’s woolen cap and another
hummed past Pierce’s head. The seniors stopped and held a council
of war.
“Quit that, you kids,” shouted Ben threateningly.
“We’ll come up there and give you fellows a good licking,” added
Pierce.
“Come on!” jeered Lanny, the joy of battle thrilling him. “Try it!”
They did try it, but such a shower of snowballs met them as soon
as they set foot on the steps that they thought better of it. For a
minute or so they fashioned missiles and retaliated, but throwing up
at the platform was difficult work and their snowballs either sailed
harmlessly overhead or wasted themselves against the boards. Then
two boys with a toboggan came into sight, running hard, and Ben
hailed them.
“Come on, you fellows! The kids have got the slide!”
The newcomers paused without answering.
“It’s Cupples and Crandall,” whispered Bert joyously. At that
moment the meaning of the pause was explained. Ben and Pierce
found themselves attacked from a new quarter, while from the
platform came a pitiless shower of snowballs. Discretion proved the
better part of valor. Ben and Pierce scampered away and, with a
shout, Cupples and Crandall rushed up the stairs and joined the
invaders at the top.
“Did they get you?” asked Lanny. “The whole crowd went down to
catch you.”
“No, we saw them first,” panted Crandall with a grin, “and ran like
the dickens. They’re after us, though. Come on, Harold, let’s go
down again before they catch us.”
“If you do that they’ll get you sure,” said Bert. “Stay up here with
us and we’ll stand them off. We can do it easily. There are some of
them now.”
Four figures came out of the darkness and were joined, at a
respectful distance from the platform by Ben and Pierce.
“They’ll try to rush us,” muttered Bert. “Got plenty of snowballs,
fellows?”
“What do you say, Harold?” asked Crandall.
“Oh, we’ll stay and help the kids,” answered Cupples, beginning to
make snowballs as fast as he could. “Pull the toboggan up, Cran,
and put it across the top of the slide there. We can get behind it if
we need to. Say, fellows, there isn’t much snow up here. First thing
we know we’ll be out of ammunition.”
“Kid, you gather all the snow you can find,” directed Bert, “and
pile it back of the toboggan.”
“I want to fight,” demurred Kid.
“Well, you can fight, too. Go ahead. I’ll help you until they start for
us.”
“They’ll wait until the other three fellows come,” said Cupples.
“We’ll have to shoot straight, fellows. Don’t waste your shots now.”
“We won’t,” muttered Lanny. “Don’t you worry.”
“There are the rest of them,” said Crandall, patting a fine, soggy
snowball into shape. “Get ready, fellows.”
“Hooray!” shrieked Kid, “paste them, paste them!”
The enemy, nine strong, started across the snow toward the foot
of the incline. On the platform the defenders lined up and waited.
Fortunately for them the attackers were forced to come up in single
file, since the steps were only about eighteen inches wide. Ben led
the way, Perkins at his heels and the others behind, yelling
fearsomely.
“Wait till they’re on the steps,” counseled Cupples, “and then give
it to ’em! Now!”
Six snowballs sped down at the enemy, three of the number
taking effect on Ben. Ben shook his head angrily and came on. Then
a lucky shot by Lanny struck him square on the chin, he faltered,
slipped against the railing, and Perkins took his place. By that time
the shots were falling thick and fast and there was a steady stream
of snowballs. To advance in the face of such a fire was out of the
question, and Perkins, ducking his head, turned and crowded back,
putting the line into confusion. One of the day boys slipped and
went to the bottom on his back. Ben, too, was in flight, and in a
moment the enemy had withdrawn again to a safe distance.
“Hurrah!” shrieked Kid, jumping about on the platform. “We gave
it to ’em!”
“Hurry up, fellows!” called Cupples. “More snowballs. They’ll be
back in a minute.”
“We can keep them off all night,” said Bert, “as long as they come
up one at a time. That was a dandy shot of yours, Lanny.”
“They’re coming again,” said Small nervously. “Let’s make terms
with them before it’s too late, Lanny.”
“Make terms!” cried Lanny. “Never!”
Then they came toward the slide again, but more cautiously this
time, halting just out of accurate range and then, at a signal, rushing
for the steps and up them, Ben again in the lead. Up and up they
came, slipping and faltering under the rain of missiles, but doggedly
winning the ascent. Now there was a scant ten feet between Ben
and the platform. Behind him, Pierce and Perkins and the others
were crowding, their faces and bodies blotched with snow. They
were angry clear through and met every broadside of shot stoically,
stubbornly determined to gain the summit and wreak revenge on the
foe. The garrison behind the toboggan fought furiously. Snowballs
slammed down upon lowered heads and sped past protecting arms
to spread against necks and faces. The invaders made no effort to
retaliate, since it was difficult enough to make the ascent as it was;
to have attempted to throw snowballs would have invited utter
disaster.
“Let ’em have it!” cried Cupples, stooping for more ammunition
and discovering that only a few snowballs remained behind the
breastworks. The file still came on, Ben a mass of white where the
snowballs had struck and clung to his head and body.
“Who’s got any snowballs?” gasped Lanny.
“All gone,” answered Bert, desperately searching the icy boards for
snow. Small and Kid, at the other side of the platform, farthest from
the steps, were still firing, Small wildly and ineffectually. Lanny ran
across and pushed him aside. Kid shouted shrilly and got in a
splendid shot against Perkins’s ear that made that youth stagger
against the railing.
Then the firing diminished and consternation seized the garrison.
Their ammunition was gone! Ben gave a roar of triumph and
plunged up the few remaining steps, and it would have been all over
with the defenders then and there had not Bert been visited by a
brilliant idea. Seizing the toboggan, he swung it around to the steps
and, holding the rope, sent it swiftly down. It caught Ben unawares
and swept his feet from under him. He clutched wildly at the railing,
saved himself from an actual fall, but kicked Pierce so savagely that
the latter emitted a shriek and fell to his knees. Perkins stumbled,
slipped, and spread the wildest disorder. The last of the snowballs
were fired, a final volley that decided the fortunes of the battle. The
enemy wavered, turned. Ben, recovering his equilibrium, strove to
hold his regiment, but all in vain. Down the steps they fled, and Ben,
finding himself deserted, followed.
The garrison gave a shout of triumph. Kid jumped and squealed.
And then Small, venturing too near the edge of the slide, turned the
retreat into a veritable rout. Losing his footing, he sat down
suddenly and forcibly just over the edge, and, with a shriek of
despair, shot down the ice-covered trough on his back, legs waving,
hands grasping at the empty air and voice raised in wild cries. The
enemy heard and supposing that the entire garrison was hot upon
their heels, plunged down the rest of the incline in mad flight and
scattered over the snow below just as Small, going now at a good
twenty miles an hour, flew by!
At the top of the slide the rest of the garrison leaned weakly
against the railing and laughed until the tears came. Kid was so
overcome that he slipped to the floor and rolled over and over,
emitting strange, gurgling sounds. Far down the slide, Small, an
indistinct figure in the darkness, crawled over the bank of the slide,
struggled to his feet, and, with one brief glance in the direction of
the enemy, streaked across the snow toward school. Three figures
gave chase and presently Small was in the hands of the enemy and
Ben advanced toward the slide, one mittened hand held aloft.
“Flag of truce, fellows!” he called.
“All right,” answered Cupples. “What do you want?”
“We’ve taken Small prisoner,” announced Ben, “and we’re going to
wash his face with snow unless you give in.”
A howl of protest from Small pierced the air.
“We’ll yield with all the honors of war,” announced Cupples after a
hurried conference.
“What’s that?” asked Ben.
“You fellows are not to touch us,” said Cupples, “and we’re to have
the use of this slide whenever we want it.”
“We won’t touch you,” replied Ben, “and you and Crandall can
slide here. But those other little ruffians must keep off.”
Cupples looked inquiringly at Crandall. The latter shook his head.
“Tell him they must let the juniors slide too.”
Cupples did so. Ben conferred. Small, captive between two of the
day boys, waited anxiously. At last Ben turned toward the platform
again.
“All right,” he said. “We agree. But you’ve spoiled our fun and you
must let us have the slide the rest of the time to-night.”
“That’s all right,” agreed Bert and Lanny in a breath.
Cupples graciously informed Ben that the terms were satisfactory.
“Then you fellows come down,” said Ben.
“You release your prisoner,” said Cupples.
An instant later Small was scooting homeward again as fast as his
legs would carry him. Then the garrison evacuated, Bert, Lanny and
Kid marching gravely down the steps and Cupples and Crandall flying
down the slide on their toboggan. The three juniors encountered the
enemy at the foot of the incline. Ben scowled wrathfully.
“You kids think you’re mighty smart, don’t you?” he sneered.
Bert and Lanny smiled sweetly, but forebore to make reply as they
turned homeward. Kid, however, irrepressible even in the face of
danger, executed a weird dance in the snow.
“Io triumphus!” exulted Kid.
Mr. Folsom was standing in front of the fireplace in the hall, watch
in hand, when they entered.
“Ha!” he said. “A close shave, Grey. It is thirty seconds past nine.
Where are the others?”
“On the slide, sir. May I call them? I—I guess they don’t know how
late it is.”
“No,” said Mr. Folsom, grimly, snapping his watch shut, “I will
attend to them myself.”
“Gee,” whispered Lanny as the teacher went in search of his hat
and coat, “that means house bounds to-morrow morning for all of
them! My, won’t they be peeved!”
“O joy! O glee!” cried Kid. “We’ll have the slide to ourselves!”
VI
A RESCUE