100% found this document useful (2 votes)
205 views

Programming the World Wide Web 8th Edition Robert W. Sebestapdf download

The document is a description of the 8th edition of 'Programming the World Wide Web' by Robert W. Sebesta, aimed primarily at college students with some programming background. It covers various web technologies and programming languages essential for building and maintaining websites, including HTML, JavaScript, PHP, and more. The edition includes updates and new chapters, such as Android Software Development, to reflect current trends in web programming.

Uploaded by

faeqroaya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
205 views

Programming the World Wide Web 8th Edition Robert W. Sebestapdf download

The document is a description of the 8th edition of 'Programming the World Wide Web' by Robert W. Sebesta, aimed primarily at college students with some programming background. It covers various web technologies and programming languages essential for building and maintaining websites, including HTML, JavaScript, PHP, and more. The edition includes updates and new chapters, such as Android Software Development, to reflect current trends in web programming.

Uploaded by

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

Programming the World Wide Web 8th Edition

Robert W. Sebesta pdf download

https://ebookmass.com/product/programming-the-world-wide-web-8th-
edition-robert-w-sebesta/

Explore and download more ebooks at ebookmass.com


Here are some recommended products for you. Click the link to
download, or explore more at ebookmass.com

Concepts of Programming Languages (10th Edition) Sebesta

https://ebookmass.com/product/concepts-of-programming-languages-10th-
edition-sebesta/

History, Disrupted: How Social Media and the World Wide


Web Have Changed the Past Jason Steinhauer

https://ebookmass.com/product/history-disrupted-how-social-media-and-
the-world-wide-web-have-changed-the-past-jason-steinhauer/

Customer Service Skills for Success 8th Edition Robert W.


Lucas

https://ebookmass.com/product/customer-service-skills-for-success-8th-
edition-robert-w-lucas/

Introducing ReScript: Functional Programming for Web


Applications 1st Edition Danny Yang

https://ebookmass.com/product/introducing-rescript-functional-
programming-for-web-applications-1st-edition-danny-yang/
The King in Yellow Robert W Chambers

https://ebookmass.com/product/the-king-in-yellow-robert-w-chambers-2/

The King in Yellow Robert W Chambers

https://ebookmass.com/product/the-king-in-yellow-robert-w-chambers/

C++ Programming 8th ed Edition D. S

https://ebookmass.com/product/c-programming-8th-ed-edition-d-s/

MIPS assembly language programming Robert Britton

https://ebookmass.com/product/mips-assembly-language-programming-
robert-britton/

PHP 8 Basics: For Programming and Web Development Gunnard


Engebreth

https://ebookmass.com/product/php-8-basics-for-programming-and-web-
development-gunnard-engebreth/
Progr ammi n g T h e

W orld W ide W eb

Ei ghth Edi ti on

RO B E R T W. S E B E S TA
University of Colorado at Colorado Springs

Boston Columbus Indianapolis New York San Francisco Upper Saddle River
Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto
Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo
Vice President/Editorial Director: Marcia Horton Cover Art: © Palsur/Shutterstock
Executive Editor: Matt Goldstein Full-Service Project Management: Vasundhara
Editorial Assistant: Kelsey Loanes Sawhney/Cenveo® Publisher Services
Senior Managing Editor: Scott Disanno Composition: Cenveo Publisher Services
Program Manager: Kayla Smith-Tarbox Printer/Binder: R.R. Donnelley—Harrisonburg
Project Manager: Irwin Zucker Cover Printer: R.R. Donnelley—Harrisonburg
Art Director: Jayne Conte Text Font: JansonText
Cover Designer: Bruce Kenselaar

Copyright © 2015, 2013, 2011, 2010 Pearson Education, Inc. All rights reserved. Manufactured in the United
States of America. This publication is protected by Copyright, and permission should be obtained from the
publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or
by any means, electronic, mechanical, photocopying, recording, or likewise. To obtain permission(s) to use
material from this work, please submit a written request to Pearson Education, Inc., Permissions Department,
One Lake Street, Upper Saddle River, New Jersey 07458.
Microsoft and/or its respective suppliers make no representations about the suitability of the information contained in the
documents and related graphics published as part of the services for any purpose. All such documents and related graphics
are provided “as is” without warranty of any kind. Microsoft and/or its respective suppliers hereby disclaim all warranties
and conditions with regard to this information, including all warranties and conditions of merchantability, whether express,
implied or statutory, fitness for a particular purpose, title and non-infringement. In no event shall microsoft and/or its
respective suppliers be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss
of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection
with the use or performance of information available from the services. The documents and related graphics contained herein
could include technical inaccuracies or typographical errors. Changes are periodically added to the information herein.
Microsoft and/or its respective suppliers may make improvements and/or changes in the product(s) and/or the program(s)
described herein at any time. Partial screen shots may be viewed in full within the software version specified.

Trademarks
Microsoft® Windows®, and Microsoft Office® are registered trademarks of the microsoft corporation in the U.S.A.
And other countries. This book is not sponsored or endorsed by or affiliated with the microsoft corporation.
Many of the designations by manufacturers and seller to distinguish their products are claimed as trademarks.
Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations
have been printed in initial caps or all caps.
Credits for illustrations appear on page xx.

Library of Congress Cataloging-in-Publication Data


Sebesta, Robert W., author.
Programming the World Wide Web / Robert W. Sebesta, University of Colorado at Colorado Springs. --
Eighth edition.
pages cm
Includes index.
ISBN 978-0-13-377598-3 (alk. paper)
1. Internet programming. 2. World Wide Web. I. Title.
QA76.625.S42 2014
006.7’6--dc 3
2014000161

10 9 8 7 6 5 4 3 2 1

