100% found this document useful (1 vote)
21 views

Developing Responsive Web Applications with AJAX and jQuery 1st Edition Sandeep Kumar Patel - Download the full ebook now for a seamless reading experience

The document provides information about the book 'Developing Responsive Web Applications with AJAX and jQuery' by Sandeep Kumar Patel, which focuses on creating responsive web applications using Java, jQuery, and AJAX. It includes links to download the book and other related resources, as well as details about the author and reviewers. Additionally, the document outlines the book's contents, including chapters on responsive design, dynamic visuals, and integration with social media and e-commerce platforms.

Uploaded by

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

Developing Responsive Web Applications with AJAX and jQuery 1st Edition Sandeep Kumar Patel - Download the full ebook now for a seamless reading experience

The document provides information about the book 'Developing Responsive Web Applications with AJAX and jQuery' by Sandeep Kumar Patel, which focuses on creating responsive web applications using Java, jQuery, and AJAX. It includes links to download the book and other related resources, as well as details about the author and reviewers. Additionally, the document outlines the book's contents, including chapters on responsive design, dynamic visuals, and integration with social media and e-commerce platforms.

Uploaded by

alexoumeyr
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/ 47

Visit https://ebookultra.

com to download the full version and


explore more ebooks or textbooks

Developing Responsive Web Applications with AJAX


and jQuery 1st Edition Sandeep Kumar Patel

_____ Click the link below to download _____


https://ebookultra.com/download/developing-responsive-web-
applications-with-ajax-and-jquery-1st-edition-sandeep-kumar-
patel/

Explore and download more ebooks or textbooks at ebookultra.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Flask Web Development Developing Web Applications With


Python 2nd Edition Miguel Grinberg

https://ebookultra.com/download/flask-web-development-developing-web-
applications-with-python-2nd-edition-miguel-grinberg/

Developing Web Components UI from jQuery to Polymer 1st


Edition Jarrod Overson

https://ebookultra.com/download/developing-web-components-ui-from-
jquery-to-polymer-1st-edition-jarrod-overson/

Build Your Own AJAX Web Applications 1st Edition Matthew


Eernisse

https://ebookultra.com/download/build-your-own-ajax-web-
applications-1st-edition-matthew-eernisse/

Responsive Web Design with HTML5 and CSS3 2nd Edition Ben
Frain

https://ebookultra.com/download/responsive-web-design-with-html5-and-
css3-2nd-edition-ben-frain/
AJAX and PHP Building Modern Web Applications 2nd Edition
Bogdan Brinzarea

https://ebookultra.com/download/ajax-and-php-building-modern-web-
applications-2nd-edition-bogdan-brinzarea/

AJAX Creating Web Pages with Asynchronous JavaScript and


XML 1st Edition Edmond Woychowsky

https://ebookultra.com/download/ajax-creating-web-pages-with-
asynchronous-javascript-and-xml-1st-edition-edmond-woychowsky/

Developability of Biotherapeutics Computational Approaches


1st Edition Sandeep Kumar

https://ebookultra.com/download/developability-of-biotherapeutics-
computational-approaches-1st-edition-sandeep-kumar/

Developing Web Apps with Haskell and Yesod 2nd Edition


Michael Snoyman

https://ebookultra.com/download/developing-web-apps-with-haskell-and-
yesod-2nd-edition-michael-snoyman/

Developing applications with enterprise SOA 1st Edition


Martin Huvar

https://ebookultra.com/download/developing-applications-with-
enterprise-soa-1st-edition-martin-huvar/
Developing Responsive Web Applications with AJAX and
jQuery 1st Edition Sandeep Kumar Patel Digital Instant
Download
Author(s): Sandeep Kumar Patel
ISBN(s): 9781782162209, 1783980362
Edition: 1
File Details: PDF, 5.72 MB
Year: 2014
Language: english
Developing Responsive
Web Applications with
AJAX and jQuery

Design and develop your very own responsive web


applications using Java, jQuery, and AJAX

Sandeep Kumar Patel

BIRMINGHAM - MUMBAI
Developing Responsive Web Applications with AJAX
and jQuery

Copyright © 2014 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.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: July 2014

Production reference: 1180714

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham B3 2PB, UK.

ISBN 978-1-78328-637-9

www.packtpub.com

Cover image by Abhishek Pandey ([email protected])


Credits

Author Project Coordinator


Sandeep Kumar Patel Aaron S. Lazar

Reviewers Proofreaders
Fernando Doglio Simran Bhogal
Md. Zahid Hasan Paul Hindle
Mohammad Amzad Hossain
Indexers
Jake Kronika
Hemangini Bari

Commissioning Editor Rekha Nair


Julian Ursell Priya Subramani

Acquisition Editor Graphics


Mohammad Rizvi Abhinash Sahu

Content Development Editor Production Coordinator


Balaji Naidu Shantanu Zagade

Technical Editors Cover Work


Venu Manthena Shantanu Zagade
Mrunmayee Patil

Copy Editors
Roshni Banerjee
Sarang Chari
Janbal Dharmaraj
Gladson Monteiro
Deepa Nambiar
Karuna Narayanan
Adithi Shetty
About the Author

Sandeep Kumar Patel is a senior web developer and the founder of


