Customer Reviews

93
4.4 out of 5 stars
DOM Scripting: Web Design with JavaScript and the Document Object Model
Format: PaperbackChange
Price:$25.82 + Free shipping with Amazon Prime
Your rating(Clear)Rate this item


There was a problem filtering reviews right now. Please try again later.

Showing 1-10 of 25 reviews (4 star)show all reviews
23 of 24 people found the following review helpful
on February 6, 2006
Format: Paperback
The intent of the author is to show how JavaScript, with the DOM Api, can indeed be used in an intelligent way, debunking the myth (somehow justified by the horrific javascript code laying around) that "scripting languages" are somehow inherently inferior to compiled ones. Incidentally, this effort is similar to what Damian Conway has recently done, in a larger scale, for Perl ("Perl Best Practices").

The book is at its best when it describes how to methodically partition the design of a web page in 3 areas: the content-markup (xhtml), the presentation (css), the behavior (JavaScript, DOM). Jeremy Keith achieves this not by abruptly inflicting the reader with massive dosis of W3C standards, but rather "by evolution", taking one example (an "image gallery") coded in the traditional way, and continuously improving and refining it. Incidentally, the web pages that emerge are of a stunning beauty.

The book has its weak moments; I mention only two of them, one on the theory, the other on programming:

1) an apparent inconsistency on the properties of childNode[] array. After having repeatedly stated that this array contains ALL the children of an element node ("including the attribute nodes", see p. 67), it suddenly states (p. 70, p. 154, etc) that the text node of a paragraph node is the first and ONLY node of childNodes[]. Some tests (using elements that had attributes) confirmed that this last statement was correct. So, apparently, the childNodes[] array of an element does NOT report its attribute nodes, contradicting the first assertion.

2) the function "showPicture()", the central routine of the example that runs across all the book. All is fine, until Jeremy suddenly decides to change (ch 6, p. 106) its return to "true" when the function fails, and "false" when it succeeds. This is done in order to easily propagate the indication to the browser whether to follow the link or not, but... let me put it this way: would you write routine "start_shuttle()" to return "true" when the requested action fails, just because it makes life "easier" (?) for some intermediate caller routine? let's hope not (for the astronauts' sake).
Furthermore, as show Picture() had multiple returns inside, each one of them had to be tweaked in the "tricky" way; contrast this potential maintenance nightmare with instead returning the right value and simply switching it in the caller. The code (a la D. Conway "self-documented" way) could be:
"var followLink = ! showPicture(); return followLink".
A comment can be added to remove any residual doubt for people maintaing the code in future: "if showPic() succeds, tell browser not to follow the link, and viceversa".

I want to underline that, while the code is sometimes of poor quality, the design of the software of the examples is excellent, way above anything else that one sees for JavaScript. Separation of "behavior" from "content" was not an empty slogan; by chapter 7, the goal is reached. Not only all the JavaScript code is out of the html page, but even the elements that were not strictly "content" are out (they are now dynamically created).
And the page works without a glitch ("gracefully degraded", as Jeremy says) even if JavaScript is disabled (or if it is a robot reading it, etc). Fantastic.

I therefore reccomend this book to anyone interested to a methodic introduction to client-side programming with JavaScript and the DOM. A good Css book (like the one from Lie & Bos, to reach exactly the same objective on the presentation side) can be a great companion, on this trip to greater things (Ayax & co).
11 commentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
12 of 12 people found the following review helpful
on May 4, 2006
Format: Paperback
The book presents an excellent overview of DOM scripting for those who are unfamiliar with the topic. If you have read other books that cover the subject, though, you will only find a few additional useful peices of information not found elsewhere (e.g., writing code that degrades gracefully is *excellent* in this book).

I did have some problems with the book though. As at least one other reader mentioned, the book is *extremely* repetitive; to the point where I was utterly frustrated with an otherwise well written book. Also, this book is most definitely for beginners. As I mentioned, if you have some DOM experience you won't find this book as useful as someone without any such experience.

Overall, I feel the few useful nuggets I took away were useful but probably not worth the full price of the book. A different but excellent choice might be "DHTML Utopia - Modern Web Design Using Javascript and DOM" by Stuart Langridge. It covers the DOM as well as other very useful javascript technologies.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
11 of 11 people found the following review helpful
on July 20, 2006
Format: Paperback
This book is great because it totally ignores all the other Javascript programming books that came before it. What I mean is that this book focuses on using the DOM and Javascript to accomplish tasks rather than perpetuating the Netscape Navigator 4/Internet Explorer 5 Javascript development practices. (Of course, this is what it should do, considering the title of the book.)