ISBN-10: 0-13-377598-4
ISBN-13: 978-0-13-377598-3
To Aidan
This page intentionally left blank
Preface

It is difficult to overestimate the effect the World Wide Web has had on
the day-to-day lives of people, at least those in the developed countries.
In just 20 years, we have learned to use the Web for a myriad of disparate
tasks, ranging from the mundane task of shopping for airline tickets to the
crucial early-morning gathering of business news for a high-stakes day trader.
The speed at which millions of Web sites appeared in the last two decades
would seem to indicate that the technologies used to build them were sitting
on the shelf, fully developed and ready to use, even before the Web appeared.
Also, one might guess that the tens of thousands of people who built those
sites were sitting around unemployed, waiting for an opportunity and already
possessing the knowledge and abilities required to carry out this mammoth
construction task when it appeared. Neither of these was true. The need for
new technologies was quickly filled by a large number of entrepreneurs, some
at existing companies and some who started new companies. A large part of
the programmer need was filled, at least to the extent to which it was filled,
by new programmers, some straight from high school. Many, however, were
previously employed by other sectors of the software development industry.
All of them had to learn to use new languages and technologies.
A visit to a bookstore, either a bricks-and-mortar store or a Web site,
will turn up a variety of books on Web technologies aimed at the practic-
ing professional. One difficulty encountered by those teaching courses in
Web programming technologies in colleges is the lack of textbooks that are
targeted to their needs. Most of the books that discuss Web programming
were written for professionals, rather than college students. Such books are
written to fulfill the needs of professionals, which are quite different from
those of college students. One major difference between an academic book
and a professional book lies in the assumptions made by the author about
the prior knowledge and experience of the audience. On the one hand, the
backgrounds of professionals vary widely, making it difficult to assume much
of anything. On the other hand, a book written for junior computer science
majors can make some definite assumptions about the background of the
reader.

v
vi    Preface

This book is aimed at college students, not necessarily only computer science
majors, but anyone who has taken at least two courses in programming. Although
students are the primary target, the book is also useful for professional program-
mers who wish to learn Web programming.
The goal of the book is to provide the reader with a comprehensive introduc-
tion to the programming tools and skills required to build and maintain server
sites on the Web. A wide variety of technologies are used in the construction
of a Web site. There are now many books available for professionals that focus
on these technologies. For example, there are dozens of books that specifically
address only HTML. The same is true for at least a half-dozen other Web tech-
nologies. This book provides descriptions of many of the most widely used Web
technologies, as well as an overview of how the Web works.
The first seven editions of the book were used to teach a junior-level Web
programming course at the University of Colorado at Colorado Springs. The
challenge for students in the course is to learn to use several different program-
ming languages and technologies in one semester. A heavy load of programming
exercises is essential to the success of the course. Students in the course build a
basic, static Web site, using only HTML as the first assignment. Throughout the
remainder of the semester, they add features to their site as the new technologies
are introduced in the course. Our students’ prior course work in Java and data
structures, as well as C and assembly language, is helpful, as is the fact that many
of them have learned some HTML on their own before taking the course.
The most important prerequisite to the material of this book is a solid background
in programming in some language that supports object-oriented programming. It
is helpful to have some knowledge of a second programming language and a bit of
UNIX, particularly if a UNIX-based Web server is used for the course. Familiarity
with a second language makes learning the new languages easier.

New to the Eighth Edition


• Chapter 2 Added descriptions of three new type attribute values for the
input element, url, email, and range to Section 2.9.2.
• Chapter 3 Added descriptions of four new selectors, first-child ,
­last-child, only-child, and empty, to Section 3.4.5.
• Chapter 5 Expanded Section 5.9, titled The canvas Element, from thirteen
lines to three and one-half pages, adding three new figures.
• Chapter 7 Added the new section, 7.2, titled Uses of XML, which briefly
describes some of the many areas in which XML has been used.
Deleted Section 7.4, titled Document Type Definitions, in its
entirety.
• Chapter 12 Added Section 12.2.7, titled Attributes.
• Chapter 14 Added a completely new chapter, now Chapter 14, titled
Android Software Development.
Preface    vii

Table of Contents
Chapter 1 lays the groundwork for the rest of the book. A few fundamentals are
introduced, including the history and nature of the Internet, the World Wide
Web, browsers, servers, URLs, MIME types, and HTTP. Also included in Chap-
ter 1 are brief overviews of the most important topics of the rest of the book.
Chapter 2 provides an introduction to HTML, including images, links, lists,
tables, forms, the audio and video elements, the organizational elements, and the
time element. Small examples are used to illustrate many of the HTML elements
that are discussed in this chapter.
The topic of Chapter 3 is cascading style sheets, which provide the standard
way of imposing style on the content specified in HTML tags. Because of the
size and complexity of the topic, the chapter does not cover all of the aspects of
style sheets. The topics discussed are levels of style sheets, style specification for-
mats, selector formats, property values, and color. Among the properties covered
are those for fonts, lists, and margins. Small examples are used to illustrate the
subjects that are discussed.
Chapter 4 introduces the core of JavaScript, a powerful language that could
be used for a variety of different applications. Our interest, of course, is its use
in Web programming. Although JavaScript has become a large and complex
language, we use the student’s knowledge of programming in other languages to
leverage the discussion, thereby providing a useful introduction to the language
in a manageably small number of pages. Topics covered are the object model of
JavaScript, its control statements, objects, arrays, functions, constructors, and
pattern matching.
Chapter 5 discusses some of the features of JavaScript that are related to
HTML documents. Included is the use of the basic and DOM 2 event and event-
handling model, which can be used in conjunction with some of the elements of
HTML documents. The HTML canvas element also is described.
One of the interesting applications of JavaScript is building dynamic HTML
documents with the Document Object Model (DOM). Chapter 6 provides
descriptions of a collection of some of the changes that can be made to documents
with the use of JavaScript and the DOM. Included are positioning elements;
moving elements; changing the visibility of elements; changing the color, style, and
size of text; changing the content of tags; changing the stacking order of overlapped
elements; moving elements slowly; and dragging and dropping elements.
Chapter 7 presents an introduction to XML, which provides the means to
design topic-specific markup languages that can be shared among users with
common interests. Included are the syntax and document structure used by XML,
namespaces, XML schemas, and the display of XML documents with both cascad-
ing style sheets and XML transformations. Also included is an introduction to
Web services and XML processors.
Chapter 8 introduces the Flash authoring environment, which is used to
create a wide variety of visual and audio presentations—in particular, those that
include animation. A series of examples is used to illustrate the development
processes, including drawing figures, creating text, using color, creating motion
viii    Preface