www.tutorialsavvy.com, a widely-read programming blog since 2012. He has
more than 4 years of experience in object-oriented JavaScript and JSON-based web
application development. He is GATE 2005 Information Technology (IT) qualified
and has a Master's degree from VIT University, Vellore. At present, he holds the
position of Web Developer in SAP Labs, India. You can find out more about him
from his LinkedIn profile (http://www.linkedin.com/in/techblogger).
He has received the DZone Most Valuable Blogger (MVB) award for technical
publications related to web technologies. His article can be viewed at
http://www.dzone.com/users/sandeepgiet. He has also received the Java
Code Geek (JCG) badge for a technical article published in JCG. His article can be
viewed at http://www.javacodegeeks.com/author/sandeep-kumar-patel/.
About the Reviewers

Fernando Doglio has been working as a web developer for the past 10 years.
During that time, he fell in love with the Web and has had the opportunity of
working with most of the leading technologies such as PHP, Ruby on Rails,
MySQL, Node.js, AngularJS, AJAX, REST APIs, and others.

In his spare time, he likes to tinker and learn new things, which is why his
GitHub account keeps getting new repos every month. He's also a big open
source supporter and tries to win the support of new people with the help
of his site: http://www.lookingforpullrequests.com/. He can be contacted
on Twitter at @deleteman123.

When not programming, he can be seen spending time with his family.

Md. Zahid Hasan is a professional web developer. He got his BSc and MSc in
Information and Communication Engineering from University of Rajshahi (RU),
Rajshahi. Now, he is working as a Lecturer in the department of Computer Science
and Engineering at Green University of Bangladesh. He previously worked as a
Software Developer at SEleven IT Limited for 2 years in Bangladesh.

He has a wide range of technical skills, Internet knowledge, and experience across
the spectrum of online development in the service of building and improving online
properties for multiple clients. He enjoys creating site architecture and infrastructure,
backend development using open source tools such as Linux, Apache, MySQL,
and PHP (LAMP), and frontend development with CSS and HTML/XHTML.
Mohammad Amzad Hossain has 7 years of experience building large-scale
complex websites and web applications. He works as a Branch Manager in Sourcetop
Inc. where he leads an offshore team in Dhaka, Bangladesh. His day-to-day life
requires him to plan, analyze, guide, and provide solutions for complex requirements.
In his free time, he digs into recent trends in web development and follows hundreds
of RSS that help him to keep up in the fast-track world of development. He has a BSc
degree in Computer Science Engineering.

Jake Kronika, a software developer and UI architect with over 20 years of


experience, brings to bear extensive proficiency implementing both server-side and
user interface (UI) solutions including multiple responsive web applications to date.

He began his career early in life using online tools for static content and rapidly
progressed to building dynamic applications incorporating databases and server-side
scripting languages. He has been a Senior User Interface Software Engineer at ADP
Dealer Services in Seattle, WA, USA from 2011. Prior to this, he occupied numerous
senior-level positions in the UI space in Chicago, IL. He has also balanced considerable
freelance work under a sole proprietorship named Gridline Design & Development,
accessible at http://gridlined.com/, online since 1999.

Over the past several years, particularly as the HTML, CSS, and JavaScript portions
of websites have experienced rapid evolution, he has continually sought out and
digested new technological knowledge through reading, personal and client projects,
and other means. Some of his favorite current tools include Node.js and AngularJS,
Less/Sass, and Git VCS.

Prior to this book, he was a technical reviewer for the following Packt
Publishing titles:

• Django JavaScript Integration: AJAX and jQuery, Jonathan Hayward,


in January 2011
• jQuery UI 1.8: The User Interface Library for jQuery, Dan Wellman,
in August 2011
• jQuery Tools UI Library, Alex Libby, in February 2012
www.PacktPub.com

Support files, eBooks, discount offers, and more


You might want to visit www.PacktPub.com for support files and downloads related to
your book.

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 [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up
for a range of free newsletters and receive exclusive discounts and offers on Packt books
and eBooks.

TM

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital
book library. Here, you can access, read and search across Packt's entire library of books.

Why subscribe?
• Fully searchable across every book published by Packt
• Copy and paste, print and bookmark content
• On demand and accessible via web browser

Free access for Packt account holders


If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view nine entirely free books. Simply use your login credentials for
immediate access.
Table of Contents
Preface 1
Chapter 1: Introduction to a Responsive Web Application 7
Benefits of a responsive design 8
Server- versus client-side detection 9
The technology stack 9
HTML5 10
CSS3 and media queries 10
JavaScript 11
Measuring responsiveness 11
Devices and screens 12
Media types 12
Media queries 14
Role of media queries 15
Responsive frameworks 15
Bootstrap 16
The Foundation framework 16
The Cascade framework 16
The Pure CSS framework 17
The Gumby framework 17
Bootstrap 3 for a responsive design 17
What are we building? 18
Summary 19
Table of Contents

Chapter 2: Creating a Responsive Layout for a Web Application 21


Required software and tools 21
Setting up a Java-based web project 22
Configuring Bootstrap 3 25
Creating a wireframe for a web application 27
Responsive layouts 28
Creating a layout for large and small devices 29
Developing the layout 29
Bootstrap 3 containers 29
Developing a row 31
Developing the menu section 33
Developing the hero section 35
Developing the list of products section 36
The combined layout 41
Verifying the layout 45
The Opera Mobile emulator 45
Summary 52
Chapter 3: Adding Dynamic Visuals to a Web Application 53
Building a JSON servlet 53
Creating a POJO class 53
Creating a product store 55
Converting from POJO to JSON 58
Creating the servlet 58
Building a jQuery AJAX method 62
jQuery promises 64
The jQuery templating mechanism 66
The combined jQuery code 68
The combined HTML markup 69
Modifying the style of the product 71
Building an image carousel 74
Summary 79
Chapter 4: Twitter Integration 81
Introduction to Twitter4J 81
Configuring Twitter4J in a web application 82
Posting a tweet 83
Creating a Twitter button 83
Setting up a new Twitter application 86
The Twitter Permissions tab 88
The Twitter Details tab 89
The Twitter Settings tab 90
The Twitter API Keys tab 90

[ ii ]
Table of Contents

Developing a Twitter servlet 91


Request token 93
Developing a Twitter callback servlet 96
Access token 96
Combining all the pieces 98
Posting a tweet with an image 102
Product store with an image 103
Markup changes 106
Changes in app.js 107
Twitter servlet changes 108
Changes in the Twitter callback servlet 110
User Twitter timeline 111
Summary 111
Chapter 5: Facebook Integration 113
Introduction to the Facebook SDK for JavaScript 113
Creating a Facebook application 115
Configuring the Facebook SDK 117
The Settings tab 118
The Basic configuration 118
The Advanced configuration 119
The Migrations configuration 120
Configuring a Facebook login 120
Configuring the Facebook Like and Share buttons 122
Configuring Facebook comments 127
The combined code 128
Summary 136
Chapter 6: Google+ Integration 137
Introduction to the Google+ API 137
Configuring Google+ 139
Creating a client ID 139
Including the Google script 141
Log in using Google+ 142
Integrating +1 recommendations 144
Summary 149
Chapter 7: Linking Dynamic Content from External Websites 151
Introduction to the YouTube API 151
Configuring a YouTube API 151
Searching for a YouTube video 154
The part parameter 156
The fields parameter 156
The YouTube button markup 156
[ iii ]
Table of Contents

Asynchronous search in YouTube 158


Rendering the YouTube search results 162
Embedding a YouTube video 165
Summary 169
Chapter 8: Integrating E-Commerce or Shopping Applications
with Your Website 171
Creating a shopping cart 171
Adding a product to the cart 171
Displaying the minimal view of the cart 173
Displaying the cart details in a table 174
Configuring the PayPal Developer API 178
Integrating the PayPal Developer API 180
Configuring the Shopify API 191
Integrating the Shopify API 192
Summary 194
Chapter 9: Integrating the Google Currency Converter with
Your Web Application 195
The Google Currency Converter API 195
Configuring the Google Currency Converter API 198
Integrating the Currency Converter API 198
Developing our currency converter 199
Building the currency list dropdown 199
Processing the conversion request 203
Exceptions 208
Summary 208
Chapter 10: Debugging and Testing 209
Implementing the debugging mechanism 210
Dimensions Toolkit 210
The Designmodo Responsive Test tool 210
The Opera Mobile emulator tool 211
The Responsinator tool 211
The Viewport Resizer tool 212
The L-Square Responsive Design Inspector tool 212
The FireBreak add-on 212
The More Display Resolutions 1.0 add-on 213
The BrowserStack Responsive tool 214

[ iv ]
Table of Contents

The MobileTest tool 214


The TestSize tool 215
The Am I Responsive tool 215
The Responsive Design Checker tool 216
The RUIT tool 216
The Responsive Test online tool 217
Testing the app as a whole 217
Summary 219
Index 221

[v]
Preface
Welcome to Developing Responsive Web Applications with AJAX and jQuery. If you
want to learn and understand responsive layout development or social application
integration using AJAX and jQuery, then this book is for you. It covers a systematic
approach for building a responsive web application.

All the key features of a responsive application are explained with the detailed
code. It also explains how to debug and test a responsive web application
during development.

What this book covers


Chapter 1, Introduction to a Responsive Web Application, introduces you to the
responsiveness of an application and lists the key benefits of a responsive
application for a commercial site.

Chapter 2, Creating a Responsive Layout for a Web Application, explains how to develop
a layout that will support different screen sizes to render using Bootstrap 3.

Chapter 3, Adding Dynamic Visuals to a Web Application, explains how to make


a jQuery AJAX call for JSON data and render content in different parts of the
web application.

Chapter 4, Twitter Integration, demonstrates how to integrate the Twitter4J library to


incorporate different features such as tweets and posts from the web application.

Chapter 5, Facebook Integration, demonstrates how to integrate the Facebook SDK to


add the Facebook login and Like features in the web application.

Chapter 6, Google+ Integration, shows how to integrate the Google+ login and +1
feature into the web application.
Preface

Chapter 7, Linking Dynamic Content from External Websites, explains how to integrate
the YouTube API to embed a recommended video into a web application.

Chapter 8, Integrating E-Commerce or Shopping Applications with Your Website, illustrates


the integration of the PayPal payment API into the application. Also, it introduces
the integration of the Shopify API into the application.

Chapter 9, Integrating the Google Currency Converter with Your Web Application,
explains how to integrate the Google Currency API to help a user see the amount
in a different currency.

Chapter 10, Debugging and Testing, introduces the different available online and offline
tools to test a responsive application during development.

What you need for this book


The following list of tools and libraries are required for this book:

• Eclipse IDE for Java EE Developers


• Apache Tomcat 7.0
• Bootstrap 3.0
• jQuery 2.1.0

Who this book is for


This book is for Java web developers who want to create responsive web
applications. This book is also helpful for those who want to learn about the
integration of social applications into existing web applications. Finally, the book
is for everyone interested in better understanding AJAX-based responsive web
application development.

Conventions
In this book, you will find a number of styles of text that distinguish between
different kinds of information. Here are some examples of these styles, and an
explanation of their meaning.

[2]
Preface

Code words in text, database table names, folder names, filenames, file extensions,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows:
"The data-toggle attribute has the value for the effect property such as collapse."

A block of code is set as follows:


<div class="navbar-collapse collapse" id="ts-top-menu">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Category 1</a></li>
<li><a href="#">Category 2</a></li>
<li><a href="#">Category 3</a></li>
</ul>
</div>

When we wish to draw your attention to a particular part of a code block,


the relevant lines or items are set in bold:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="asset/css/bootstrap.min.css">
<title>Responsive product Store</title>
</head>
<body>
<div class="container-fluid"></div>
</body>
</html>

New terms and important words are shown in bold. Words that you see on
the screen, in menus or dialog boxes for example, appear in the text like this:
"The Arguments option is for passing additional arguments."

Warnings or important notes appear in a box like this.

Tips and tricks appear like this.

[3]
Preface

Reader feedback
Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or may have disliked. Reader feedback is important for
us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to [email protected],


and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.

Downloading the example code


You can download the example code files for all Packt books you have purchased
from your account at http://www.packtpub.com. If you purchased this book
elsewhere, you can visit http://www.packtpub.com/support and register to
have the files e-mailed directly to you.

Errata
Although we have taken every care to ensure the accuracy of our content, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in the text or
the code—we would be grateful if you would report this to us. By doing so, you can
save other readers from frustration and help us improve subsequent versions of this
book. If you find any errata, please report them by visiting http://www.packtpub.
com/submit-errata, selecting your book, clicking on the errata submission form link,
and entering the details of your errata. Once your errata are verified, your submission
will be accepted and the errata will be uploaded on our website, or added to any list of
existing errata, under the Errata section of that title. Any existing errata can be viewed
by selecting your title from http://www.packtpub.com/support.

[4]
Preface

Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media.
At Packt, we take the protection of our copyright and licenses very seriously. If you
come across any illegal copies of our works, in any form, on the Internet, please
provide us with the location address or website name immediately so that we
can pursue a remedy.

Please contact us at [email protected] with a link to the suspected


pirated material.

We appreciate your help in protecting our authors, and our ability to bring you
valuable content.

Questions
You can contact us at [email protected] if you are having a problem with
any aspect of the book, and we will do our best to address it.

[5]
Other documents randomly have
different content
an old blind Indian named Waterman was nearly suffocated when the
cowboys released him. The Indians having abandoned him refused to
care for him further and he became a burden on the whites.

At the time of the white settlement of the Virgin River Valley in the
50’s and 60’s, there were perhaps a thousand Parrusits in various
bands along the stream with their principal camping places near
Rockville, Virgin City, Toquerville, Washington Fields and Santa Clara.
These all appear to have recognized the leadership of Chief Tut-se-
gavits, head of the Tonaquint band living on the Santa Clara Creek,
and to have been held together under regular tribal control.

G. H. Heap, one of the Argonauts, described the Paiutes in 1853 in


the following uncomplimentary paragraphs:

The Pah-Utah Indians are the greatest horse thieves on the


continent. Rarely attempting the bold coup-de-main of the Utahs,
they dog travelers during their march and follow on their trail like
jackals, cutting off any stragglers whom they can surprise and
overpower, and pick up such animals as stray from the band or lag
behind from fatigue. At night lurking around the camp, and
concealing themselves behind rocks and bushes, they communicate
with each other by imitating the sounds of birds and animals. They
never ride, but use as food the horses and mules that they steal,
and, if within arrowshot of one of these animals, a poisoned shaft
secures him as their prize. Their arms are bows and arrows tipped
with obsidian, and lances sometimes pointed with iron, which they
obtain from the wrecks of wagons found along the road. They also
use a pronged stick to drag lizards from their holes.

Yearly expeditions are fitted out in New Mexico to trade with the
Pah-Utahs for their children and recourse is often had to foul
means to force their parents to part with them. So common is it to
make a raid for this purpose, that it is considered as no more
objectionable than to go on a buffalo or a mustang hunt. One of
our men, Jose Galliego [sic], who was an old hand at this species
of man-hunting, related to us with evident gusto, numerous
anecdotes on this subject; and as we approached the village he
rode up to Mr. Beale and eagerly proposed to him that we should
“charge on it like h—l, kill the mans, and maybe catch some of the
[6]
little boys and gals.”

The coming of the Mormon pioneers gradually upset the 122


Paiute government. The whites frequently settled on Indian
camp sites and occupied Indian farming lands. Their domestic
livestock ate the grass that formerly supplied the Indians with seed,
and crowded out deer and other game upon which they largely
subsisted. This interference with their movements and the reduction
in the food supply tended eventually to bring the Indians into partial
dependence upon the whites.

Within a few years, farm crops and livestock brought to the whites
more food and clothing than the Indians had ever dreamed of. No
wonder they became beggars in the towns and thieves of cattle and
horses on the range. As long as the whites were in the minority, they
used to feed the Indians. In the words of John Dennett, an old settler
of Rockville, this “gave them an idea of some other kind of food
beside grass seed and wild game.”

As the whites increased and became strong enough to defy the


Indians, the attitude changed from one of fear to that of domination.
Although they continued more or less to feed the begging Indians,
they soon put a stop to thievery on the range, punishing it in many
cases by death. This transition was marked by bitter feeling and even
by war between the races. In time, it became increasingly difficult for
the Indians to maintain themselves.

Not only was their food supply reduced, but the whites also spread
strange maladies among the Indians. Measles and smallpox are
known to have been fatal in many cases. When Silver Reef, a mining
town of 1500 people, was flourishing in the 70’s and 80’s it is known
that venereal diseases were spread among the Indians. Fatalities
from disease and the diminution of food supplies were undoubtedly
heavy factors in the drastic reduction of the Indian population. Of the
estimated thousand Parrusits living along the Virgin River in the 50’s
and 60’s, there was only one survivor (until his death in June, 1945),
an old fellow called Peter Harrison, who lived among the Shivwits
Indians on the Santa Clara reservation.

Among the neighbors of the Parrusits there remained in 1933 only


about seventy-five Kaibabits on a reservation at Moccasin, Arizona,
some fifty Shivwits on a reservation on the Santa Clara Creek, fifty
miles to the west; and about fifty Com-o-its in the vicinity of Cedar
City. The Uinkarets and several smaller groups are today entirely
extinct.

Asked to account for this tragedy, the old Kaibabits Indian George
explained it this way: “When white man come, lotsa Injuns here; alla
same white man now. Injuns heap yai-quay [meaning lots of them
die]; maybe so six, maybe so five, maybe so two in night. Purty soon
all gone. White man, he come: raise’m pompoose. Purty soon lotsa
white man.”

123
Early Explorations
Zion Canyon was known to the Indians from time immemorial, but its
discovery by white men, so far as is known, dates only from the
middle of the 19th century. However, the series of explorations in this
region which finally led to its discovery cover the period of three
quarters of a century beginning in 1776.

In that year a party of Spaniards passed through the region and


crossed the Virgin River within twenty miles of Zion Canyon without
knowing of its proximity. This was the remarkable expedition led by
Fathers Dominguez and Escalante through portions of New Mexico,
Colorado, Utah and Arizona. The object of the expedition was two-
fold. The Spanish government desired a direct route from Santa Fe,
New Mexico, to the Presidio of Monterey, California, and the priests
themselves had dreams of founding new Indian missions in the
unexplored territory beyond the Colorado River. The governor of New
Mexico furnished provisions, Father Dominguez provided the horses
and mules and Father Silvestre Velez de Escalante was the diarist of
[7]
the party.

The expedition set out July 29, 1776 from Santa Fe, passing through
explored territory as far as the Gunnison river in southwestern
Colorado, whence it struck out into the unknown. The priests were
fortunate in finding a couple of young Ute Indians from Utah Lake,
who acted as guides and who led them safely across the Colorado
(Grand) and Green Rivers up the Duchesne to its headwaters and
across the Wasatch Range to their home on Utah Lake.

Obtaining fresh guides, the party proceeded about two hundred miles
into the deserts of southwestern Utah to Black Rock Springs near
Milford, heading for the Pacific coast. They had been longer than
expected on their journeyings. Fall was rapidly advancing. A snowfall
on October 5 dashed their hopes of being able to cross the great
Sierras still blocking their path to Monterey. Provisions were getting
low and they were a long way from either Monterey or Santa Fe.
Casting of lots determined that they should go back home.

Instead of retracing their circuitous route, they determined to take a


short cut. They turned southeast, coming out of the desert 124
that now bears Escalante’s name, a few miles west of Cedar
City. The high mountains to the east forced them southward nearly a
hundred miles along the foot of the rough and rugged escarpment
known as the Hurricane Fault. This deflected them far from their
intended course.

It was on this detour that they discovered the Virgin River and came
closest to Zion Canyon. The party left the vicinity of Cedar City,
crossed over the rim of the Great Basin at Kanarra and descended
Ash Creek, tributary of the Virgin. A short distance below Toquerville
they passed the three Indian cornfields with well made irrigation
ditches, to which reference has already been made, and reached the
Virgin River at the point where Ash Creek and La Verkin Creek joined
it. Escalante called Ash Creek the Rio del Pilar. The main stream of
the Virgin River above this point he named the Sulphur River because
of the hot sulphur springs that flow into the stream about a mile
distant from the point where the great Hurricane Fault crosses the
river.

The party climbed out of the canyon alongside a volcanic ash cone or
crater standing north of the present town of Hurricane. While some
of the members of the party probably lingered to investigate the hot
sulphur springs, others went ahead across the Hurricane bench and
striking some Indian tracks, followed them out of the proper route
and found themselves in the midst of an area of red sand dunes
several miles in extent, sometimes called the Red Desert. This may
be seen from the road approaching Zion from either St. George or
Cedar City.
The sand dunes made traveling very difficult and by the time the
party had plowed its way through and stood on top of a high bluff
overlooking the corrugated valley below, both the horses and men
were so tired they could scarcely make their way down the bluff to
water at the site of old Fort Pearce. Here they found a desert shrub,
the creosote bush (Hediondilla) and tamarisk trees (supposed to have
been introduced from the old world).

Here their provisions became exhausted, and from then on they had
to subsist largely upon horse flesh and such food as they could
procure from the Indians. The next morning, as they started on their
journey, they met a group of the Parrusits Indians who were living in
scattered bands along the Upper Virgin River, forming one of the
dozen or more clans belonging to the Paiute tribe, and who warned
them that they were headed toward the Grand Canyon at a place
where it could not be forded. After much persuasion they agreed to
show the explorers a route by which they could climb the Hurricane
Fault and proceed eastward toward a ford of the Colorado.

The Indians led them four or five miles up a narrow canyon along a
footpath that became so steep and ledgy that the horses and 125
mules could not follow. Perceiving this, the Indians fled and
the party was forced to retrace the rocky trail to the foot and press
southward again, crossing the present line into Arizona. They became
suspicious that the Indians were purposely misdirecting them.

That night they made a dry camp, and having neither food nor water,
both men and animals suffered intensely. Early next day they found
water but after traveling about twenty-five miles some of the men
were so weak and hungry they had to stop to rest. After ransacking
their camp outfit, they found odds and ends enough to satisfy their
worst needs.

At this point they found a way to climb the bold face of the Hurricane
Fault. Hungry and thirsty, they headed for rough country to the
southeast where they found water after about eighteen miles. They
also found Indians from whom they procured some food. Again being
warned by the Indians of the great impassable Grand Canyon ahead
they swung off sharply to the northeast.

Continuing the journey, guided only by the vague directions given by


the Indians, the party spent several days during late October and
early November in crossing the Arizona Strip and southern Utah
before they found a ford of the Colorado, a few miles upstream on
the Utah side of the state line, since known as the “Crossing of the
Fathers.” The hardships of the party in traversing Northeastern
Arizona and northwestern New Mexico to get back to Santa Fe,
however, are not a part of this story.

The journey lasted from July 29, 1776 to January 2, 1777. It covered
a circuitous route through four states and the priests had been
pathbreakers in new and unexplored territory. One objective, the
route to the Pacific coast, had not been attained, but the other, that
of locating sites for missions, had been abundantly fulfilled. Many
possibilities were marked along the route, but apparently none gave
the Fathers more satisfaction than the prospects among the Parrusits
Indians on the Pilar River (now Ash Creek and Virgin River) who were
already farmers.

On finding the cornfield and irrigation ditches of the Parrusits,


Escalante remarked:

By this we were greatly rejoiced, now because of the hope it gave


of being able to take advantage of certain supplies in the future;
especially because it was an indication of the application of these
people to the cultivation of the soil; and because we found this
much done toward reducing them to civilized life and to the faith
when the Most High may so dispose, for it is well known how much
it costs to bring other Indians to this point, and how difficult 126
it is to convert them to this labor which is so necessary to
enable them to live for the most part in civilized life and in towns.
[8]
The Spanish Fathers never fulfilled their dreams of missions beyond
the Colorado, but they explored an uncharted area, into which other
Spaniards followed. The records, however, are meager and
information incomplete about these later expeditions. Two other
Spaniards, Mestes in 1805 and Arze and Garcia in 1812-13, seem to
have penetrated as far as Utah Lake and perhaps southward, but so
[9]
far as is known, their trips had little significance.

Still later, other Spaniards developed the route from Santa Fe to the
Pacific coast which the Fathers had failed to do. Known as the Old
Spanish Trail, this passed northwestward from Santa Fe through
southwestern Colorado and central Utah and then southwestward to
Los Angeles. It crossed Escalante’s trail near Cedar City. But before
this route was developed, other explorers had opened the way.

After Dominguez and Escalante, the next pathbreaker of importance


to enter the region was Jedediah Strong Smith, a trapper and trader
bent on expanding his fur business. He was probably the first to
finish the task started by Escalante, that of finding a route to the
coast, which he traversed in 1826 and again in 1827. Smith’s epochal
explorations, like Escalante’s a half-century earlier, were circuitous in
nature and his first trip covered an area now embraced by four
states, Utah, Arizona, Nevada and California. The eastern side of his
loop overlapped the western side of Escalante’s and probably their
trails coincided for short distances where they crossed.

Smith belonged to the firm of Smith, Jackson and Sublette, which


had purchased General Ashley’s fur interests and was trapping
through the region southward from Montana through Idaho and
Wyoming to northern Utah. The summer camp or rendezvous of the
firm was at Bear Lake near the Utah-Idaho line and most of the
trapping grounds were to the north and east. Knowing nothing about
the region lying south and west of the Great Salt Lake, Smith fitted
out a party of about sixteen men to explore and trap the unknown
region.
He left the shores of the Great Salt Lake, August 22, 1826, and
proceeded south and west to Los Angeles, arriving there late in
November. His exact course through Utah was long a matter of
[10]
controversy but with the discovery, by Maurice Sullivan, of an
[11]
additional letter written by Smith, the controversy was settled. It
now seems certain that he followed the route proposed by the author
to Maurice Sullivan (ibid.) from Utah Lake Southward to Sevier River
in the vicinity of Fayette, followed it up to the mouth of Marysvale
Canyon, and mistaking Clear Creek for the head of the river
(evidently not recognizing the stream coming through Marysvile
Canyon), passed over the divide at the head of Clear Creek and down
by Cove Fort, south along the west foot of the mountains to Beaver
River (which he called Lost River), on past the present site of Cedar
City to the rim of the Great Basin, thence to Ash Creek along the
route Escalante had taken to the Virgin River, down the Virgin to the
Colorado River and across the Mojave Desert to the Coast.
Sulphur Springs on stream called Sulphur River by Escalante
(1776). Adams River by Jed Smith (1826), and Rio Virgin by the
Spaniards (1840’s) emerging from canyon near Hurricane.
Photo by U. S. National Park Service.
Flood plain of the Virgin River at Grafton.
Photo by U. S. National Park Service.
Carvings by prehistoric Indians in Zion Canyon.
Photo by U. S. National Park Service.
Carvings by white men on a cliff two miles south of St. George
(below). Message below plant reads: Jacob Peart Jr. I was sent
here to raise cotten March 1858. Photo by U. S. National Park Service.

Smith called the Virgin the Adams River in compliment to 127


President John Quincy Adams, although it was in territory
then claimed by Mexico. At the mouth of Santa Clara Creek, he fell in
with a group of Paiute Indians (his printed word is Pa Ulches,
probably a misprint for Pa Utches), who wore rabbit skin robes and
raised a little corn and pumpkins. He called the Santa Clara, Corn
Creek.

On his first trip of 1826, he followed the Virgin River down through
the narrows below the mouth of the Santa Clara, a hazardous
undertaking since most of the channel is barely wide enough to
accommodate the stream. This would have involved much wading of
the stream over shifting quicksand, through deep holes and around
giant rocks and boulders. On his second trip, a year later, he avoided
these narrows by going up Corn Creek (Santa Clara) about twenty
five miles, crossing over a pass to the drainage into Beaver Dam
Wash which he followed down to the Virgin, rejoining his old route
[11]
about ten miles below the narrows.

These pioneering trips of Smith’s not only opened two new routes to
the Pacific, westward and southwestward, but his reports of his
travels and stories of adventure undoubtedly incited others to 128
follow. One of these was George C. Yount, who was in the
mountains with Smith for several months. Smith’s stories inflamed in
him a desire to visit California. In the fall of 1830, Yount joined a
party organized by William Wolfskill at Santa Fe for the purpose of
reaching the coast. Coming up through the corner of Colorado and
eastern Utah, they reached the Sevier River, probably through Salina
Canyon, arrived at the Virgin River and followed it down to the
Colorado. The story of this trip was told by Yount in his old age and
the details of the route are not precise, but it appears that his party
[12]
must have attempted to follow Smith’s trail. It is probable that
these explorations had a great deal to do with the development of
[13]
the Old Spanish Trail, then in its formative stages.

Subsequently, the Old Spanish Trail became a regular overland route,


following the Sevier River nearly to Panguitch, then over the Bear
Valley pass to Paragonah, across the desert to the Mountain
Meadows, down the Santa Clara past Gunlock, over the divide to
Beaver Dam Wash, paralleling the Virgin River, across desert hills to
the Muddy River and thence across toward Los Angeles via Las
Vegas.

By 1844, when Captain John C. Fremont of the U. S. Army came over


the route from the coast to Paragonah, this was a well defined trail,
over which annual caravans traveled back and forth from Santa Fe to
[14]
the coast. Untold numbers of Spaniards may have traveled the
route that Escalante had tried vainly to find, leaving their impress
along the way in the Spanish names given to many of the important
places, several of which have persisted to this day. The names, Rio
Virgen (River of Virgins), Santa Clara Creek and La Verkin Creek, all
probably originated with the Spaniards, between the time of Jedediah
[15]
S. Smith and John C. Fremont.

Fremont followed the route from the coast past Las Vegas and
encamped on the Muddy River after a fifty to sixty mile jaunt across
the parched desert, sixteen hours of uninterrupted traveling 129
without water. The Indians were numerous and insulting,
evidently intent upon raiding the camp and stealing anything they
could. Horses fatigued and left behind the night before were found
butchered the next morning. The party remained in camp all day on
May 5, 1844, to let their animals recuperate from the hard trip of the
day before. They remained constantly armed and on watch. Fremont
called the natives Digger Indians. They fed largely upon lizards and
other small animals of the desert. Many of them carried long sticks,
hooked at the end for extracting lizards from the rocks.

As Fremont traveled up the Virgin River, the Indians followed


stealthily in the rear and quickly cut off any animals that were left
behind. While encamped near the present site of Littlefield, Arizona,
one of the men, Tabeau, was killed by the Indians when he went
back alone a short distance to look for a lost mule. The party that
went in search of him found where he had been dragged by the
Indians to the edge of the river and thrown in. His horse, saddle,
clothing, arms, and the mule had all been taken by the Indians.

The two thousand-foot mountain gorge above Littlefield forced


Fremont to leave the Virgin and turn off to the north where he
regained the Old Spanish Trail which he had lost in the sands of the
desert. Surmounting a pass, he reached the Santa Clara and followed
it up to the Mountain Meadows where, he states:

We found an extensive mountain meadow, rich in bunch grass, and


fresh with numerous springs of clear water, all refreshing and
delightful to look upon. It was, in fact, that las Vegas de Santa
Clara, which had been so long represented to us as the terminating
point of the desert, and where the annual caravan from California
to New Mexico halted and recruited for some weeks. It was a very
suitable place to recover from the fatigue and exhaustion of a
month’s suffering in the hot and sterile desert. The meadow was
about a mile wide and some ten miles long, bordered by grassy
hills and mountains.... In passing before the great caravan, we had
the advantage of finding more grass, but the disadvantage of
finding also the marauding savages, who had gathered down upon
the trail, waiting the approach of their prey.... At this place we had
complete relief from the heat and privations of the desert and
[16]
some relaxation from the severity of camp duty.

After a day of rest (May 13) at the Meadows, Fremont pushed to the
northeast across the south end of the Great Basin until he 130
reached the Little Salt Lake near Paragonah. Here he left the
Old Spanish Trail and cut off to the north along the edge of the
desert at the western foot of the mountains. On May 20 he met a
band of Ute Indians under the leadership of the well known chief,
Walker (Wah-kerr), journeying southward to levy the annual toll upon
the California caravan. Fremont says, “They were all mounted, armed
with rifles, and use their rifles well.... They were robbers of a higher
order than those of the desert. They conducted their depredations
with form and under the color of trade and toll for passing through
their country. Instead of attacking and killing, they affect to purchase,
taking the horses they like and giving something nominal in return.”
Early Mormon Settlement
While trade between California and New Mexico was beating the path
of the Old Spanish Trail into a road across southwestern Utah, events
elsewhere were leading to the elimination of Spanish influence and
the rise of Anglo-Saxon power. The Mexican War ended Spanish
domination, but it was the Mormon migrations which were to fill the
region with settlements.

In 1847, the Mormons began to move west from the Missouri River to
the Great Salt Lake Valley. The precedent of Texas breaking away
from Mexico was before them as they traveled across the plains to
enter Mexican territory, where they would be free from those who
had persecuted them, and where they would be practically isolated
from Mexican authority by the barrier of the Grand Canyon. What
dreams of empire held their thoughts as they trekked across the
[17]
plains can only be conjectured.

Outposts, forts, and settlements were scattered throughout the vast


area they hoped to dominate. Western Colorado, southwestern
Wyoming, southern Idaho, Utah, Nevada, northern Arizona and
southern California were all included in their colonization plans.
Strategic points throughout this whole vast empire were to be
occupied and controlled. The intervening territory would be filled in
later with the great number of converts to the faith pouring in from
Europe. The transfer of this entire territory to the United States by
the Treaty of Guadalupe-Hidalgo exercised a restraining influence
upon their ambitions and brought them once more under the hand of
the Federal government.

During the first few years of settlement, there was little change in
governmental organization and the people were for the most part
guided and controlled by their religious leaders. In March, 1849, they
set up a provisional government for their proposed State of 131
[18]
Deseret. In 1851, however, Congress carved this western
empire into territories, paying no attention to the proposed State and
designating its heart as the Territory of Utah (named for the
dominant Indian nation of the region, the Utes or Utahs). The
Mormon dreams were thus dimmed, but they did not finally die until
1858, when Albert Sydney Johnston’s army marched to Utah and
completely ended all hopes of an independent political unit.
Thereafter, the Mormon attitude gradually changed from one of open
opposition to one of conditioned loyalty and the long struggle for
[19]
statehood began.

It was during the period of expansion and occupation that


southwestern Utah was generally explored with a view toward
settlement. Late in the fall of 1847, a small party under the
leadership of Captain Jefferson Hunt pushed to the Pacific coast to
secure provisions and livestock, carrying instructions to the Mormon
Battalion members mustered out in California to remain there that
[20]
winter and not to attempt to come to Salt Lake until Spring. The
party followed approximately the route of U. S. Highway 91 from
Great Salt Lake to Little Salt Lake, Iron County, where it picked up
the Old Spanish Trail and followed it to the coast. Hunt’s men were
the first Mormons to travel the route later known as the Mormon
Trail. Where they obtained information to guide them is a question,
but it is known that the Mormons were acquainted with Fremont’s
report of his trip along that route in 1844. There was an important
deviation from Fremont’s path, however; they went through Scipio
Valley and the pass to the east of the Canyon range of mountains,
whereas Fremont had gone on the west side. Further details of this
[21]
trip are lacking.

The party wintered in California, where negotiations were entered


into between Hunt and United States Army officers for raising another
battalion of Mormons to garrison posts in California. When Hunt
returned to Salt Lake in the spring of 1848, he carried the details with
him, but no report of his trip is extant.

On September 17, 1848, while Brigham Young was visiting at 132


Fort Provo, a group of leaders gathered at Hunt’s house in the
evening to “converse about the southern country and the prospects
of settling it.... Many questions were asked in regard to routes,
traveling, locations, incidents, etc., and the prospects before the
[22]
Saints caused quite a good feeling.”

During the late summer and fall of 1849, hundreds of emigrants on


their way to seek gold in California poured into the Salt Lake Valley
too late to make the trip westward across the Sierra Nevada
Mountains before snow blocked the way. There was little food and
the Mormons were not eager to have these people winter with them.
The difficulty was solved by the offer of Captain Hunt to pilot them
across the southern route.

Altogether there were about 125 wagons and 1,000 head of cattle.
The Argonauts were a nondescript lot, everyone intent upon his own
personal problems and not actuated by a common ideal as were the
Mormons. They caused Hunt a great deal of trouble and even
threatened his life over certain details of the trip. Dissensions arose
which split the party several times. At last, near the rim of the Great
Basin not far from the Mountain Meadows, most of them left him for
a supposed cutoff via Walker’s Pass in the Sierras. Hunt, in peace,
safely piloted the remaining six or seven wagons to the coast. The
[23]
party taking the cutoff ended in disaster in Death Valley. Captain
Hunt stayed in California more than a year and returned to Utah early
in 1851.

In December, 1849, the General Assembly of the provisional State of


Deseret commissioned a company already organized under the
leadership of Parley P. Pratt, to explore the south and ascertain its
[24]
possibilities for sustaining settlements. The expedition of nearly
fifty men had left on November 25. They pushed south during the
cold weather via the new settlement of Manti. Following the Sevier
River to Circleville Canyon, they turned up a defile to the southwest
and followed it about twelve miles north of the Spanish Trail over the
mountains into the Little Salt Lake Valley, December 21. Two days
later they camped on Red Creek (now Paragonah) where they paused
to recuperate among the excellent meadows, willows and bunch
grass abounding there at that time.

Here it was decided to divide the party, some to guard the 133
recuperating cattle, while twenty of the men with horses and
mules were to push the exploration southward. Those who remained
moved their camp to Birch Creek (now Parowan) and while waiting
explored the surrounding region. Some went up Parowan Canyon
where they discovered accessible timber, plaster of paris (gypsum),
water lime (limestone) and iron ore.

Between Jan. 2 and 6, 1850, a company of ten men explored west of


Little Salt Lake, where they found many Indian pictographs on the
rocks. A few miles west of the present site of Cedar City they came
upon a “range of hills filled with iron ore of the richest quality—
probably 75 per cent.” Four Indians visited them and when told that
the explorers were Mormons, they said ... “Captain Walker had told
them about us, that we were his friends. They said they were our
friends and would not kill our cattle or horses. Walker told them the
Mormons raised Shaunt Tickup [lots of food] and they wanted us to
come and raise it among them. They said they loved the Mormons.
They are very poor and have no horses or skins. They live upon
rabbits which are plenty in their valley (now Cedar Valley) and clothe
[25]
themselves with their skins.” This party of ten rejoined the camp
on January 6.

An exploring party of twenty went south on December 26, reached


the rim of the Great Basin at the present site of Kanarra two days
later, and then descended Ash Creek, as had Escalante in 1776 and
Jedediah Smith in 1826 and 1827. They crossed the black volcanic
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!

ebookultra.com

You might also like