0% found this document useful (0 votes)
19 views

Get Developing Responsive Web Applications with AJAX and jQuery 1st Edition Sandeep Kumar Patel PDF ebook with Full Chapters Now

The document is about the book 'Developing Responsive Web Applications with AJAX and jQuery' by Sandeep Kumar Patel, which covers the design and development of responsive web applications using Java, jQuery, and AJAX. It includes details on the book's content, author, and various integrations with social media and e-commerce platforms. The book is published by Packt Publishing and is available for download from ebookfinal.com.

Uploaded by

lequekendal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Get Developing Responsive Web Applications with AJAX and jQuery 1st Edition Sandeep Kumar Patel PDF ebook with Full Chapters Now

The document is about the book 'Developing Responsive Web Applications with AJAX and jQuery' by Sandeep Kumar Patel, which covers the design and development of responsive web applications using Java, jQuery, and AJAX. It includes details on the book's content, author, and various integrations with social media and e-commerce platforms. The book is published by Packt Publishing and is available for download from ebookfinal.com.

Uploaded by

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

Visit https://ebookfinal.

com to download the full version and


explore more ebooks

Developing Responsive Web Applications with AJAX


and jQuery 1st Edition Sandeep Kumar Patel

_____ Click the link below to download _____


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

Explore and download more ebooks at ebookfinal.com


Here are some suggested products you might be interested in.
Click the link to download

Flask Web Development Developing Web Applications with


Python 1st Edition Miguel Grinberg

https://ebookfinal.com/download/flask-web-development-developing-web-
applications-with-python-1st-edition-miguel-grinberg/

Liquid Crystal Dimers 1st Edition Sandeep Kumar

https://ebookfinal.com/download/liquid-crystal-dimers-1st-edition-
sandeep-kumar/

Developing Web applications with Visual Basic NET and ASP


NET 1st Edition John Alexander

https://ebookfinal.com/download/developing-web-applications-with-
visual-basic-net-and-asp-net-1st-edition-john-alexander/

AJAX and PHP Building Modern Web Applications 2nd Edition


Bogdan Brinzarea-Iamandi

https://ebookfinal.com/download/ajax-and-php-building-modern-web-
applications-2nd-edition-bogdan-brinzarea-iamandi/
AJAX Rich Internet Applications and Web Development for
Programmers 1st Edition Paul J. Deitel

https://ebookfinal.com/download/ajax-rich-internet-applications-and-
web-development-for-programmers-1st-edition-paul-j-deitel/

The Responsive Web 1st Edition Matthew Carver

https://ebookfinal.com/download/the-responsive-web-1st-edition-
matthew-carver/

Beginning jQuery 2 for ASP NET Developers Using jQuery 2


with ASP NET Web Forms and ASP NET MVC 1st Edition Bipin
Joshi (Auth.)
https://ebookfinal.com/download/beginning-jquery-2-for-asp-net-
developers-using-jquery-2-with-asp-net-web-forms-and-asp-net-mvc-1st-
edition-bipin-joshi-auth/

Programming ASP NET MVC 4 Developing Real World Web


Applications with ASP NET MVC 1st Edition Jess Chadwick

https://ebookfinal.com/download/programming-asp-net-mvc-4-developing-
real-world-web-applications-with-asp-net-mvc-1st-edition-jess-
chadwick/

Learning jQuery Better Interaction Design and Web


Development with Simple Javascript Techniques 1st Ed.
Edition Jonathan Chaffer
https://ebookfinal.com/download/learning-jquery-better-interaction-
design-and-web-development-with-simple-javascript-techniques-1st-ed-
edition-jonathan-chaffer/
Developing Responsive Web Applications with AJAX and
jQuery 1st Edition Sandeep Kumar Patel Digital Instant
Download
Author(s): Sandeep Kumar Patel
ISBN(s): 9781783286379, 1783286377
Edition: 1
File Details: PDF, 11.77 MB
Year: 2014
Language: english
www.allitebooks.com
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

www.allitebooks.com
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])

www.allitebooks.com
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

www.allitebooks.com
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/.

www.allitebooks.com
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.

www.allitebooks.com
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.allitebooks.com
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.

www.allitebooks.com
www.allitebooks.com
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

www.allitebooks.com
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]

www.allitebooks.com
Introduction to a Responsive
Web Application
In this chapter, we be introduced to responsive web design followed by an
understanding of technology stack that made responsive web application
development possible.

The current trend of technology revolution has led us to a point where we can
see many wireless devices with different screen size, resolution, and processing
capabilities. It is really challenging and difficult to create different versions of
web applications for each and every device type. To address this challenge,
it needs a design solution that can address these problems. Responsive web design
provides the platform and flexibility where we can write code once and publish the
application everywhere.

Designing a website to look good at one particular resolution was the standard and
that standard was adequate for almost all purposes. Now, more and more people
are viewing web content on smartphones and tablets. The most successful websites
must have content designed to fit on any size screen or any type of device. Designing
content in this manner is also known as responsive web design. We need to give
all users, regardless of their access platform, a seamless experience, and responsive
web design offers a cost-efficient way of achieving that. Responsive web content can
dynamically change size, fonts, and colors to match whatever device your customers
might be using.
Introduction to a Responsive Web Application

The most important dimensions of a responsive design are as follows:

• An adaptive grid-based layout that must be responsive enough to the


client-side environment. There are two different approaches for an adaptive
layout: the first one is a fixed layout and the other one is a fluid layout.
Fluid layouts are always proportional to the screen size.
• Fluid images must maintain the aspect ratio. To maintain the aspect ratio,
we can go for two approaches, either setting the max-height to 100 percent
or max-width of 100 percent. This makes the images overflow in either
direction. The other way of handling the images is to clip a portion of
the image, though it is not recommended.
• The new CSS3 media queries make the browser more intelligent.
Now, browsers can make the decision to load the appropriate CSS
at runtime. This makes them adaptable to the client environment.

Responsive design is made possible through the use of three core


ingredients: a flexible grid-based layout, flexible images and media,
and CSS media queries.

Benefits of a responsive design


The most important benefits of responsive web application are as follows:

• Pleasant user experience in each type of device


• Reduced development cost compared to developing different applications
for each device type
• Reduced cost on advertising and marketing compared to maintaining
campaigns for every application for each device
• Better indexing in search engines and improved search engine
optimization (SEO)
• Increased conversion rates and lead generation as SEO is increased
(visibility of a web application in search engines)

Responsive web design uses a single code base, but in reality, different devices have
to be accounted for. While a desktop version can display a lot of content at once,
for smaller screens, you need to know exactly what content truly matters. To create
a great experience for all users, you need to consider that people will use different
devices in different circumstances and with different goals. With a responsive web
design, more effort and time will be involved to get the right user experience for
your target audience.

[8]
Chapter 1

If you look into different applications present online such as blogs and sports
applications, then you will notice that the end user behaviors are similar and follow
a common pattern. To provide the same experience for the end users, the layout and
other elements in the application must be designed for customization. This needs
more effort and time in developing the layout and the code.

