DOM Scripting: Web Design with JavaScript and the Document Object Model
J**H
Best written tech book I have read in years
"DOM Scripting: Web Design with JavaScript and the Document Object Model" by Jeremy Keith, is by far the best written tech book I have read in a long time (and I read a lot of books). I cannot remember the last time I read a tech book where I just wanted to keep reading to find out what was in the next chapter, but I did with this.This book has been written in a very readable style, not expecting too much previous experience from the reader, but also not treating the reader like a complete novice. Starting off by building up some basic JavaScript/ECMAScript knowledge, then working through how to use it with (X)HTML and CSS, the progression is easy but the coverage very good. Along the way, some useful code examples are built up, with a really strong emphasis put on separation of responsibilities between structure, behaviour and presentation. It's like reading the code of somebody who has done it for years, gone through all the obstacles, and come up with a set of working practices that are so simple, but that take into account all of the things that would make the code of others fail. A simplicity to aspire to.I also like the emphasis on progressive enhancement, which provides graceful degradation - it might sound like semantics, but implementing progressive enhancement feels so much more positive than always thinking about degradation.Whether developing systems using the DOM, or testing them (either via review, manual execution, or developing automated tests that access the DOM using tools such as Selenium WebDriver or Ranorex), this book provides the reader with a clear understanding of how to use the DOM, what practices web applications should follow, and how to implement useful code for querying and modifying the DOM.It's good to see a book that has been well proof-read as well. I read the book very quickly, but think I only spotted a couple of typo's and one ambiguity (I don't like seeing "between" used in the context of ranges without specifying "inclusive" or "exclusive"). Great stuff.Highly recommended (although note that there is a second edition available now - I bought and read the first edition before I realised). No caveats.
A**Y
Excellent, but wait for the new edition
This book might well have been subtitled "How to add Javascript without making a fool of yourself". It is a model of clarity - far better written than most web technical books. As someone with a programming background, I found it a little slow. This, I think, makes it ideal for its target audience, Web Designers. If you have mastered HTML, understand CSS, and want to use Javascript (but are perhaps a bit nervous of it), this is the book for you.What this book does particularly well is explain how to use Javascript to enhance the users web experience without degrading that of non-Javascript users. While it explains the language as much as is necessary, it is not a programmers manual, it is a designers manual. You might well want to get a programmers manual to go alongside this book. However, I strongly recommend it to those wanting to produce a non-gimmicky but powerfully enhanced site.It is, however, a bit dated - it came out in 2005. There is a new edition due in December 2010, which will, I hope, take account of HTML5 and CSS3. If so, it will be well worth waiting for.
L**H
A great, methodical guide to the black art of DOM scripting
I didn't buy this straightaway, thinking that I'd be able to find most of the content on various websites, but I'm very glad I took the plunge. There's lots in here that's of immediate practical use, as well as plenty of food for thought about how you put a site together more generally, in terms of separating structure, behaviour and presentation.The code examples are clearly explained, but I did feel it helped to have some background with CSS and PHP as the book dives right into function calls, object properties and the like - and yet does a good job of making these accessible.If there's a weakness, I'd say it occasionally takes too long to make its point, e.g. going step by step through very similar code examples at times. From a reader's point of view, Jeremy's coding style seems quite perfectionist, showing successively better or neater ways to write a given piece of code - that's no bad thing though, and the rationale is always explained clearly.This is a book that deserves a wider audience - the potential power of DOM scripting is awesome, and this will help people comfortable with basic scripting to make the leap to building more sophisticated, impressive and robust web applications.
J**A
Three Stars
Rather out of date now.
Z**V
Great JavaScript starting point in the right direction
This book will give a solid foundation on how to build on a better websites with the use of Document Object Model and JavaScript.Apart from being easy to read and understand the book covers on how to improve, add a layer of interactivity and better user experience with the help of JavaScript. Many common mistakes and JavaScript missuses can be avoided if the methods of Progressive Enhancement described are followed. Should be read by anyone who has touched on JavaScript and would like to dig deeper the right way. I never regret buying and will be following closely Jeremy Keiths' other releases.
L**B
It's ok but ...
ADDENDUM:::BIG WARNING::: This book appears to be IE and Windows platform dependent. If you are interested in writing Javascript that is cross platform and cross browser compatible I suggest you look elsewhere. I don't seem to be able to dump the star rating I originally gave it but in this day and age ... writing a book that doesn't recognise that 15% of all users do NOT USE IE and Windows ... well ... need I say more.I saw this book being recommended to someone else and thought I'd give it a go. I haven't read all of it yet but, having coded in Javascript heavily around 2000 it hasn't hugely taught me anything I couldn't have figured out. Guess it's saved me the blood sweat and tears of finding out the hard way though.I think I would have preferred a reference book rather than this instructional book. I find it's a bit low-level for me but i can see it would be a good book for a non-programmer or someone just starting out.
J**E
good
easy to follow
N**R
Clear and Concise
DOM Scripting by Jeremy Keith gives you a very smooth introduction to JavaScript and the DOM. The books is more directed at those who are just beginning JavaScript or have used it in the past but would like more knowledge.The book itself flows well from chapter to chapter. The beginning chapters give you a foundation to work with during the rest of the book. Jeremy teaches basic constructs of JavaScript programming and how/where they can be used. If you are already a programmer (not necessarily JavaScript), this chapter will be a quick one. It is very informational, yet straight to the point. Once he gets the basics and best practice techniques out of the way - he dives into the DOM and gives several useful examples. This is where it gets good.Before moving further, I should mention that his best practices are applied all throughout this book - and that includes creating useful and unobtrusive JavaScript. So, with each chapter - he shows the process and then brings it around full circle to an unobtrusive model. For instance, with the image gallery example, he shows that without JavaScript, this process would be useless - and we don't need extra markup on the pages that won't be used. He shows you, step by step (with great code highlighting and screenshots), how to build the image gallery on the fly. This way, if a user HAS JavaScript they can get the better experience. For those without, it degrades gracefully and doesn't add unnecessary code to the markup. This is just one example - but is used on all of his building blocks throughout the book.There were many times in the book I would question what was being done (from an unobtrusive standards perspective). Each of those questions was immediately answered in the paragraphs or chapters to come. Jeremy does a great job to present the big picture, along with explaining why things were done certain ways. I read this book in two days, simply because it was hard to put down. The last chapters (aside from the reference), were the icing on the cake. This is where he puts all of the pieces together for a fictional website, JayScript and the Domsters. This chapter takes all of the pieces taught throughout the book and puts them in a practical environment. Go ahead, play with the fictional site. It has nice little touches, that, even when JavaScript is disabled has a nice user experience.Overall, I would highly recommend this book if you are looking to get your hands dirty with JavaScript and DOM Scripting. The book was an easy read, packed with useful information. Just as with CSS Mastery, each chapter would build on the last - all the way until the end where it was all put together as a whole. Also, I am currently reading "DHTML Utopia", and this book was a great primer to JavaScript techniques. Thanks, Jeremy, for a great, concise, book on a topic that can sometimes scare people away.
S**E
Hervorragende Einführung in JavaScript und DOM
Bücher über JavaScript gibt es viele, und sich für das richtige Buch zu entscheiden ist nicht immer einfach. Das Referenzwerk von David Flanagan ist sicherlich eine gute Wahl, aber wer sich beim Lesen etwas kürzer fassen möchte, der greift zu "DOM Scripting" von Jeremy Keith. Der Titel ist eher unscheinbar und weist nicht direkt auf eine JavaScript-Einführung hin. Nichtsdestotrotz vermittelt das Buch viele grundlegende JavaScript-Konzepte, auch für komplette Neueinsteiger. Den Auftakt macht ein kurzer Abriß über den Browser-Krieg der 90er und die Geschichte von JavaScript, was ich als höchst informativ empfand. Danach werden die wichtigsten Grundlagen von JavaScript und DOM erklärt, und zwar so präzise auf den Punkt gebracht, daß ich darüber nur noch staunen konnte, denn Jeremy Keith kann im Gegensatz zu anderen Autoren mit wenigen Worten viel zum Ausdruck bringen, während sich die Code-Beispiele nahezu perfekt in die erklärenden Texte einfügen. Mit diesem erlernten Wissen wird dann eine Image Gallery erzeugt. Das ist zwar nichts besonderes, aber man sieht JavaScript und DOM im praktischen Einsatz. Mitten im Buch gibt es dann noch ein Kapitel über Best Practices, in dem der Autor einmal mehr seine Erfahrung bezüglich Web Design zum Besten gibt. Einfach hervorragend und mit unglaublicher Leichtigkeit geschrieben. So macht das Lesen Spaß! In den folgenden Kapiteln werden weitere DOM-Geheimnisse gelüftet, und so nebenbei erfährt man immer wieder wissenswerte Hintergrund-Informationen über Browser und ihre Macken. Des weiteren gibt es ein eigenes Kapitel über Animationen mit JavaScript, was wesentlich weniger spekakulär ist, als es sich zunächst anhört, aber an dieser Stelle merkt man sehr deutlich, daß aufwendige Browser-Effekte in der Regel auch aufwendig programmiert werden müssen. Oftmals muß man dabei tief in die Trickkiste von JavaScript greifen und seine Scripts mit allerlei Kniffen ausstatten, um das gewünschte Resultat zu erhalten. Dies wird zwar immer noch relativ einfach erklärt, aber hier fängt es langsam an, schwierig zu werden. Schwierig insofern, weil man coole Effekte in JavaScript nur dann programmieren kann, wenn man auch das entsprechende Knowhow besitzt und die Erfahrung im Umgang mit ganz speziellen JavaScript-Details sein eigen nennt, so wie das bei Jeremy Keith der Fall ist. Danach folgt ein kleines Abschlußprojekt, in dem eine vollständige Web-Site komplett neu aufgebaut wird, und zwar mit all dem Wissen, das in den vorausgegangenen Kapiteln vermittelt worden ist. Zum Schluß gibt es noch einen äußerst lesenswerten Artikel über Ajax sowie eine kurze DOM-Referenz, die alle in dem Buch vorgestellten Methoden und Properties zusammenfaßt, ein kleines Nachschlagewerk sozusagen."DOM Scripting" ist eines der besten Fachbücher, die ich je gelesen habe. Der Autor schreibt dermaßen klar und leicht verständlich, daß es fast schon unmöglich ist, den Inhalt des Buches nicht zu verstehen. Die Texte sind extrem flüssig zu lesen, denn es gibt so gut wie keinen Ballast, jeder Satz sitzt perfekt, und die Code-Beispiele sind nicht nur zahlreich vorhanden, sie erschließen sich dem Leser auch auf Anhieb. Dabei ist es ratsam, das Buch von der ersten bis zur letzten Seite zu lesen, denn das Wissen wird von Kapitel zu Kapitel weiter aufgebaut und erweitert. Besser kann man ein Fachbuch einfach nicht schreiben. Mir hat das Lesen selten so viel Freude bereitet, und ich werde das Buch deshalb uneingeschränkt weiterempfehlen, genauso wie die Fortsetzung "Bulletproof Ajax".
J**S
A great introduction to DOM Scripting
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.[...]
G**Y
Sehr gute Wahl fuer Ein- und Umsteiger
Habe in den letzten Jahren in mehr als einem Dutzend Programmiersprachen Code geschrieben, hatte aber immer eine Abneigung gegen ECMAScript - vor allem wegen den Browserinkompatibilitäten. Das Browserumfeld ist mittlerweile viel besser - Firefox, Opera & Co unterstützen die Standards des W3C schon sehr gut und dieses Buch von Jeremy Keith ist ein großartiges Werk zu dem Thema.Durch meinen Programmierhintergrund konnte ich die Kapitel schnell bearbeiten, es war aber dennoch sehr interessant und lehrreich - aber selbst wenn man noch nie programmiert hat sollte man keinerlei Schwierigkeiten mit dem Buch haben. Es bietet simple, aber sicherlich ausreichende Erklärungen der notwendigen Konzepte. Kann es jedem, der an JavaScript und Webstandards interessiert ist, wärmstens empfehlen.
Trustpilot
1 day ago
2 weeks ago