and shape animations, adding sound tracks to presentations, and designing com-
ponents that allow the user to control the Flash movie.
Chapter 9 introduces PHP, a server-side scripting language that enjoys wide
popularity, especially as a database access language for Web applications. The
basics of the language are discussed, as well as the use of cookies and session track-
ing. The use of PHP as a Web database access language is covered in Chapter 13.
Chapter 10 introduces Ajax, the relatively recent technology that is used to
build Web applications with extensive user interactions that are more efficient
than those same applications if they do not use Ajax. In addition to a thorough
introduction to the concept and implementation of Ajax interactions, the chapter
includes discussions of return document forms, Ajax toolkits, and Ajax security.
Several examples are used to illustrate approaches to using Ajax.
Java Web software is discussed in Chapter 11. The chapter introduces the
mechanisms for building Java servlets and gives several examples of how servlets
can be used to present interactive Web documents. The NetBeans framework
is introduced and used throughout the chapter. Support for cookies in servlets
is presented and illustrated with an example. Then JSP is introduced through a
series of examples, including the use of code-behind files. This discussion is fol-
lowed by an examination of JavaBeans and JavaServer Faces, along with examples
to illustrate their use.
Chapter 12 is an introduction to ASP.NET, although it begins with a brief
introduction to the .NET Framework and C#. ASP.NET Web controls and some
of the events they can raise and how those events can be handled are among the
topics discussed in this chapter. ASP.NET AJAX is also discussed. Finally, con-
structing Web services with ASP.NET is introduced. Visual Studio is introduced
and used to develop all ASP.NET examples.
Chapter 13 provides an introduction to database access through the Web. This
chapter includes a brief discussion of the nature of relational databases, architectures
for database access, the structured query language (SQL), and the free database
system MySQL. Then, three approaches to Web access to databases are discussed:
using PHP, using Java JDBC, and using ASP.NET. All three are illustrated with
complete examples. All of the program examples in the chapter use MySQL.
Chapter 14 introduces the development of Android applications. The basics
of view documents, which are written in an XML-based markup language, and
activities, which are written in a form of Java, are introduced. Several relatively
simple examples are used to illustrate this new approach to building Web applica-
tions for mobile devices.
Chapter 15 introduces the Ruby programming language. Included are the
scalar types and their operations, control statements, arrays, hashes, methods,
classes, code blocks and iterators, and pattern matching. There is, of course, much
more to Ruby, but the chapter includes sufficient material to allow the student to
use Ruby for building simple programs and Rails applications.
Chapter 16 introduces the Rails framework, designed to make the construc-
tion of Web applications relatively quick and easy. Covered are simple document
requests, both static and dynamic, and applications that use databases, including
the use of scaffolding.
Preface    ix

Appendix A introduces Java to those who have experience with C++ and
object-oriented programming, but who do not know Java. Such students can learn
enough of the language from this appendix to allow them to understand the Java
applets, servlets, JSP, and JDBC that appear in this book.
Appendix B is a list of 140 named colors, along with their hexadecimal
codings.

Support Materials
Supplements for the book are available at the Pearson Web site
www.pearsonhighered.com/sebesta. Support materials available to all readers
of this book include
• A set of lecture notes in the form of PowerPoint files. The notes were
developed to be the basis for class lectures on the book material.
• Source code for examples
Additional support material, including solutions to selected exercises
and figures from the book, are available only to instructors adopting this
textbook for classroom use. Contact your school’s Pearson Education
representative for information on obtaining access to this material, or visit
pearsonhighered.com.

Software Availability
Most of the software systems described in this book are available free to students.
These systems include browsers that provide interpreters for JavaScript and parsers
for XML. Also, PHP, Ruby, and Java language processors, the Rails framework, the
Java class libraries to support servlets, the Java JDBC, and the Android Development
system, are available and free. ASP.NET is supported by the .NET software
available from Microsoft. The Visual Web Developer 2013, a noncommercial
version of Visual Studio, is available free from Microsoft. A free 30-day trial version
of the Flash development environment is available from Adobe.

Differences between the Seventh Edition


and the Eighth Edition
The eighth edition of this book differs from the seventh in the following ways:
Descriptions of the url, email, and range attributes of the input element
were added to Chapter 2.
Descriptions of four new selectors, first-child, last-child, only-
child, and empty, were added to Chapter 3.
The description of the canvas element was increased from a paragraph to
three and one-half pages and three new figures were added to Chapter 5.
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
x    Preface