Server- versus client-side detection


Addressing the issue of developing applications for different media types and
devices can be solved in two ways. The first one is the server-side detection where
middleware is responsible for reading the request header sent by the browser and
redirects the request to the appropriate version of the application. This requires you
to develop a different version of the application. It means an e-commerce site must
have a separate code base for each type of device.

The second one is the client-side detection. It should be done by the browser and
apply relative CSS based on the device or screen type. With this idea, the responsive
design is born. The real benefit is that one has to maintain a single code base for this.

The technology stack


The following diagram shows the building blocks for responsive web application
development. Each block in the diagram represents a technology that enables
responsive web application development.

web Media
application queries

[9]
Introduction to a Responsive Web Application

HTML5
HTML5 is the latest version of HTML, released by the W3C foundation with more
modern features included such as more semantics and usability features. This helps
in responsive web application development with more ease and less effort. Some of
the key points that highlight why HTML5 is a better candidate than other versions of
HTML are as follows:

• Inclusion of new HTML5 elements such as video and audio as native reduces
the use of an additional third-party plugin
• Enhanced existing elements such as form element reduce the need for an
additional amount of code to be written
• Inclusion of Canvas and SVG for graphic rendering and drawing adds
additional capabilities

CSS3 and media queries


Features such as media type detection and layout manipulation of media queries are
useful to build a responsive layout. Some of the key points of CSS3 are as follows:

• CSS3 animations and transitions reduce the need for JavaScript processing,
favoring, instead, a native implementation that can vastly improve
performance on mobile devices where processing power can be quite
limited, while falling back gracefully to immediate changes in browsers
that do not support them.
• Support of new measuring units such as rem helps in building a logical
relationship among elements' dimensions present inside a page.
• Ultimately, the vw and vh units will greatly enhance the ability of a
developer to size elements relative to the viewport.
• FlexBox provides numerous benefits with direction-based alignment and
element ordering inside a layout. For a responsive design, this means that
a default ideal order can be established via the document order to provide
greater SEO benefits, while different ordering can be provided based on
viewport size, device orientation type, and so on, to display content in the
best format for a given use case.

[ 10 ]
Chapter 1

JavaScript
JavaScript brings the capability of feature detection for the browser. It helps in
choosing the right component for the end user and makes the browser responsive
to its environment.

Some of the key points about JavaScript are as follows:

• Browser feature detection helps you to find features that are supported
by the browser. This helps in helps you to execute the appropriate code
in the application.
• Rendering behavior of the site can be altered using JavaScript.

Measuring responsiveness
There are many parameters for measuring the responsiveness of an application.
Layout, content, and navigation are the three most important parameters for a
responsive web application development. The following diagram shows the three
different building blocks of a responsive web application:

•Element positions •Appearance •Page flow

• Layout: While developing a responsive web application for all kinds


of devices, the layout should be developed based on the available size.
Based on the breakpoints for each device size, the layout gets altered.
This includes show and hide of a section in the layout.
• Content: For small screens, the available viewing space is very small.
While developing a responsive web application, the text content must
be responsive. It includes the typography, images, and other media
elements present inside the page.
• Navigation: For touch-enabled devices, the navigational elements will
be different to those on medium devices. How these navigational items
are to be presented to the end user is really a design challenge. It should
be rendered seamless to the end user while navigating in any devices.

[ 11 ]
Introduction to a Responsive Web Application

Devices and screens


If you look at the gadget market for handheld devices, you can find a wide range of
devices with different screen sizes. If you ask me what the optimal size for a device
screen is, I probably could not answer you without knowing the purpose. Each and
every device is good for a specific use. So, the optimal size of a screen is directly
dependent on the end user.

A wide screen with good graphics and pixel density may be the best fit for a gaming
end user. For a regular end user, a small device is a good fit. The web application
design must support all these screen sizes. The usability and the user experience
must be equivalent to all types of screens. Also, it is much more important when it
comes to an e-commerce site. If the end user is browsing the site on a mobile device
and the e-commerce device is only designed for a desktop, then it does not generate
the same pleasant experience that will lose the leads.

The soul of an e-commerce site is lead generation and it is only possible when the
application will provide seamless access to the end user irrespective of the browsing
device. This clearly requires the application to be responsive to its environment or
adapt itself based on the screen or device.

Media types
All these devices (desktops, tablets, mobiles, and laptops) fall in one of the
following media types. The following figure shows all the media types listed
in the W3C specification:

[ 12 ]
Chapter 1

TV

Media
type

TTY

• Braille: This is used for braille tactile feedback devices.


• Embossed: This is used for paged braille printers.
• Handheld: This is used for handheld devices. Smartphones and tablets do
not fall to this.
• Print: This is used for paged material and for documents viewed on screen in
the print preview mode.
• Projection: This is used for projected presentations, for example, projectors.
• Screen: This is used primarily for color computer screens and smartphones.
• Speech: This is used for speech synthesizers.
• TTY: This is used for media using a fixed-pitch character grid. It includes
teletypes, terminals, or portable devices with limited display capabilities.
• TV: This is used for television type devices. It includes low resolution, color,
limited-scrollability screens, and audio.
• Grid: This is used for visual and tactile media types.

Available expressions for media queries to filter the CSS rules are as follows:

• width: This is the width of the current window


• height: This is the height of the current window
• device-width: This is the width of the device

[ 13 ]
Introduction to a Responsive Web Application

• device-height: This is the height of the device


• orientation: This should be either landscape or portrait
• aspect-ratio: This is the aspect ratio of the current window
• device-aspect-ratio: This is the aspect ratio of the device
• color: This is the number of color bits per color component
• color-index: This is the number of available colors on the device
• monochrome: This is the number of bits per pixel in a monochrome
frame buffer
• resolution: This is the resolution of the device
• scan: This should be either progressive or interlace

Media queries
Media queries are one of the best features of CSS3. Using this feature, we can decide
which style sheet should be applied on the web page at runtime.

Media queries can be used as external or internal style sheets. An external style sheet
is easier to organize; it is not downloaded by browsers that don't support it, but it
uses an extra HTTP request. An internal style sheet, on the other hand, does not
require an extra HTTP request, but the whole style sheet is downloaded for browsers
even if they do not support media queries, and it can be harder to organize.

The following code is an example of an external media queries call:


<link rel="stylesheet" type="text/CSS" media="screen and (max-device-
width: 480px) " href="abc.css" />

The following code is an example of internal media queries:


body {
background: gray;
}
@media all and (max-width: 480px){
body{
background: blue;
}
}

[ 14 ]
Chapter 1

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.

Role of media queries


CSS3 provides a new set of features called media queries for responsive web
application development. These media queries are helpful for conditional CSS3 used
on a page based on the media type, device width, and other parameters. Generally,
the following parameters help in applying the correct CSS3 to the web page:

• Height and width of the device refers to the size of the device
• Height and width of the browser refers to the viewable area
• Screen resolution refers to the pixel and color depth of the screen
• Orientation of the device refers to the portrait or landscape mode

