From the Publisher
, 2nd Edition,
provides a developer-level introduction along with the more
originated and evolved into what it is today. A detailed discussion
with specific focus on standards such as ECMAScript and the
implementations used in different popular web browsers are also
Building on that base, the book moves on to cover basic concepts
inheritance, and its use in various markup languages such as HTML.
An in-depth examination of events and event handling is followed by
an exploration of browser detection techniques and a guide to using
knowledge and applies it to creating dynamic user interfaces.
The last part of the book is focused on advanced topics,
including performance/memory optimization, best practices, and a
This book is aimed at three groups of readers:
- Experienced developers familiar with object-oriented
traditional OO languages such as Java and C++
- Web application developers attempting to enhance the usability
of their web sites and web applications
In addition, familiarity with the following related technologies
is a strong indicator that this book is for you:
This book is not aimed at beginners who lack a basic computer
science background or those looking to add some simple user
interactions to web sites. These readers should instead refer to
This book covers:
today. Concepts introduced include the relationship between
Browser Object Model (BOM). A discussion of the relevant standards
from the European Computer Manufacturer's Association (ECMA) and
the World Wide Web Consortium (W3C) is also included.
used in conjunction with HTML to create dynamic web pages.
its relationship to the element.
- Language Basics-Introduces basic language
concepts, including syntax and flow control statements. Explains
languages and points out the differences. Type coercion is
introduced as it relates to built-in operators.
- Variables, Scope, and Memory-Explores how
nature. A discussion about the differences between primitive and
reference values is included, as is information about execution
context as it relates to variables. Also, a discussion about
when variables go out of scope.
- Reference Types-Covers all of the details
Object and Array. Each reference type described
in ECMA-262 is discussed both in theory and how they relate to
- Object-Oriented Programming-Explains how to
no concept of classes, several popular techniques are explored for
object creation and inheritance. Also covered is the concept of
function prototypes and how that relates to an overall OO
- Anonymous Functions-Explores one of the most
closures, how the this object works, the module pattern,
and creating private object members.
- The Browser Object Model-Introduces the
Browser Object Model (BOM), which is responsible for objects
allowing interaction with the browser itself. Each of the BOM
objects is covered, including window, document,
location, navigator, and screen.
- Client Detection-Explains various approaches
to detecting the client machine and its capabilities. Different
techniques include capability detection and user-agent string
detection. Each approach is discussed for pros and cons as well as
- The Document Object Model-Introduces the
defined in DOM Level 1. A brief introduction to XML and its
relationship to the DOM gives way to an in-depth exploration of the
entire DOM and how it allows developers to manipulate a page.
- DOM Levels 2 and 3 Explains how DOM Levels 2
and 3 augmented the DOM with additional properties, methods, and
objects. Compatibility issues between Internet Explorer and other
browsers are discussed.
- Events-Explains the nature of events in
redefined how events should work. A variety of devices are covered,
including the Wii and iPhone.
enhance form interactions and work around browser limitations.
Discussion focuses on individual form elements such as text boxes
and select boxes and on data validation and manipulation.
- Error Handling and Debugging-Discusses how
to handle errors. Debugging tools and techniques are also discussed
for each browser, including recommendations for simplifying the
(XML) data. Explains the differences in support and objects in
various web browsers, and offers suggestions for easier
cross-browser coding. This also covers the use of eXtensible
Stylesheet Language Transformations (XSLT) to transform XML data on
- ECMAScript for XML-Discusses the ECMAScript
simplify working with XML. Explains the advantages of E4X over
using the DOM for XML manipulation.
- Ajax and JSON-Looks at common Ajax techniques,
including the use of the XMLHttpRequest object and
Internet Explorer''s XDomainRequest object for
cross-domain Ajax. Explains the differences in browser
implementations and support as well as recommendations for
- Advanced Techniques-Dives into some of the
partial function application, and dynamic functions. Also covers
creating a custom event framework to enable simple event support
for custom objects.
- Client-Side Storage-Discusses the various
techniques for storing data on the client machine. Begins with a
discussion of the most commonly supported feature, cookies, and
then discusses newer functionality such as DOM storage.
- Best Practices-Explores approaches to working
maintainability are discussed, including coding techniques,
formatting, and general programming practices. Execution
performance is discussed and several techniques for speed
optimization are introduced. Last, deployment issues are discussed,
including how to create a build process.
- Upcoming APIs-Introduces APIs being created to
yet complete or fully implemented, they are on the horizon and
browsers have already begun partially implementing their features.
Includes the Selectors API and HTML 5.
ECMAScript 3.1, ECMAScript 4, and ECMAScript Harmony are
From the Jacket
to understand its nature, history, and limitations. This book sets
present-day incarnations that include support for the DOM and Ajax.
It also shows you how to extend this powerful language to meet
specific needs and create seamless client-server communication
without intermediaries such as Java or hidden frames.
version of object-oriented programming, inheritance, and its use in
HTML and XHTML. A detailed discussion of the components that make
standards such as ECMAScript and DOM. All three levels of DOM are
explained, including advanced topics such as event simulation, XML
parsing, and XPath queries. You''ll also learn how to utilize
regular expressions and build dynamic user interfaces. This
business problems faced by Web developers everywhere.
What you will learn from this book
Ways to detect the client machine and its capabilities
Debugging tools and techniques for each browser
Steps for reading and manipulating XML data
How to create a custom event framework
Various techniques for storing data on the client machine
Who this book is for
This book is for Web developers who want to use
and Web applications and for those with programming experience,
especially object-oriented programming experience.
Wrox Professional guides are planned and
written by working programmers to meet the real-world needs of
programmers, developers, and IT professionals. Focused and
relevant, they address the issues technology professionals face
every day. They provide examples, practical solutions, and expert
education in new technologies, all designed to help programmers do
a better job.
About the Author
Nicholas C. Zakas has a B.S. in Computer Science
from Merrimack College and an M.B.A. from Endicott College. He is
the coauthor of Professional Ajax, Second Edition (Wiley,
2007) as well as dozens of online articles. Nicholas works for
Yahoo! as a principal front-end engineer on Yahoo!'s front page and
a contributor to the Yahoo! User Interface (YUI) Library. He has
worked in web development for more than eight years, during which
time he has helped develop web solutions in use at some of the
largest companies in the world. Nicholas can be reached through his
web site www.nczonline.net.PM
About the Book
offers you an in-depth look at the numerous advances to the
through topics such as debugging tools in Microsoft Visual Studio,
FireBug, and Drosera; client-side data storage with cookies, DOM
storage, and client-side databases; HTML 5, ECMAScript 3.1, the
Selectors API; and design patterns including creational,
structural, and behavorial patterns.