A new section was added to Chapter 7, titled Uses of XML, which briefly
describes some of the many areas in which XML has been used. Section 7.4, titled
Document Type Definitions, was deleted in its entirety.
A new section, titled Attributes, which describes the attributes of C# was
added to Chapter 12.
A completely new chapter was added to the book, Chapter 14, titled Android
Software Development, which introduces the structure of Android applications
and the process of developing them. The use of intents to call other activities and
data persistence are also discussed.
Throughout the book, numerous small revisions, additions, and deletions
were made to improve the correctness and clarity of the material.
Preface    xi

Acknowledgments
The quality of this book was significantly improved as a result of the extensive
suggestions, corrections, and comments provided by its reviewers. It was reviewed
by the following individuals:

Lynn Beighley Peter S. Kimble


University of Illinois
R. Blank
CTO, Almer/Blank; Training Director, Mark Llewellyn
The Rich Media Institute; Faculty, University of Central Florida
USC Viterbi School of Engineering
Chris Love
Stephen Brinton ProfessionalASPNET.com
Gordon College
Gabriele Meiselwitz
David Brown Towson University
Pellissippi State Technical Community
College Eugene A. “Mojo” Modjeski
Rose State College
Barry Burd
Drew University Najib Nadi
Villanova University
William Cantor
Pennsylvania State University Russ Olsen

Dunren Che Jamel Schiller


Southern Illinois University Carbondale University of Wisconsin—Green Bay

Brian Chess Stephanie Smullen


Fortify Software University of Tennessee at
Chattanooga
Randy Connolly
Mount Royal University Marjan Trutschl
Louisiana State
Mark DeLuca University—Shreveport
Pennsylvania State University
J. Reuben Wetherbee
Sanjay Dhamankar University of Pennsylvania
President, OMNIMA Systems, Inc.
Christopher C. Whitehead
Marty Hall Columbus State University

Matt Goldstein, Executive Editor; Kelsey Loanes, Editorial Assistant, and Kayla
Smith-Tarbox, Program Manager, all deserve my gratitude for their encouragement
and help in completing the manuscript.
Brief Contents
1 Fundamentals 1

2 Introduction to HTML/XHTML 33

3 Cascading Style Sheets 95

4 The Basics of JavaScript 137

5 JavaScript and HTML Documents 193

6 Dynamic Documents with JavaScript 239

7 Introduction to XML 277

8 Introduction to Flash 315

9 Introduction to PHP 357

10 Introduction to Ajax 401

11 Java Web Software 431

12 Introduction to ASP.NET 493

13 Database Access through the Web 559

14 Android Software Development 599

15 Introduction to Ruby 647

16 Introduction to Rails 691

Appendix A Introduction to Java 721


Appendix B Named Colors and Their Hexadecimal Values 737

Index 741
xii
Contents
1 Fundamentals 1
1.1 A Brief Introduction to the Internet   2
1.2 The World Wide Web   6
1.3 Web Browsers   7
1.4 Web Servers   8
1.5 Uniform Resource Locators   11
1.6 Multipurpose Internet Mail Extensions   13
1.7 The Hypertext Transfer Protocol   15
1.8 Security   18
1.9 The Web Programmer’s Toolbox   20
Summary   27
Review Questions   29
Exercises   31

2 Introduction to HTML/XHTML 33
2.1 Origins and Evolution of HTML and XHTML   34
2.2 Basic Syntax   38
2.3 Standard HTML Document Structure   39
2.4 Basic Text Markup   40
2.5 Images   49
2.6 Hypertext Links   55
2.7 Lists   58
2.8 Tables   63
2.9 Forms   69
2.10 The audio Element   83
2.11 The video Element   84
2.12 Organization Elements   86
2.13 The time Element   88
2.14 Syntactic Differences between HTML and XHTML   89
xiii
xiv    Contents   

Summary   90
Review Questions   91
Exercises   93

3 Cascading Style Sheets 95


3.1 Introduction    96
3.2 Levels of Style Sheets   97
3.3 Style Specification Formats   98
3.4 Selector Forms   99
3.5 Property-Value Forms   103
3.6 Font Properties   105
3.7 List Properties   113
3.8 Alignment of Text   117
3.9 Color   119
3.10 The Box Model   121
3.11 Background Images   126
3.12 The <span> and <div> Tags   128
3.13 Conflict Resolution   129
Summary   132
Review Questions   133
Exercises   135

4 The Basics of JavaScript 137


4.1 Overview of JavaScript   138
4.2 Object Orientation and JavaScript   141
4.3 General Syntactic Characteristics   142
4.4 Primitives, Operations, and Expressions   145
4.5 Screen Output and Keyboard Input   154
4.6 Control Statements   158
4.7 Object Creation and Modification   165
4.8 Arrays   166
4.9 Functions   171
4.10 An Example   175
4.11 Constructors   177
4.12 Pattern Matching Using Regular Expressions   178
4.13 Another Example   182
4.14 Errors in Scripts   184
Summary   186
Review Questions   188
Exercises   190
Contents    xv


5 JavaScript and HTML Documents 193


5.1 The JavaScript Execution Environment   194
5.2 The Document Object Model   195
5.3 Element Access in JavaScript   199
5.4 Events and Event Handling   201
5.5 Handling Events from Body Elements   205
5.6 Handling Events from Button Elements   207
5.7 Handling Events from Text Box and Password Elements   212
5.8 The DOM 2 Event Model   222
5.9 The canvas Element   228
5.10 The navigator Object   232
5.11 DOM Tree Traversal and Modification   234
Summary   235
Review Questions   236
Exercises   237

6 Dynamic Documents with JavaScript 239


6.1 Introduction   240
6.2 Positioning Elements   240
6.3 Moving Elements   246
6.4 Element Visibility   249
6.5 Changing Colors and Fonts   250
6.6 Dynamic Content   254
6.7 Stacking Elements   257
6.8 Locating the Mouse Cursor   261
6.9 Reacting to a Mouse Click   263
6.10 Slow Movement of Elements   265
6.11 Dragging and Dropping Elements   268
Summary   273
Review Questions   273
Exercises   274