Using media queries, the layout can be designed in the following two ways:

• The adaptive layout: This is based on a pretty simple idea: instead of using
percentage, we will give our layout fixed sizes. The layout will adapt those
sizes depending of the width of the browser/viewport, thus creating a layout
with different breakpoints.
• The responsive layout: This is a mix between fluid and adaptive layouts.
It will use the relative units of the fluid layout and the breakpoints of the
adaptive one.

Responsive frameworks
There are many frameworks available from different vendors for responsive
web application development. Some of the popular libraries are explored in the
following sections.

[ 15 ]

www.allitebooks.com
Introduction to a Responsive Web Application

Bootstrap
Some of the key points about the Bootstrap framework are as follows:

• Twitter's Bootstrap library is the most popular responsive framework.


• It is based on mobile-first design strategy. The source code of the projects is
available in the SASS and LESS format.
• Bootstrap 3, SASS, and LESS really helps in customizing modules needed for
the project.
• There are many resources and plugins available on the Internet for the
Bootstrap framework.
• You can get more information from http://getbootstrap.com/.

The Foundation framework


Some of the key points about the Foundation framework are as follows:

• Foundation framework is yet another popular responsive framework


by ZURB foundation
• Foundation Version 5 follows mobile-first design strategy (designing your
site or app for the small device first, and then expanding that to include
larger displays and more full-featured devices)
• The major benefit of Foundation framework is that the rem unit is used
for its sizing of fonts and positioning
• You can get more information from http://foundation.zurb.com/

The Cascade framework


Some of the key points about the Cascade framework are as follows:

• The Cascade framework is lightweight and modular.


• The code packages in the Cascade framework are done based on
their features.
• For example, for coloring purpose, there is a color module to be invoked
and used. All features of Cascade framework support Internet Explorer
from IE6 upwards or degrade gracefully.

[ 16 ]
Chapter 1

• The whole library comes under four different modules: grid, typography,
icons, and components. It has also some reusable web page templates in a
different section.
• You can get more information from http://www.cascade-framework.com/.

The Pure CSS framework


Some of the key points about the Pure CSS framework are as follows:

• Pure CSS is a lightweight responsive framework by Yahoo Inc.


• The Pure CSS library is very tiny in size, and is about 4.4 KB minified and
compressed version. This library targets mobile devices.
• The core of this library is Normalize.css. The Normalize library provides
layout and styling of the HTML elements.
• You can get more information from http://purecss.io/.

The Gumby framework


Some of the key points about the Gumby framework are as follows:

• The Gumby framework is incredibly customizable


• It's as easy as download, tweak, and deploy
• Gumby is built on the SASS authoring framework
• Most eye-catching features in Grid modules such as Basic Grid, Hybrid
Grid, Nested Grid, Sematic Grids, Tiles, and Fancy tiles are part of the
Gumby framework
• You can get more information from http://gumbyframework.com/

Bootstrap 3 for a responsive design


There are many components and utilities available for responsive web application
development in Bootstrap. Bootstrap features are available in the following three
different modules:

• CSS: This module has a lot of standard classes to use and is easily extendable
for customization
• Component: This module has all the reusable built-in components
• JavaScript: This module has the jQuery plugin in Bootstrap style

[ 17 ]
Introduction to a Responsive Web Application

Some important features that we are going to use in our web application
development are presented in the following diagram:

Responsive HTML5 Helper JS


Grid layout
utilities elements classes components

• Grid layout: This module has different grid classes for xs, sm, md, and lg
type devices. The details of these grid classes are listed as follows:
°° xs stands for extra small devices. For example, a phone's screen
resolution is less than 768 pixels.
°° xm stands for small devices. For example, a tablet's screen resolution
is greater than or equal to 768 pixels.
°° md stands for medium devices. For example, a desktop's screen
resolution is greater than or equal to 992 pixels.
°° lg stands for large devices. For example, a desktop's screen resolution
is greater than or equal to 1200 pixels.

• Typography: This module has different classes based on the font


size requirements.
• Responsive utilities: This module contains classes for conditional classes
based on the types of devices.
• HTML5 elements: This module has default style classes for all
HTML5 elements.
• Helper classes: This module has classes for frequently used alignment and
positioning issues.
• JS components: This module has additional components such as carousel,
tooltip, popover, and so on.

What are we building?


We are going to use the Bootstrap 3 framework for responsive web application
development. In the following chapters, we will build an e-commerce web
application that will be responsive in design.

[ 18 ]
Chapter 1

The plan is as follows:

• Building the layout for the application


• Populating the content in the layout
• Integrating the application with social media sites
• Integrating a payment system with the Add to Cart feature
• Building a currency converter
• Debugging and testing the web application for responsiveness

Summary
In this chapter, we have learned about the need for a responsive web application
and what challenges it brings to a web developer. We have also learned about the
latest responsive libraries available for development. We have understood how
a responsive layout can increase the user experience. In the following chapter,
we will learn to develop a responsive layout using CSS3.

[ 19 ]
Creating a Responsive
Layout for a
Web Application
In this chapter, we will set up our Java-based web project and develop the layout
required to create our responsive web application. The process of developing the
layout follows a step-wise approach. Initially, we will draw a wireframe for the
layout, and then, we will prepare code for each section using Bootstrap 3 classes.
Later on in this chapter, we will verify the layout with different screen sizes
using some tools.

Required software and tools


We need the following software to be installed to develop the responsive
web application:

• An Eclipse Java EE IDE of Juno/Kepler version for web developers


