- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
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
About Pathfinder
Recent
- Firefox Plugin Malware ‘Trojan.PWS.ChromeInject.A’
- Pathfinder releases version 1 of the its Flash Platform microsite (codename Mica)
- Pimp my Rails: Five Plugins & Gems to Make Rails Better
- iPhone: Using Pre-processor Directives for Device Testing
- Subtle OpenGL Projection Matrix Difference Between iPhone Simulator and Device
- App Security: Throw Out the Org Chart!
- Pimp my jQuery: Five plugins to replace the features Prototype and Scriptaculous users expect
- Thanksgiving 2008: What We’re Thankful For (In Rails)
- iPhone SDK: Testing with TextMate & GTM
- GWTQuery - JQuery-like Syntax in GWT
Archives
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006