7 Introduction to XML 277


7.1 Introduction   278
7.2 Uses of XML   280
7.3 The Syntax of XML   281
7.4 XML Document Structure   283
7.5 Namespaces   285
xvi    Contents   

7.6 XML Schemas   286


7.7 Displaying Raw XML Documents   294
7.8 Displaying XML Documents with CSS   296
7.9 XSLT Style Sheets   298
7.10 XML Processors   307
7.11 Web Services   309
Summary   311
Review Questions   312
Exercises   313

8 Introduction to Flash 315


8.1 Origins and Uses of Flash   316
8.2 A First Look at the Flash Authoring Environment   316
8.3 Drawing Tools   322
8.4 Static Graphics   331
8.5 Animation and Sound   336
8.6 User Interactions   347
Summary   352
Review Questions   353
Exercises   355

9 Introduction to PHP 357


9.1 Origins and Uses of PHP   358
9.2 Overview of PHP   358
9.3 General Syntactic Characteristics   359
9.4 Primitives, Operations, and Expressions   360
9.5 Output   365
9.6 Control Statements   367
9.7 Arrays   371
9.8 Functions   379
9.9 Pattern Matching   383
9.10 Form Handling   386
9.11 Cookies   392
9.12 Session Tracking   394
Summary   395
Review Questions   396
Exercises   398
Contents    xvii

10 Introduction to Ajax 401


10.1 Overview of Ajax   402
10.2 The Basics of Ajax   405
10.3 Return Document Forms   415
10.4 Ajax Toolkits   419
10.5 Security and Ajax   427
Summary   428
Review Questions   428
Exercises   429

11 Java Web Software 431


11.1 Introduction to Servlets   432
11.2 The NetBeans Integrated Development Environment   437
11.3 A Survey Example   445
11.4 Storing Information on Clients   453
11.5 JavaServer Pages   462
11.6 JavaBeans   474
11.7 Model-View-Controller Application Architecture   479
11.8 JavaServer Faces   480
Summary   488
Review Questions   489
Exercises   491

12 Introduction to ASP.NET 493


12.1 Overview of the .NET Framework   494
12.2 A Bit of C#   497
12.3 Introduction to ASP.NET   502
12.4 ASP.NET Controls   508
12.5 ASP.NET AJAX   539
12.6 Web Services   544
Summary   553
Review Questions   555
Exercises   556
xviii    Contents   

13 Database Access through the Web 559


13.1 Relational Databases   560
13.2 An Introduction to the Structured Query Language   562
13.3 Architectures for Database Access   567
13.4 The MySQL Database System   569
13.5 Database Access with PHP and MySQL   572
13.6 Database Access with JDBC and MySQL   581
13.7 Database Access with ASP.NET and MySQL   588
Summary   595
Review Questions   596
Exercises   598

14 Android Software Development 599


14.1 Overview   600
14.2 The Tools   602
14.3 The Architecture of Android Applications   602
14.4 The Execution Model for Android Applications   603
14.5 View Groups   605
14.6 Simple Views   606
14.7 An Example Application   609
14.8 Running an Application on an Android Device   618
14.9 Using the Intent Class to Call Other Activities   619
14.10 An Example Application: A Second Activity   620
14.11 More Widgets   628
14.12 Dealing with Lists   632
14.13 Data Persistence   637
14.14 Debugging Applications   641
Summary   643
Review Questions   644
Exercises   645
Contents    xix

15 Introduction to Ruby 647


15.1 Origins and Uses of Ruby   648
15.2 Scalar Types and Their Operations   648
15.3 Simple Input and Output   656
15.4 Control Statements   659
15.5 Fundamentals of Arrays   664
15.6 Hashes   669
15.7 Methods   671
15.8 Classes   676
15.9 Blocks and Iterators   681
15.10 Pattern Matching   684
Summary   687
Review Questions   687
Exercises   688

16 Introduction to Rails 691


16.1 Overview of Rails   692
16.2 Document Requests   694
16.3 Rails Applications with Databases   700
Summary   718
Review Questions   719
Exercises   720

Appendix A Introduction to Java   721


A.1 Overview of Java   722
A.2 Data Types and Structures   724
A.3 Classes, Objects, and Methods   726
A.4 Interfaces  730
A.5 Exception Handling  730
Summary   735

Appendix B Named Colors and Their Hexadecimal Values   737

Index   741
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
Exploring the Variety of Random
Documents with Different Content
So well as I am; I can tell thee that
Will please thee, for when all else left my cause,
My very adversaries took my part.

Long. —Whosoever told you that, abused you.

Mont. Credit me, he took my part


When all forsook me.

Long. Took it from you.

Mont. Yes I mean so, and I think he had just cause


To take it, when the verdict gave it him.

Dub. His Spirit would ha' sunk him, e'r he could


Have carried an ill fortune of this weight so lightly.

Mont. Nothing is a misery, unless our weakness apprehend it so;


We cannot be more faithful to our selves
In any thing that's manly, than to make
Ill fortune as contemptible to us
As it makes us to others.

Enter Lawyers.
Long. Here come they
Whose very countenances will tell you how
Contemptible it is to others.

Mont. Sir?

Long. The Sir of Knighthood may be given him, e'r


They hear you now?

Mont. Good Sir but a word.

Dub. How soon the loss of wealth makes any man


Grow out of knowledge.

Long. Let me see, I pray, Sir,


Never stood you upon the Pillory?

1 Law. The Pillory?

Long. Oh now I know you did not.


