UXD: User Experience Design

Book Review: Beginning Javascript with DOM Scripting and Ajax

Despite its title, Beginning Javascript with DOM Scripting and Ajax is not for those just starting out in web development.  What it is, is a great resource for those that already have some experience coding dynamic web sites.
The book explores the principals of DOM scripting (using the Document Object Model) to build dynamic pages the right way- with standards compliant code that maintains the separation between content and presentation.
The early chapters are devoted to giving the reader a quick overview of Javascript.  chapter one takes a look at basic syntax and simple functions.  Chapter Two covers datatypes and conditionals.  If you don't know Java script, you might want to start with something else, such as Beginning JavaScript Second Edition
 
  by Paul Wilton.  Some of the concepts and techniques used later on in the book require greater familiarity with Javascript than a begginer would have.

After the brief introduction to Javascript, the book tackles the DOM, and specifically how you can use it to create dynamic pages.  Chapter Four describes how your scripts can access as well as create HTML elements using the DOM.  Chapter Five is all about the Javascript interaction with CSS (Cascading Style Sheets) and how to set up scripts that allow designers to change the presentation layer of web pages without manipulating the content layer.  There are some great examples here of standards compliant scripting, including applying and removing classes and whole style sheets dynamically.  It also contains some examples of event handlers that help keep presentation and content separated.  Chapters Six and Seven talk about how Javascript can be used in a standards compliant manner to interact with images windows and forms.  I found the image rollover and slide-show scripts to be very useful.

From chapter Eight on, the book deals with Ajax, and specifically how you can use Javascript to  build objects that can dynamically interact with a back end.  Chapter Eight is a good introduction to the basic idea of Ajax, which is a term that was coined by Jesse James Garret in a February 2005 article, and is short for Asynchronous Javascript and XML.  The chapter also provides quite a few useful examples of Ajax in action, including a script that displays RSS feeds generated from a PHP file on the server, a good Connected Select Boxes script, and some Dynamic Menus.  It also includes a good refrain for those who are thinking about implementing Ajax into their web site.  If there's no good reason to do it, don't do it.

Chapter Nine shows you how you can use Javascript to validate incoming (from the server) and outgoing (from the user) data, and in chapter Ten, the author puts many of the earlier principals we learned together by walking us through the creation of a dynamic Ajax driven image gallery.

If you are looking to either learn more about creating standards compliant dynamic web sites, write code that allows for easy maintenance by designers, or add rich interactions to your site via Ajax, Beginning Javascript with DOM Scripting and Ajax is a great resource.

      

Leave a comment

Powered by WP Hashcash

About Pathfinder

  • We design and build extraordinary applications for companies looking to make the next great idea a reality.
  • learn more

Topics

WordPress

Comments about this site: info@pathf.com