(http://www.eclipse.org)
• Apache Tomcat 7
• Opera Mobile emulator
• The draw.io online tool
• The Mozilla Firefox browser
• The Google Chrome browser
Creating a Responsive Layout for a Web Application

Setting up a Java-based web project


In this section, we will set up a Java-based web project in Eclipse. To do this, we have
to create a new dynamic web project. The following screenshot shows the window to
create a new web project. In Eclipse, click on the File button and choose New to list
the different project types present in Eclipse.

The different available project types present are shown in the following screenshot.
When this window appears, choose the Dynamic Web Project option.

[ 22 ]
Chapter 2

When you have chosen the Dynamic Web Project option, a New Dynamic
Web Project window will open asking for Project name, as shown in the
following screenshot:

[ 23 ]
Creating a Responsive Layout for a Web Application

For our application, we will name the project MyResponsiveWebApp. The project
structure will look like the following screenshot:

The WebContent folder consists of all the HTML, CSS, and JavaScript files.
The Navigator view of this empty project will look like the following screenshot:

[ 24 ]
Chapter 2

Configuring Bootstrap 3
In this section, we will configure the Bootstrap 3 library in our web project.
Download the Bootstrap 3 library from http://getbootstrap.com/getting-
started/#download. Bootstrap 3 has three different folders in its distribution
package. They are explained as follows:

• js: This folder contains all the scripts required for the Bootstrap 3 library
• fonts: This folder contains all the font-related files including the Glyph icons
• css: This folder contains all the style sheet-related files with Bootstrap's
default theme

The following figure shows the structure of the Bootstrap 3 library:

dist js

[ 25 ]

www.allitebooks.com
Exploring the Variety of Random
Documents with Different Content
“Mr Dilnot has produced a book entertaining and, in the main,
thoughtful.”

+ Springf’d Republican p6 N 29 ’20 270w

[2]
DIMMOCK, F. HAYDN, ed. Scouts’ book of
heroes; with foreword by Sir Robert Baden Powell. il
*$2.50 Stokes 940.3

“A record of scouts’ work in the great war.” (Sub-title) Contents:


1914; Famous scouts in the war; Scout heroes of the army; Scout
heroes of the navy; Heroes of the air service; The heroes at home;
Just—a scout; Called to higher service. In addition sixty pages are
devoted to records of those who received medals, etc.

DINGLE, A. E. Gold out of Celebes. il *$1.75


(2½c) Little
20–8238

Jack Barry, an American seaman out of a job, is loafing about


Batavia, in the Dutch East Indies, when Tom Little, a traveling
salesman tired of the typewriter business, puts him on the track of
adventure. Little has undertaken to go into the interior in the
interests of Cornelius Houten, a Dutch trader, who has reason to
suspect one of his agents. Houten is looking for a skipper and Barry
meets his needs. The two Americans scent mystery from the outset.
In the first place there is the strange lady, Mrs Goring, who claims
acquaintance with them and asks passage on their ship. In the
second place there is something puzzling about the big soft-voiced
Dutch mate. There is also the relation between Leyden, the man they
are after, and Natalie Sheldon, the charming young missionary. And
the last is the point that matters most to Barry. On some of these
points the two are in doubt to the end, working often in the dark, but
fully deserving the rewards that finally come to them.

Booklist 16:347 Jl ’20


Cleveland p72 Ag ’20 50w

“The plot of ‘Gold out of Celebes’ reveals nothing particularly new.


The love interest is slight, but pleasing. It is the breezy way in which
this novel is written that carries it. The plot is a secondary matter
entirely, while the ‘red blood’ element, vivid enough at times, is
always kept discreetly within bounds.”

+ − N Y Times p23 Ag 8 ’20 650w


Springf’d Republican p11a Je 6 ’20
220w

DINNING, HECTOR W. Nile to Aleppo. il


*$7.50 Macmillan 940.42

“The author of this book is a captain in the Australian forces which


fought in the great war. Mr McBey was the official artist which
followed the army of the Egyptian expeditionary force and the two
together, the soldier and the painter, collaborated to produce a
volume which is not a book of the war, nor yet a book of travel, but a
combination of the two. The story begins at Taranto, away down in
far southern Italy. Here the force was simply in camp near the town,
and presumably a transport appeared in the harbor, her nose
pointing eastward and business opened up. Thence through
Palestine and Syria. The trail leads around the hills of Judea, through
its ravines and past its straggling orchards, and, at length, to the
Holy City. He takes us through the valley of the Jordan to Ludd; and
from Ludd to Damascus and thence to Homs; and from Homs to
Aleppo, where the train traversed the burning sands to Beyrouth.”—
Boston Transcript

“Captain Dinning is a born observer. He always contrives to see


what is worth seeing and to record it vividly, sometimes in the slangy
style of his diary, sometimes in the finished manner of his later
chapters. Occasionally his judgments are open to criticism.”

+ Ath p759 D 3 ’20 950w

“The whole is an intensely breezy narrative, written by a man who


understands well the use of his eyes and of the English language to
interpret what he sees.” E. J. C.

+ Boston Transcript p4 O 20 ’20 600w

“Mr McBey’s pen sketches deserve more than passing mention, for
he is no mere illustrator. His economy of line and his ability to
convey an indelible impression of these arid stretches of Palestinian
landscape, their undeniable color and beauty, are more than
fortuitous.”

+ N Y Evening Post p24 D 4 ’20 360w


+ Spec 124:245 Ag 21 ’20 300w

DIXON, THOMAS. Man of the people. *$1.75


Appleton 812
20–13190

This drama of Abraham Lincoln has one purpose: to show


Lincoln’s fight to save the Union. We see Lincoln on the one hand as
the friend of the oppressed and dispensing pardons according to a
deeper sense of justice than is apparent on the surface. On the other
hand we see him deal with implacable firmness to carry through his
great conviction that the Union must be saved. The whole is divided
into a prologue, three acts, and an epilogue.

“Melodramatic and inferior to Drinkwater’s play.”

+ − Booklist 17:61 N ’20

DOBIE, CHARLES CALDWELL. Blood red


dawn. *$1.75 (2c) Harper
20–10053

A story of San Francisco following the fortunes of a girl who has


her own living and her own way to make in the world. She is in turn a
stenographer in a business office, accompanist for a singer at
fashionable at-homes and Red cross concerts, and entertainer in a
Greek restaurant. The latter occupation takes her “south of Market”
and into a new social world where she meets the foreign born and
has a glimpse of the alien point of view on American life. Two men
have a part in her story, Ned Stillman, descendant of native stock,
and Dr Danilo, a Serbian doctor. The war is in progress at the time.

“Although it has merit, it is a rather tepid performance. Mr Dobie’s


faults, the faults of the novice, grow less noticeable as he warms to
his theme. But he fails to warm sufficiently. He handles all his
situations and incidents with the indifferent care of a man following
a recipe. In spite of its riotous title, ‘The blood red dawn’ is
distressingly smug.” M. A.

+ − Freeman 1:525 Ag 11 ’20 360w

“Well constructed romance. The author knows his San Francisco.


This story—his first full length book—gives a graphic and colorful
picture of intrigue in the foreign quarter of that city of lights.”

+ N Y Times 25:301 Je 6 ’20 420w

“The characters fail to transcend or to sublimate the type; are all,


by a shade, a little second-rate or common; and the result is a
disappointing effect, in a book containing so much veracious detail of
confused mediocrity. The opening chapters give us hope of creative
realism, and we seem to have received, when all is done, a
disconcerting blend of naturalism and romance.” H. W. Boynton

− Review 3:272 S 29 ’20 250w

DODD, MRS ANNA BOWMAN (BLAKE). Up


the Seine to the battlefields. il *$3 (3c) Harper 914.4
20–7447

“Why is it that not one traveler in a thousand, no, nor in tens of


thousands has known the Seine shores as the shores of the Hudson
are known—as the Rhine, for so many years, has been known and
sung? Few Frenchmen even are fully aware of the wonders and
beauties which a trip up the Seine will yield.” (Introd.) As one of the
effects of the war has been the discovery of the Seine’s commercial
possibilities the author fears that in a few short years the Seine will
no longer be “the lovely river of beauty.” She therefore proposes to
immortalize its many surprises in scenic and architectural splendors
in a book which is profusely illustrated from engravings and
paintings.

+ Booklist 17:27 O ’20

“The book is intensely interesting both for its geography and its
history.”

+ Cath World 111:694 Ag ’20 220w

“The book is an amiable introduction to modern French history;


and if Mrs Dodd’s manner is a trifle too intense for her subjects,
there is at least not a tiresome page in the whole volume.” M. F. Egan

+ − N Y Times 25:285 My 30 ’20 150w

“Such a volume as the present will be grateful reading to all those


who love France and who feel the force of the old days, no matter
how modern some parts of new France have become.”

+ Outlook 125:223 Je 2 ’20 80w

“Unfortunately Mrs Dodd’s style is too hasty—at points it is


positively slipshod—to carry the finer effects that would make for
complete success in such work as this.”

+ − Review 2:681 Je 30 ’20 300w

DODD, LEE WILSON. Book of Susan. *$2


Dutton
20–11147

“Susan is frankly a phenomenal child. After her stupid, bestial


father murders the woman with whom he is living, Susan is adopted
by a wealthy and cultured bachelor, and grows up to be a brilliant
woman who holds her own in his circle of scholarly and fashionable
friends.” (Outlook) “She is now old enough to be in love with [her]
guardian, who is, of course, in love with her. But Ambo’s two special
friends, a Yale professor and a New York radical, also love Susan.
Finally it takes a bomb from a Gotha in the streets of Paris to bring
Susan to the point of letting Ambo know that she loves him alone.”
(Bookman)

“The reason why one reader is unimpressed by this plot, and even
finds it absurd, is because he is unimpressed by Susan. She is over-
clever, over-sprightly. So, for that matter, is the whole book.” H. W.
Boynton
− Bookm 52:68 S ’20 500w

“For all its Stevensonesque touches, for all the moments when one
glimpses a mind like Pater’s, or a glimmer of Ibsen, through the
palings of the back fence, as it were, one has nothing, except a couple
of characters—say five—to take away with one. The first part of the
story is delightful.”

+ − Boston Transcript p6 Ag 7 ’20 430w

“The book is much above the average novel, and the author’s
insight into feminine psychology quite remarkable. Moreover, it has
the great quality of interest.”

+ Lit D p114 N 6 ’20 1650w

“Mr Dodd’s style is in another world from the gritty slovenliness of


the average story; the earlier part of his book is filled with ripe and
intense characterizations; the interpolated passages of criticism and
verse are mellow and delightful. But the fable of the book is the fable
of ‘Daddy Longlegs,’ not only in fact but, beneath all appearances of
intellectual subtlety and integrity, in tendency and spirit. We can
only hope that Mr Dodd will soon give us another novel in which his
grace of style and temper shall serve to express an austerer strain of
thought and imagination—austerer because it is truer and truer
because it does not compromise.”

+ − Nation 111:329 S 18 ’20 620w

“The people in this narrative are the genuine variety. The character
of Susan is a well rounded one. There is nothing commonplace about
‘The book of Susan.’ Mr Dodd writes in a fresh, entertaining style and
has shaped his materials with no little skill.”

+ N Y Times 25:28 Jl 4 ’20 530w

“In character depiction, in the give and take of dialogue, and in the
incidents, the novel is more arresting than the majority of the
American novels of the season.”

+ Outlook 126:67 S 8 ’20 100w

DODD, WILLIAM EDWARD. Woodrow Wilson


and his work. *$3 (4c) Doubleday
20–26482

“This portrait of Woodrow Wilson is designed to be a brief history


of recent times as well as a chronicle of a great career. It aims to set
the man in his historical background and to explain the trend of
American life during a momentous period of world history.” (Introd.)
“It is surely a record unsurpassed; and the fame of the man ... can
never be forgotten, the ideals he has set and the movement he has
pressed so long and so ably can not fail.” Contents: Youth and early
environment; The new road to leadership; New wine in old bottles;
The great stage; From Princeton to the presidency; The problem; The
great reforms; Wars and rumours of wars; The election of 1916; The
United States enters the war: “We are provincials no longer”;
Roosevelt or Wilson; The great adventure; The day of reckoning; The
treaty and the League; Index.
Booklist 16:343 Jl ’20

“It is fair to admit that Mr Dodd does his work with knowledge,
skill, and an independent judgment in details.” J. A. Hobson

+ Nation 111:189 Ag 14 ’20 1250w

“Although I am seldom in complete agreement with Professor


Dodd, and often a horizon’s distance away from him, I find myself
forced to the conviction that this book offers the fullest and fairest
amount of Wilson and his work that I have seen, or am likely to see
in many a day.” Alvin Johnson

+ − New Repub 24:36 S 8 ’20 2250w

“Quite the most discriminating, comprehensive and just


appraisement of Woodrow Wilson that has yet been made.”

+ N Y Times p21 S 12 ’20 550w


R of Rs 61:558 My ’20 230w

“As fairly as seems humanly possible, Prof. Dodd has maintained


the historical point of view, endeavoring to weigh all evidence
impartially, and taking counsel from friends and foes alike, and from
the president himself on various occasions.”

+ Springf’d Republican p8a S 19 ’20


1100w
Reviewed by W: L. Chenery

+ Survey 45:168 O 30 ’20 520w


+ The Times [London] Lit Sup p653 O 7
’20 110w

DODGE, HENRY IRVING. Skinner makes it


fashionable. il *$1 (5c) Harper
20–6285

“Meadeville was a suburban town of the highest class. It was made


up of plutocrats, prigs, good people, snobs, mean people, new-rich,
new-poor.” Perhaps William Manning Skinner was one of the “mean
people,” for he set the whole town by the ears in a sensational way.
He knew how human they all were, how they dreaded, most of all,
not to be in the height of fashion and not to do what the “best people”
did. So he set the ball a-rolling that was to change the riot of
extravagance in vogue among the newly-rich to a veritable riot of
simple living. And how he and his good wife, Honey, chuckled over it
all!

“Not as amusing as the earlier ‘Skinner’ stories.”

+ − Booklist 16:312 Je ’20


Cleveland p71 Ag ’20 50w

“The little book is a reservoir of bubbling humor, carrying with it a


lesson well worth heeding in these days.”
+ N Y Times 25:302 Je 6 ’20 550w

“A genuinely funny story.”

+ Springf’d Republican p13a Ap 25 ’20


260w

DODGE, LOUIS. Whispers. *$1.75 Scribner


20–6862

“Louis Dodge’s new hero is named Robert Estabrook, and it is


Beakman, the very unpleasant city editor of The News, who gives him
the nickname of ‘Whispers’ because of his defective speech.
Estabrook—or Whispers—arrives in Missouri City shortly after the
murder of old Pheneas Drumm, a dealer in masks and costumes,
reputed to be very rich, and goes first to the office of the highly
successful News. But not liking the looks either of Beakman or of The
News office—whereby he shows his good sense—he decides to try to
get a position on the rival paper, The Vidette. This he does. Also,
Whispers promises to solve the mystery of the Drumm murder
within two days. Of course he makes good.”—N Y Times

Booklist 16:280 My ’20


+ Cath World 112:121 O ’20 90w
“Mr Dodge has written a uniquely interesting book. The plot itself
is simple enough, the dénouement not surprising; but from the very
beginning a subtler interest is aroused by the genuine appeal of the
characters revealed and the picturesque quality of the city newspaper
life.”

+ − N Y Evening Post p3 My 1 ’20 480w


+ − N Y Times 25:240 My 9 ’20 350w

“Once the main thread begins to unwind, ‘Whispers’ plunges into


an exciting series of dangers. Either through his own, or the author’s
clumsiness, Estabrook does not display much craft in his sleuthing.”

+ − Springf’d Republican p11a Je 27 ’20


250w

“The long arm of coincidence is applied to its limit, but the story is
entertaining.”

+ Wis Lib Bul 16:237 D ’20 20w

DODWELL, C. E. W. Righteousness versus


religion. $2 Stratford co. 201
20–14752

In opposing righteousness to religion the author does not direct


his criticism against Christianity in the sense of the “righteousness,
simplicity and beauty” of the teachings of Christ, but against
dogmatic religion which he makes responsible for everything that
has gone wrong with the world. He charges it with promulgating
“mischievous errors, falsities and debasing superstitions, ignorance,
hypocrisy and narrow-minded bigotry and intolerance.” The contents
are: Religion; Many religions; The Christian religion; The works of
religion; The Bible; Righteousness. The postscript has paragraphs on
the future of the “Church” and “Religion”; on the effects of
Catholicism on Spain and Ireland; on the war; and a recommended
list of books for further reading.

“Of his tremendous sincerity there can be no doubt. It might fairly


be urged that the book fails to accord to its object of attack the usual
privilege of being judged by its best rather than by its worst. Yet his
assaults are put forward in such a whole-hearted and self-convinced
manner that what he says is not calculated to wound or affront.” L. S.

+ − Boston Transcript p6 N 3 ’20 1100w

[2]
DOLE, CHARLES FLETCHER. Religion for
the new day. *$2 (2½c) Huebsch 204

We are facing a momentous crisis in history of which some of the


profound facts are: insincerity in religion, and the parting of the
roads to which all churches alike have come. The object of the book is
to set forth a mode of religion that will now and henceforth serve, not
only for Christendom but for all mankind, as the spiritual gospel and
working force for a humane and democratic world and that,
wherever it is applied, can transform life. It neither antagonizes nor
favors any existing institution but insists on the need of some form of
social expression of the best that is in man. The contents fall into
sections: Signs of the times: how the facts point; The course of
spiritual evolution; The victorious goodness; The new civilization;
The religion within.
DOMBROWSKI, ERIC. German leaders of
yesterday and today. *$2 (2½c) Appleton 920
20–26749

These pictures of “uncensored celebrities of Germany” are painted


with much spirit, a satirical brush and much intimate knowledge of
the personalities and historical facts. Among the subjects are:
Friedrich Ebert; Erich Ludendorff; Theodor Wolff; Mathias
Erzberger; Georg Ledebour; Alfred von Tirpitz; Wilhelm II; Philip
Scheidemann; Von Bethmann-Hollweg; Ernst Graf zu Reventlow;
Hugo Haase; Richard von Kühlmann; Georg Graf von Hertling; Rosa
Luxemburg; Maximilian von Baden; Kurt Eisner; Karl Liebknecht;
Gustav Noske.

+ Booklist 17:29 O ’20

“Dombrowski’s power is nothing short of Carlylean.”

+ N Y Times p1 Ag 8 ’20 4100w

“As often happens in the case of sidelights, Dombrowski


illuminates only spots. He shows only this or that feature of his men
and women, leaving in the shadows many other features which in
fairness should be revealed. ‘German leaders of yesterday and today’
is highly entertaining, but its value is certainly not higher than that of
many books of the hour.”

+ − Review 3:538 D 1 ’20 170w


“Some of the sketches are satirical and frankly inimical. Almost all
are enlightening and amusing.”

+ R of Rs 62:334 S ’20 80w

“Eric Dombrowski’s ‘German leaders of yesterday and today’ has


the requisite impartiality and shows also an abundance of keen
insight. But these sketches were evidently written with some subtlety
as well as vivacity, and while the translator has contrived to preserve
the author’s spirit, the English is often confused or incorrect.”

+ − Springf’d Republican p11a Ag 8 ’20


600w

“Dombrowski tries to be clever and rarely succeeds, but he paints


vivid pictures of forty-five political leaders, publicists, and agitators,
which to the average American will prove illuminating.” C: Seymour

+ − Yale R n s 10:420 Ja ’21 160w

[2]
DOMVILLE-FIFE, CHARLES WILLIAM.
States of South America, the land of opportunity; a
complete geographical, descriptive, economic and
commercial survey. il *$5 Macmillan 918

“This work, which has been greatly enlarged and re-written since
its first appearance, now forms a comprehensive volume of
illustrated reference to the whole of the states of South America, and
not only as before, a few of the most important Latin-American
states.” (The Times [London] Lit Sup) Notice of the first edition
appears in the 1911 Digest Annual.

“The proportion of bare facts to textual comment is well studied


from beginning to end.”

+ N Y Evening Post p11 D 31 ’20 250w

“Aside from its mass of statistics and general information, the


chief value of this volume to the American business man lies in the
fact that it introduces him, with admirable candor, to the methods of
his chief competitor.” B. R. Redman

+ N Y Times p15 Ja 16 ’21 840w


The Times [London] Lit Sup p707 O
’20 40w

DOMVILLE-FIFE, CHARLES WILLIAM.


Submarine warfare of today. il *$2.25 Lippincott
940.45
20–26104

The book contains “records of many romantic events on England’s


sea frontier, 1914–1918. There are descriptions of the organization
and preparation of the new navy to meet the submarine menace, and
of the new weapons devised. Much attention is given to details and
explanation of how things were done; there is an examination of the
effect of the submarine on naval strategy.”—Booklist
Booklist 16:164 F ’20
“His book is full of romance as well as of facts. The
only criticism which is permissible is that the book is
somewhat lacking in detailed description of the
instruments used.”

+ − Nature 105:36 Mr 11 ’20 240w

“‘Submarine warfare of today’ is a disappointing book. Based on


inadequate information, and characterised by annoying repetition, it
falls a long way short of the claims which are made by the publishers’
note on the wrapper. If the author is ill-informed as to his facts, not
less displeasing is his English.”

− Sat R 129:283 Mr 20 ’20 510w

“Mr Domville-Fife’s is a book to be carefully read by all those who


look forward to the promised formal histories of the navy’s share in
the war.”

+ − The Times [London] Lit Sup p706 D 4


’19 850w

DOMVILLE-FIFE, CHARLES WILLIAM.


Submarines and sea power. *$2.50 Macmillan 359
(Eng ed 19–18399)
“In this treatise the author examines the effect of the submarine on
naval strategy, not as a mere matter of history, but as a guide to
preparation for the next naval war.” (Ath) “He says that, though we
hope that the League of nations will make war impossible in future,
we have no right whatever to rely on this blessed consummation.
Until we are entitled to dismiss war as an exhausted evil, which can
never return, we must either keep our place on the sea or sink to live
at the mercy of other nations. Will the submarine make it more
difficult for us to retain our position or not? That is the question
which he endeavours to answer.” (The Times [London] Lit Sup)

+ Ath p1048 O 17 ’19 70w

“Most instructive volume.”

+ The Times [London] Lit Sup p539 O 9


’19 1450w

DONNELLY, ANTOINETTE. How to reduce:


new waistlines for old. il *$1 Appleton 613
20–17245

This is a jolly little book which makes the trip from Fatland into
Slimville an interesting adventure rather than a dismal undertaking.
The author writes from a wide experience and her “simple and
commonsensible rules for reduction” are emphasized by wit, humor
and jingles which seem to defy her own rules by never losing weight.
The menus given “require no additional expense to the household
budget nor do they need to upset the meal planning to any
unreasonable degree.” The exercises given are illustrated and the
contents are: A little physical geography; Some Slimville arguments;
Hard facts on a soft subject; The dangerous age; Get the weighing
habit; Reduce while you eat; What is an average helping; Reduced
thirty-six pounds in six weeks; Exercise; Recipes without butter,
flour and sugar. The author is “beauty editor” of the Chicago Tribune.

DONNELLY, FRANCIS PATRICK. Art of


interesting; its theory and practice for speakers and
writers. *$1.75 Kenedy 808
20–18519

The author regards the imagination as the source of interest in


written and oral speech, and says that “The place of imagination in
prose” might serve as a substitute title for his book. “In the earlier
chapters various specific manifestations of the imagination are
described and exemplified; then follow several chapters on particular
authors, whose methods of interesting are examined in detail. The
final chapters go into the theory of imagination.” (Preface) Among
the titles are: The tiresome speaker; Interest from directness; The art
of eloquence and the science of theology; Newman and the academic
style; Macaulay and “journalese”; Tabb and fancy; Poetry and
interest; Developing the imagination; Exercises for the imagination.
Parts of the book have appeared in the Ecclesiastical Review,
Catholic World and America.

“He has a delicate appreciation of the best in literature and a


genius for penetrating beneath the polished work of art to discover
the artistry.”
+ Cath World 112:389 D ’20 350w

DOOLEY, WILLIAM HENRY. Applied science


for metal workers. il $2 Ronald 671
19–15024

“The suggestion of the title that the content is of value only to the
metal-worker is misleading, for this book is in fact an elementary
treatise in the field of technology in general. It deals with
fundamental principles of chemistry and physics in their relation to
our daily life. One-eighth of the material handled, perhaps, applies
specifically to metal-working trades; the remainder is of general
informational value to the average layman as well as to the metal-
worker.”—School R

Booklist 16:117 Ja ’20

“Mr Dooley has been very successful in many of the chapters in


showing that the sciences of physics and chemistry, which in general
are too abstract for students in the elementary school, can be put in
such a way as to arouse a good deal of interest and promise full
understanding on the part of immature students.”

+ El School J 20:393 Ja ’20 100w


Quar List New Tech Bks Ja ’20 100w
“The book is well within the range of evening- and continuation-
school attendants, particularly those engaged in the distributive and
productive industries. It should prove of value as a text in vocational
high schools and in those regular high schools that are able to
differentiate their courses for the benefit of that portion of their
school population which graduates into industry.” H. T. F.

+ School R 28:155 F ’20 220w

DOOLEY, WILLIAM HENRY. Applied science


for wood-workers. il $2 Ronald 684
19–15025

The first chapters on the general principles of science underlying


all industry are identical with those in “Applied science for metal
workers.” These are followed by seven chapters specifically relating
to woodworking trades.

Booklist 16:117 Ja ’20


+ El School J 20:393 Ja ’20 100w
Quar List New Tech Bks Ja ’20 40w

DORRANCE, MRS ETHEL ARNOLD


(SMITH), and DORRANCE, JAMES FRENCH.
Glory rides the range. il *$1.75 Macaulay co.
20–5585

“Gloriana’s father was Blaze Frazer, owner of a horse ranch near


the ‘Solemncholy desert.’ Frazer’s delicate and refined wife had
mysteriously disappeared some years before the story opens. Frazer
receives a penciled letter post-marked Nogales, Mexico, telling him
that there is a woman there who ‘sometime cry for Blaze and Glory
and says her name is Frazer.’ The writer further requests Frazer to
come for the woman and bring with him $5,000 gold for ‘expenses.’
Frazer raises the money and starts for Mexico in the hope of finding
his wife; before leaving he leases the ranch to one Timothy Rudd and
arranges for the girl to live with a friend during his absence.
Gloriana, however, decides otherwise; Rudd was a bad character and,
refusing to recognize the validity of the lease, she assumes charge of
the ranch herself. The exciting incidents which followed her decision
furnish the theme of this story. In the end Gloriana is in her mother’s
arms and a prospective husband is hovering near by.”—N Y Times

+ Boston Transcript p4 S 4 ’20 240w


N Y Times 25:287 My 30 ’20 320w

“When you read ‘Glory rides the range’ you feel that Ethel and
James Dorrance must have had a ‘bully good time’ writing it, so
enthusiastically and blithely does it gallop from one thrilling
situation to another.” E. M. Brown

+ Pub W 97:999 Mr 20 ’20 340w


DOSTOEVSKII, FEDOR MIKHAILOVICH.
Honest thief and other stories. *$2 (1c) Macmillan
20–26192

This is the eleventh volume in Mrs Garnett’s translation of the


works of Dostoevsky. It contains ten stories: An honest thief; Uncle’s
dream; A novel in nine letters; An unpleasant predicament; Another
man’s wife; The heavenly Christmas tree; The peasant Marev; The
crocodile; Bobok; The dream of a ridiculous man.

“Perhaps Dostoevsky more than any other writer sets up this


mysterious relationship with the reader, this sense of sharing. While
we read, we are like children to whom one tells a tale: we seem in
some strange way to half-know what is coming and yet we do not
know; to have heard it all before, and yet our amazement is none the
less, and when it is over, it has become ours. This is especially true of
the Dostoevsky who passes so unremarked—the child-like, candid,
simple Dostoevsky who wrote ‘An honest thief’ and ‘The peasant
Marey’ and ‘The dream of a ridiculous man.’” K. M.

+ Ath p1256 N 28 ’19 850w


+ Booklist 16:243 Ap ’20

“Fortunately for the reader, Dostoevski’s desperation of human


nature drove him to ridicule rather than to melancholy, and for
ridicule he was admirably equipped with a lively and stinging wit. Of
the ten stories which make up the volume, ‘Uncle’s dream’ is
probably the most entertaining.” G. H. C.
+ Boston Transcript p6 F 14 ’20 550w

“Insouciance, self-possession of the absolute much prized French


variety, the all containing nonchalance, the iron-nerved sense of
form, Dostoevsky apparently cannot claim. His close realism quite
lacks easiness and is impersonal in a rough and elemental, not an
accomplished way; he has no suggestion of the considered faint irony
of Chekhov. His eminence is the eminence of endowment, not of
training or consideration; he is the great artist of few
accomplishments.” C: K. Trueblood

+ − Dial 68:774 Je ’20 800w

“The stories and sketches in this volume of Dostoevsky are not


among his best. His humor is not happy; his compassion is less
exercised when he deals with the higher ranks of society. But always
there is the incomparable steadfastness of vision and innocence of
the imagination that follows life, that does not seek to distort it, and
that finds man in his humanity alone.” L. L.

+ − Nation 110:sup488 Ap 10 ’20 110w

“The restraint and aloofness of the great comic writers are


impossible to him. It is probable, for one reason, that he could not
allow himself the time. ‘Uncle’s dream,’ ‘The crocodile,’ and ‘An
unpleasant predicament’ read as if they were the improvisations of a
gigantic talent reeling off its wild imagination at breathless speed.
Yet we are perpetually conscious that, if Dostoevsky fails to keep
within the proper limits, it is because the fervour of his genius goads
him across the boundary.”
+ The Times [London] Lit Sup p586 O 23
’19 950w

DOUDNA, EDGAR GEORGE. Our Wisconsin; a


school history of the Badger state. 72c Eau Claire bk.
& stationery co., Eau Claire, Wis. 977.5
20–8513

The book is intended for use in the upper grades of the schools of
the state, it being a law of Wisconsin that its history and government
be taught in the common schools. It is as definite and as concrete as
brevity permits. Beginning with Jean Nicolet, the first white man to
set foot on Wisconsin soil in 1634, the book describes the Indians,
the first settlers, the various nationalities that have made Wisconsin
their home, its attitudes in national crises, its laws and industries,
etc.

Wis Lib Bul 16:117 Je ’20 30w

DOUGLAS, CLIFFORD HUGH. Economic


democracy. *$1.60 (6c) Harcourt 330.1
20–5264

“This book is an attempt to disentangle from a mass of superficial


features such as profiteering, and alleged scarcity of commodities, a
sufficient portion of the skeleton of the structure we call society as
will serve to suggest sound reasons for the decay with which it is now
attacked: and afterwards to indicate the probable direction of sound
and vital reconstruction.” (Preface) The author sees in the
centralizing power of capital one of the chief reasons for this decay
and in a decentralized cooperation of individuals a direction that a
sound and vital reconstruction will take. After analysing our present
decaying economic and political structure and considering the
imminence of a general rearrangement, he rejects collectivism “in
any of the forms made familiar to us by the Fabians and others” and
insists on “the maximum expansion in the personal control of
initiative and the minimizing, and final elimination, of economic
domination, either personal or through the agency of the state.”

Am Econ R 10:571 S ’20 60w

“It is extremely difficult to find a flaw in this doctrine on the basis


of ethics or equity, as for the practical workings of any system which
attempts to put this poetic Justice into action we must await the
event.” J. L.

+ Ath p445 Ap 2 ’20 1250w

“Those who agree with the premises will find the logic irresistible.
Others will be stimulated by the original though unorthodox thinking
and the fertile suggestions of the author’s scheme.”

+ Booklist 16:299 Je 20
“Mr Douglas is by no means clear as to the details of his case,
although his general contention has substantial force.” Ordway Tead

+ − Dial 69:412 O ’20 640w

“The orthodox economists are in such a helpless muddle in regard


to soaring prices that it is a relief to find a thinker who does not
scatter explanations with a shot gun all over the barn door but goes
straight to his mark. Unfortunately the book is too brief. Excessive
concentration has left it obscure in vital portions.”

+ − Nation 111:19 Jl 3 ’20 350w

“Major Douglas knows his difficult subject from end to end. If the
fates had blessed him with the gift of clear exposition we might have
had here a volume of note. When he determines to keep clear from
terms which demand explanations, and concentrates on clarifying his
message of social regeneration, those who pay lip service to formal
political democracy will find in him a telling recruit to the growing
band of thinkers who deny the name of democracy to any system not
based upon economic freedom.”

+ − Nation [London] 27:184 My 8 ’20 800w

“This small book offers much room for controversy both as to its
technical analysis of the effects of current accounting and credit
practices and as to the feasibility of remedies advocated. The ground
for controversy is widened by the author’s unfortunately vague and
sometimes bombastic style.” E. R. Burton

+ − Survey 44:541 Jl 17 ’20 280w


DOUGLAS, OLIVE ELEANOR
(CONSTANCE) (LADY ALFRED DOUGLAS).
Penny plain. *$1.90 Doran

A story of a quiet little Scottish town. Priorsford is the home of a


number of quaint and interesting people. Here Jean Jardine lives
with her two brothers and “the Mhor,” Gaelic for “the great one,” the
pretentious name given to a little boy of seven. Into this placid
atmosphere comes the Honourable Miss Pamela Reston, who is tired
of London life. The story tells of how she fits into Priorsford society
and how she and Jean become fast friends, and there is much
description of tea-parties and country social life. Then comes an
unexpected legacy for kind-hearted little Jean and romance, too,
appears in the person of Pam’s younger brother. Pam herself finds
the fulfilment of a hope of twenty years’ standing which has kept her
single all this long time. The title comes from the dialogue of the
shopman and the small boy: the shopman saying “You may have
your choice—penny plain or twopence coloured.” the small boy
choosing the penny plain, as “better value for the money.”

“A pleasant book to read. But we cannot help thinking it would be


pleasanter still without the perfunctory introduction of a
loveinterest, and of other irrelevances considered more or less
indispensable in fiction.”

+ − Ath p244 Ag 20 ’20 120w

“The children make the book, especially Gervase and his dog. It is
worth reading for them alone.” I. W. L.

+ Boston Transcript p4 D 11 ’20 480w


“Miss Douglas’s new book in two ways partakes of a quality little
short of the miraculous. It is a post-war story without a trace of war-
weariness or bitterness; and it is full of people who are nice with the
added charm of being entertaining. As a story ‘Penny plain’ leaves
something to be desired. Let us add that if an author is to be judged
by her literary preferences and illusions and quotations, Miss
Douglas deserves a very high mark.”

+ − Spec 125:342 S 11 ’20 440w

“A very able and delightful book, but it is not the kind of book that
the Marxian kind of person would like. The author has a good style
and a subtle sense of humour, together with the skill necessary for
the gradual unfolding of the characters.”

+ The Times [London] Lit Sup p534 Ag


19 ’20 570w

[2]
DOWST, HENRY PAYSON. Bostwick’s
budget. il *$1 Bobbs 331.84
20–18296

“An inspiring bit of a book for all those in debt; being the Odyssey
of Sam and Lucy, who owed $4,016.69 and through the advice of a
sagacious old lawyer and the use of grit, in a comparatively short
time found themselves out of debt and with money in the bank.”—
Cleveland
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!

ebookfinal.com

You might also like