Y'ave ears, I thought ye had lost 'em; pray observe,
Here's one that once was gracious in your eyes.

1 Law. Oh my Lord, have an eye upon him.

Long. But ha' you ne'er a Counsel to redeem


His Land yet from the judgement?

2 Law. None but this, a Writ of error to remove the cause.


Long. No more of error, we have been in that too much already.
2 Law. If you will reverse the judgement, you must trust to that
delay.
Long. Delay? indeed he's like to trust to that,
With you has any dealing.

2 Law. E'r the Law proceeds to an Habere facias possessionem.


Dub. That's a language Sir, I understand not.
Long. Th'art a very strange unthankful fellow to have taken Fees of
such a liberal measure, and then give a man hard words for's
money.

1 Law. If men will hazard their salvations,


What should I say? I've other business.

Mont. Y'are i'th' right;


That's it you should say, now prosperity has left me.

Enter two Creditors.

1 Cred. Have an eye upon him; if


We lose him now, he's gone for ever; stay
And dog him: I'll go fetch the Officers.

Long. Dog him you Bloud-hound: by this point thou shalt more
safely dog an angry Lion, than attempt him.
Mont. What's the matter?

Long. Do but stir to fetch a Serjeant; and besides your loss


Of labour, I'll have you beaten, till
Those casement in your faces be false lights.

Dub. Falser than those you sell by.


Mont. Who gave you Commission to abuse my friends thus?
Lon. Sir, are those your friends that would betray you?
Mont. 'Tis to save themselves rather than betray me.
1 Cred. Your Lordship makes a just construction of it.
2 Cred. All our desire is but to get our own.
Long. Your wives desires and yours do differ then.
Mont. So far as my ability will go
You shall have satisfaction Longeville.

Long. And leave your self neglected; every man


Is first a debtor to his own demands, being honest.

Mont. As I take it, Sir, I did


Not entertain you for my Counselor.

Long. Counsel's the office of a servant,


When the master falls upon a danger; as
Defence is; never threaten with your eyes,
They are no cockatrices; do you hear?
Talk with [a] Girdler, or [a] Mill'ner,
He can inform you of a kind of men
That first undid the profit of those trades
By bringing up the form of carrying
Their Morglays in their hands: with some of those
A man may make himself a priviledge
To ask a question at the prison gates
Without your good permission.

2 Cred. By your leave.

Mont. Stay Sir, what one example since the time


That first you put your hat off to me, have
You noted in me to encourage you
To this presumption? by the justice now
Of thine own rule, I should begin with thee,
I should turn thee away ungratified
For all thy former kindness, forget
Thou ever didst me any service: 'tis not fear
Of being arrested, makes me thus incline
To satisfy you; for you see by him,
I lost not all defences with my state;
The curses of a man to whom I am
Beholding terrify me more, than all
The violence he can pursue me with.
Duboys, I did prepare me for the worst;
These two small Cabinets do comprehend
The sum of all the wealth that it hath pleased
Adversity to leave me, one as rich
As th'other, both in Jewels; take thou this,
And as the Order put within it shall
Direct thee, distribute it half between
Those Creditors, and th' other half among
My servants: for (Sir) they are my Creditors
As well as you are, they have trusted me
With their advancement: if the value fail,
To please you all, my first increase of means
Shall offer you a fuller payment; be content
To leave me something, and imagine that
You put a new beginner into credit.

Cred. So prosper our own blessings, as we wish you to


your merit.

Mont. Are you[r] silences of discontent, or of sorrow?

Dub. Sir, we would not leave you.

Long. Do but suffer us to follow you, and what our present


means, or industries hereafter can provide, shall serve you.

Mont. Oh desire me not to live


