Practical JavaScript for the Usable Web
April 26, 2002
|
This is a new kind of JavaScript book. It's not cut'n'paste,
it's not a reference, and it's not an exhaustive investigation of
the JavaScript language. It is about client-side, web-focused,
and task-oriented JavaScript.
|
JavaScript is a core skill for web professionals, and as every
web professional knows, client-side JavaScript can produce all
sorts of glitches and bugs. 'Practical JavaScript for the Usable
Web' takes a two pronged approach to learning the JavaScript that
you need to get your work done: teaching the core client-side
JavaScript that you need to incorporate usable interactivity into
your web applications, including many short functional scripts,
and building up a complete application with shopping cart
functionality.
When you have finished working with this book, you'll have a
thorough grounding in client-side JavaScript, and be able to
construct your own client-side functionality quickly, easily,
and without falling into any of the usability traps that this
technology leaves wide open.
This book covers:
- Usability techniques
- Working scripts that can be incorporated into your web applications immediately
- Step-by-step breakdown of JavaScript shopping cart functionality
- Advanced data validation techniques
Who is this book for?
This is for readers who are either learning JavaScript from scratch, or who have a little experience - perhaps with Dreamweaver behaviors, or incorporating scripts into their pages. It assumes a thorough understanding of HTML, and a little CSS experience.
Table of Contents?
- Chapter 1: Getting Started with JavaScript
- Chapter 2: Data and Decisions
- Chapter 3: Functions and Code Design
- Chapter 4: Interacting with the Web Browser
- Chapter 5: Windows and Frames
- Chapter 6: DHTML for IE4 and NN4
- Chapter 7: The DOM: DHTML for the Latest Browsers
- Chapter 8: Advanced Form Techniques
- Chapter 9: Passing Information Between Web Pages and Data Storage
- Chapter 10: Data Validation Techniques
Getting Started with JavaScript
JavaScript has grown steadily in both popularity and capability since its
inception and is now the number one browser scripting language. The technology
has two key strengths: cross-browser
support, and the ease with which it can be programmed. So successful has the
JavaScript technology become that it's no longer used for browser-�based programming
alone, but also for programming PDF files and web server programming.
While the JavaScript language has been growing in capability, browsers themselves
have also become much more programmable, enabling developers to access more
of the page and its HTML elements. So JavaScript browser programming can now
be extremely sophisticated and functional.
Consequently, a book about JavaScript might cover all sorts of things, so
we've narrowed down the field of exploration to concentrate on using JavaScript
to develop user interfaces for web pages and applications that are both usable
and functional. In the first few chapters we will look at the essentials of
the JavaScript language, and then move on to implementing it: using DHTML to
dynamically change pages after they have loaded, validating data entered by
the user, and building more interaction into applications than is possible with
HTML alone.
We'll be creating a lot of short scripts in the chapters that follow, and we'll
tie everything together into a large application that builds up through the
book: an image viewer with shopping cart
functionality. We'll start by constructing a web page that enables visitors
to view large libraries of images, which would work well for sites with large
numbers of images on them like a fanzine site. This part of the application
will show you how to create effective user interfaces with JavaScript, and demonstrate
how the usability of the web site can be improved with such an interface.
As we progress through the book we'll add e-commerce functionality to the site
so that visitors can buy the images as well as view them. We'll look at how
JavaScript can be used to create shopping baskets, to obtain the information
needed to place an order, and to validate that information. We'll be concentrating
our efforts on the front����-�end development process, leaving the server-side
for another book.
Of course, it all begins here with this chapter, and this is where we'll set
up the rest of the book by looking at:
1.
What JavaScript is and what it can do for us
2.
The advantages and disadvantages of JavaScript; the problems you are
likely to encounter during JavaScript development, and the solutions to those
problems.
3.
JavaScript in a web page and essential syntax
4.
Object Oriented Programming (OOP)� � sometimes also termed Object Oriented Development (OOD) � in relation to
JavaScript the web browser.
5.
Writing and running a simple JavaScript program
Many of you will already have come across JavaScript, and already have an idea
of what it is and what it can do, so we'll move quite swiftly through the language
and its capabilities first.
Practical JavaScript for the Usable Web
What is JavaScript?
|