Another reviewer referred to the repetition in the content. Personally I find this useful as it reinforces the earlier material. (A teacher once told me that she had to repeat things about eight times before the information really sank into her student's heads.)

The only two critical comments I have are:

1. I would have liked to see more information on using/validating forms.

2. The Javascript based image gallery application seems to be a bit of a stretch for me. (Personally I think this kind of thing is better served by a server-based solution.) A better example might have been an examination of a registration process for a software package's beta program.

Other than that, the book is very good. It shows the preferred "web standards" way of using Javascript and the DOM. It will challenge people new to scripting, but in a good way. Recommended .
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
12 of 13 people found the following review helpful
on October 26, 2005
Format: Paperback
Is this book for the advanced? No. More importantly, perhaps, it really is a book about the DOM, not about Javascript in general.

I'd already been pretty comfortable with Javascript and DOM manipulation by the time I finally picked up this book. Of course, I was comfortable with these topics primarily because I'd spent time dissecting Jeremy Keith's own Adactio Elsewhere, a brilliant and dynamic javascript-powered Web 2.0 application.

But there's no coverage at all here of objects, closures, or any of the hairier stuff that makes scripts like sIFR and Prototype tick.

So while I was disappointed to not see these more complicated topics, those that are presented are presented clearly and always with best-practices highlighted. Keith demonstrates the advantages of doing things the "right way", rather than just whacking us all over the head with some guilt-trip about accessibility.

If you've never dipped your hand into the increasingly less scary cauldron that is modern javascript, this book might be just the thing you need for that first step. It's only a small step farther to GMap mashups and greasemonkey scripts!
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
8 of 8 people found the following review helpful
on July 28, 2006
Format: Paperback
I've been itching to properly learn Javascript for a while and had been doing so with the Javascript Bible. That is one heavy book, although a bit out-dated now. I finally came across this book and boy am I glad I did. I've learnt more concepts about javascripting practices than any other book or resources I've referred to.

This book, in my opinion, is definitely for the non-scripter/programmer. So if you're 100% new to javascript, this may not be the best choice for your first book. However, if you've touched javascript for a while or have done some sort of programming or even actionscript in Flash, this will be quite an easy read.

It's totally opened my eyes to creating sites that are no longer tagged with "Oh, it's one of those javascript-only sites again that try to be oh-so-fancy but break in other browsers".

If you want to take on the power of javascript but also be a caring, friendly web designer, this is definitely a book you should check out.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
6 of 6 people found the following review helpful
on October 29, 2005
Format: Paperback
This book is a breath of fresh air in that it avoids all the old cliches of "cool" (aka cringe-making) JavaScript effects, such as tickertape effects in the browser status bar. This is JavaScript that can be put to effective use, such as replacing images without the need either to preload them or to reload the whole page. Another example is generating new content on the fly. Jeremy Keith does this by building a list of abbreviations used on a web page, a technique that would be equally valuable in automatically generating a table of contents for a long document.

This book teaches a thoughtful approach to JavaScript that degrades gracefully in older browsers, or when the user has JavaScript disabled. In the chapter on best practices, the message is driven home that technology should add to the functionality and attractiveness of a site, an approach the author calls "progressive enhancement." Exclusive technology, even something as simple as JavaScript, should never be a prerequisite for gaining access to a site's content.

Most JavaScript books leave the Document Object Model (DOM) tantalizingly to the end in the "advanced" section, whereas this one deals with nothing else. In spite of this, DOM Scripting is aimed at the beginner to intermediate user, and is made incredibly easy to understand. The purpose of each line of code is explained, and functions are built up in easily digestible blocks. Readers already familiar with DOM techniques may find some of the descriptions repetitive, but newcomers will be grateful for the way their knowledge is consolidated by seeing core techniques used in different circumstances. The clear, matter-of-fact style makes it a pleasure to read, and the final case study brings everything together in a logical and attractive site.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
6 of 6 people found the following review helpful
on February 6, 2011
Format: PaperbackVerified Purchase
I bought this book because I'm pretty comfortable using html and css to build static web-pages, and wanted to learn what I could add with Javascript. The book delivered on this front, providing a series of examples that walk you through the process of adding javascript enhancements to your html.

The coverage of javascript itself is relatively minimal - just what you need to do to complete the examples. I'll definitely be spending some time with a more thorough reference (book or website) to get a deeper understanding of the language. That said, this is still a very valuable book. Many of the javascript reference books I've seen cover the language in great depth, but leave me wondering "where do I start? how do I actually use this stuff on a webpage?". Dom Scripting takes the opposite approach - you can dig up language details pretty easily on the web, so here are some best practices for tying it all together.

The examples are built up in small increments, starting with the basic behaviour, rounding out the rough edges, and making sure your code follows standard practices and degrades gracefully in older browsers.

Four stars. It's a good, but not perfect book. A little more variety in the examples, and perhaps a quick-reference/glossary/appendix for basic language constructs would extend the value of the book for newcomers.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
8 of 9 people found the following review helpful
on January 12, 2006
Format: Paperback
This was my first introduction to the DOM. The book explains concepts very well and builds a nice foundation to work off. I did find the book a bit tedious in some parts, but this is mostly due to the fact that I am not an advanced JS developer yet.

Don't expect to use this as a reference book. Jeremy Keith is quick to point this out in one of the first paragraphs. It is more about driving home these concepts: graceful degradation, progressive enhancement, Web standards, and separation of structure, presentation, and behavior through easily understandable examples.

I would highly recommend this book if you looking to lay down a firm foundation before jumping into the DOM. For a topic that has been scarcely covered thus far, Jeremy Keith does a good job getting us out of the gate.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
4 of 4 people found the following review helpful
on February 28, 2007
Format: Paperback
Having a bit of knowledge of javascript, but not knowing exactly how to integrate DHTML without breaking the site -- this book offers a simplistic approach to convey the techniques used and recommended by accessibility professionals and the W3C.

The only drawback after having started to work with DOM Scripting on the job is that I need more complex examples.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
2 of 2 people found the following review helpful
on May 13, 2008
Format: PaperbackVerified Purchase
I've had time lately to do a lot more reading and Jeremy Keith's DOM Scripting book is another one that belongs on your shelf if you're trying to learn any amount of JavaScript. I've hated and avoided JavaScript for years, mostly because I started my career during the browser wars and quickly grew tired of having to write different code for different browsers. Thankfully, those days are now mostly over and this book has made me love JavaScript again.

The Document Object Model (DOM) is a standard for conceptualizing and representing the contents of an HTML or XML type document. Mr. Keith's book teaches how to use JavaScript to manipulate the DOM so that you can dynamically add or remove content from a page, change the way things look, or move things around. Similar to how CSS allows you to control the presentation of your content, DOM scripting allows you to control behaviors and events.

There are lots of great JavaScript frameworks available like jQuery, Script.aculo.us, or Dojo which allow you to easily enhance your websites. In order to fully take advantage of them though, you need to have a fundamental understanding of how things like the DOM and JavaScript event handling work. That's where this book really excels. It's written primarily for web standards developers fluent in XHTML/CSS who're looking to branch into more client-side scripting.

This book is full of useful lessons and real world examples on how to make JavaScript and the DOM work in your applications. It also places a heavy focus on fundamentals and best practices such as graceful degradation which will help you make sure that your sites still function well even without the fancy JavaScript enhancements. JavaScript has long been thought to make things inaccessible but it doesn't have to be. This book stresses how to use these technologies in an efficient, unobtrusive way.

What I liked most about this book was the voice in which it was written. I've read dozens of boring hard-to-follow tech manuals over the years but this book felt more like a friend standing over your shoulder and walking you through the process. That does somewhat limit the amount of information the book can cover and it definitely doesn't go very far into advanced techniques. If you've been doing standards development and basic JavaScript for a while though, and you really want to get started on increasing your scripting skills, this book makes an excellent primer. For me it turned my impression of JavaScript from an overly-complex annoyance to an easy-to-use yet incredibly powerful tool for improving my websites.

[...]
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
     
 
Customers who viewed this also viewed

JavaScript: The Good Parts
JavaScript: The Good Parts by Douglas Crockford (Paperback - May 2008)
$21.35

JavaScript and JQuery: Interactive Front-End Web Development
JavaScript and JQuery: Interactive Front-End Web Development by Jon Duckett (Paperback - June 30, 2014)
$26.93
 
     

Send us feedback

How can we make Amazon Customer Reviews better for you?
Let us know here.

Your Recently Viewed Items and Featured Recommendations 
 

After viewing product detail pages, look here to find an easy way to navigate back to pages you are interested in.