To such a baseness, as to be maintained
By those that serve me; pray begone, I will
Defend your honesties to any man
That shall report you have forsaken me;
I pray begone. [Exeunt Servants
Why, dost thou weep my boy, and
Because I do not bid thee go to[o]? Creditors.
Ver. No, I weep (my Lord) because I would not go;
I fear you will command me.

Mont. No my child,
I will not; that would discommend th' intent
Of all my other actions: thou art yet
Unable to advise thy self a course,
Should I put thee to seek it; after that
I must excuse, or at the least forgive
Any [un]charitable deed that can be done against my self.

Ver. Every day (my Lord) I tarry with you, I'll account
A day of blessing to me; for I shall
Have so much less time left me of my life
When I am from you: and if misery
Befall you (which I hope so good a man
Was never born to) I will take my part,
And make my willingness increase my strength
To bear it. In the Winter I will spare
Mine own cloth[e]s from my self to cover you;
And in the Summer, carry some of yours
To ease you: I'll doe any thing I can.

Mont. Why, thou art able to make misery


Ashamed of hurting, when thy weakness can
Both bear it, and despise it: Come my boy
I will provide some better way for thee
Than this thou speakst of: 'tis the comfort that
[Ill] fortune has undone me into the fashion:
For now in this age most men do begin,
To keep but one boy, that kept many men. [Exeunt.

Enter Orleans, a Servant, his Lady


following.
Orl. Where is she? call her.

Lady. I attend you Sir.

Orl. Your friend sweet Madam.

Lady. What friend, good my Lord?

Orl. Your Montague, Madam, he will shortly want


Those Courtly graces that you love him for;
The means wherewith he purchased this, and this;
And all his own provisions to the least
Proportion of his feeding, or his clothes,
Came out of that inheritance of land
Which he unjustly lived on: but the law
Has given me right in't, and possession; now
Thou shalt perceive his bravery vanish, as
This Jewell does from thee now, and these Pearls
To him that owes 'em.

Lady. Ye are the owner Sir of every thing that does belong to me.
Orl. No, not of him, sweet Lady.

Lady. O good [God]!

Orl. But in a while your mind will change, and be


As ready to disclaim him; when his wants
And miseries have perish'd his good face,
And taken off the sweetness that has made
Him pleasing in a womans understanding.

La. O Heaven, how gratious had Creation been


To women, who are born without defence,
If to our hearts there had been doors through which
Our husbands might have lookt into our thoughts,
And made themselves undoubtfull.

Orl. Made 'em mad.

La. With honest women.

Orl. Thou dost still pretend


A title to that virtue: prethee let
Thy honesty speak freelie to me now.
Thou know'st that Montague, of whose Land
I [a]m the master, did affect thee first,
And should have had thee, if the strength of friends
Had not prevail'd above thine own consent.
I have undone him; tell me how thou dost
Consider his ill fortune and my good.

La. I'll tell you justly his undoing is


An argument for pity and for tears
In all their dispositions that have known
The honor and the goodness of his life:
Yet that addition of prosperity,
Which you have got by't, no indifferent man
Will li i t if th L
Will malice or repine at, if the Law
Be not abused in't; howsoever since
You have the upper fortune of him, 'twill
Be some dishonor to you to bear your self
With any pride or glory over him.

Orl. This may be truely spoken, but in thee


It is not honest.

La. Yes, so honest, that I care not if the chast Penelope


Were now alive to hear me.

Enter Amiens.
Orl. Who comes there?

La. My brother.

Am. Save ye.

Orl. Now Sir, you have heard of prosperous Montague.

Am. No Sir, I have heard of Montague,


But of your prosperity.

Orl. Is he distracted.

Am. He does bear his loss with such a noble strength


Of patience that,
Had fortune eyes to see him, she would weep
For having hurt him, and pretending that
Shee did it but for triall of his worth:
Hereafter ever love him.

Orl. I perceive you love him, and because (I must confess)


He does deserve that though for some respects,
I have not given him that acknowledgement,
Yet in mine honor I did still conclude to use him nobly.

Am. Sir, that will become your reputation and make me


grow proud of your alliance.

Orl. I did reserve the doing of this friendship till I had


His fortunes at my mercy, that the world
May tell him 'tis a willing courtesie.

La. This change will make me happy.

Orl. 'Tis a change; thou shalt behold it: then observe me when
That Montague had possession of my Land,
I was his rivall, and at last obtain'd
This Lady who, by promise of her own
Affection to him, should ha' bin his wife;
I had her, and withheld her like a pawn,
Till now my Land is rend'red to me again,
And since it is so, you shall see I have
The conscience not to keep her—give him her— [draws.

For by the faithfull temper of my sword, she shall not tarry with me.

Am. Give me way— [draws.


Thou most unworthy man—give me way;
Or by the wrong he does the Innocent,
I'll end thy misery and his wickedness, together.

Lady. Stay and let me justifie


My husband in that, I have wrong'd his bed.
[Exeunt Am. Orl.
Enter Orleans in amazement, the
servants following him.

Never—all shames that can afflict me fall


Upon me if I ever wrong'd you;

Orl. Didst thou not confess it;

La. 'Twas to save your blood from shedding, that has


Turn'd my brothers edge;
He that beholds our thoughts as plainely as
Our faces, knowes it, I did never hurt
My honesty but by accusing it.

Orl. Womens consents are sooner credited


Than their denials: and I'll never trust
Her body that prefers any defence
Before the safety of her honor—here
Enter Servant.

Show forth that stranger—give me not a word.


Thou seest a danger readie to be tempted.

La. Cast that upon me rather than my shame,


And as I am now dying I will vow
That I am honest.

Orl. Put her out of dores; but that I fear my land


May go again to Montague, I would kill thee, I am loth,
To make a beggar of him that way; or else—
Go now you have the liberty of flesh,
And you may put it to a double use,
One for your pleasure, th'other to maintain
Your wellbeloved, he will want. [Exit Lady.
In such a charitable exercise
The virtue will excuse you for the vice. [Exit Orleans.

Enter Amiens drawn, Montague, Veramor


meeting.
Mont. What means your Lordship?

Ver. For the love of [God].

Am. Thou hast advantage of me, cast away this buckler.

Mont. So he is Sir, for he lives


With one that is undone—avoyd us boy.

Ver. I'll first avoid my safety,


Your Rapier shall be button'd with my head, before it touch
my Master.

Am. Montague?

Mont. Sir.

Am. You know my sister?

Mont. Yes Sir.

Am. For a whore?

Mont. You lye, and shall lie lower if you dare abuse her honor.

Enter Lady.
La. I am honest.

Am. Honest!

La. Upon my faith I am.

Am. What did then p[e]rsuade thee to condemn thy self?

La. Your safety.

Am. I had rather be expos'd


To danger, than dishonor; th'ast betray'd
The reputation of my familie
More basely by the falseness of that word,
Than if thou hadst delivered me asleep
Into the hands of base enemies.
Relief will never make thee sensible
Of thy disgraces; let thy wants compell thee to it. [Exit.

La. O I am a miserable woman.

Mont. Why Madam? are you utterly without means to relieve you?

La. I have nothing Sir, unless by changing of these cloaths for worse,
and then at last the worst for nakedness.
Mont. Stand off boy, nakedness would be a change
To please us Madam, to delight us both.

La. What nakedness Sir?

Mont. Why the nakedness of body Madam, we were Lovers once.

La. Never dishonest Lovers.

Mont. Honestie has no allowance now to give our selves.

La. Nor you allowance against honestie.

Mont. I'll send my Boy hence, opportunitie


Shall be our servant, come and meet me first
With kisses like a stranger at the door,
And then invite me nearer to receive
A more familiar inward wellcome; where,
Instead of tapers made of Virgins wax
Th'increasing flames of our desires shall light
Us to a banquet: and before the taste
Be dull with satisfaction, I'll prepare
A nourishment compos'd of every thing
That bears a naturall friendship to the blood,
And that shall set another edge upon 't,
Or else between the courses of the feast
We'll dallie out an exercise of time,
That ever as one appetite expires another may succeed it.

La. O my Lord, how has your nature lost her worthiness!


When our affections had their liberty,
Our kisses met as temperatelie as
The hands of sisters, or of brothers, that
Our bloods were then as moving; then you were
So noble, that I durst have trusted your
Embraces in an opportunity
Sil t ht i h
Silent enough to serve a ravisher,
And yet come from you—undishonor'd—how
You think me altered, that you promise your
Attempt success I know not; but were all
The sweet temptations that deceive us set
On this side, and [on] that side all the waiters,
These neither should p[e]rsuade me, nor these force.

Mont. Then misery may waste your body.

Lady. Yes, but lust shall never.

Mont. I have found you still as uncorupted as I left you first


Continue so; and I will serve you with
As much devotion as my word, my hand
Or purse can show you; and to justifie
That promise, here is half the wealth I have,
Take it, you owe me nothing, till you fall
From virtue, which the better to protect
I have bethought me of a present means:
Give me the Letter; this commends my Boy
Into the service of a Lady, whose
Free goodness you have bin acquainted with, Lamira.

Lady. Sir I know her.

Mont. Then believe her entertainment will be noble to you;


My boy shall bring you thither: and relate
Your manner of misfortune if your own
Report needs any witness: so I kiss your hand good Lady.

Lady. Sir, I know not how to promise, but I cannot be unthankfull.


Mont. All that you can implore in thankfulness
Be yours, to make you the more prosperous.
Farwell my boy,—I am not yet oppress'd.
Having the power to helpe one that's[Exit Lady Vere.
distress'd. [Exeunt.
Actus Secundi. Scæna Prima.
Enter Longaville and Dubois.
Long. W hat shall we do now: swords are out of use,
And words are out of credit.

Dub. We must serve.

L[o]ng. The means to get a service will first spend


Our purses; and except we can allow
Our selves an entertainment, service will
Neglect us; now 'tis grown into a doubt
Whether the Mr. or the servants gives the countenance.

Dub. Then fall in with Mistresses.

Long. They keep more servants now (indeed) than men,


But yet the age is grown so populous
Of those attendants, that the women are
Grown full too.

Dub. What shall we propound our selves?

Long. I'll think on't.

Dub. Do; Old occupations have too many setters up to


prosper, some uncommon trade would thrive now.

Long. Wee'll e'en make up some half a dozen proper men.


And should not we get more
Than all your female sinners?

Dub. If the house be seated as it should be privately.

Long. I, but that would make a multitude of witches.

Dub. Witches? how prethee?

Long. Thus the bauds would all turn witches to revenge


Themselves upon us, and the women that
Come to us, for disguises must wear beards,
And that's they say, a token of a witch.

Dub. What shall we then do.

Long. We must study on't


With more consideration; stay Duboyes
Are not the Lord of Orleans and the Lord
Of Amiens enemies?

Dub. Yes, what of that.

Long. Methinks the factions of two such great men.


Should give a promise of advancement now
To us that want it.

Dub. Let the plot be thine, and in the enterprize I'll second thee.

Long. I have it, we will first set down our selves


The Method of a quarrell; and make choyce
Of some frequented Tavern; or such a place
Of common notice, to perform it in
By way of undertaking to maintain
The severall honors of those enemies.
Thou for the Lord of Orleans; I for Amiens.

Dub. I like the project, and I think 'twill take


The better, since their difference first did rise
From his occasion whom we followed once.

Long. We cannot hope less after the report,


Than entertainment or gratuity,
Yet those are ends, I do not aim at most;
Great spirits that are needy, and will thrive,
Must labour whiles such troubles are alive. [Exeunt.
Enter Laverdine and La-poope.
La-p. Slander is sharper than the sword. I have fed this three dayes
upon leaf Tobacco, for want of other Victuals.
Lav. You have liv'd the honester Captain; but be not so dejected, but
hold up thy head, and meat will sooner fall i'thy mouth.
La-p. I care not so much for meat, so I had but good liquor, for
which my guts croak like so many Frogs for rain.
Lav. It seems, you are troubled with the wind-Collick, Captain,
swallow a bullet: 'tis present remedy I'll assure you.
La-p. A bullet? I'll tell you Sir, my panch is nothing but a pile of
bullets; when I was in any service I stood between my Generall and
the shot, like a mud-wall; I am all lead, from the crown of the head
to the soal of the foot, not a sound bone about me.
La[v]. It seems you have bin in terrible hot service Captain.
La-p. It has ever bin the fate of the low Country wars to spoil many
a man, I ha' not bin the first nor shall not be the last: but I'll tell you
Sir, (hunger has brought it in to mind) I served once at the Siege of
Braste, 'tis memorable to this day, where we were in great distress
for victuals, whole troops fainted more for want of food then for
blood, and died, yet we were resolved to stand it out; I my self was
but then Gentleman of a Company, and had as much need as any
man, and indeed I had perished had not a miraculous providence
preserved me.
Lav. As how good Captain?
La-p. Marry Sir, e'en as I was fainting and falling down for want of
sustenance, the enemy made a shot at me, and struck me full ith'
paunch with a penny loaf.
Lav. Instead of a bullet!
La-p. In stead of a bullet.
Lav. That was miraculous indeed; and that loaf sustained you.
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookmasss.com

You might also like