DOM Enlightenment
Publisher: O'Reilly Media
Final Release Date: February 2013
Pages: 180

With DOM Enlightenment, you’ll learn how to manipulate HTML more efficiently by scripting the Document Object Model (DOM) without a DOM library. Using code examples in cookbook style, author Cody Lindley (jQuery Cookbook) walks you through modern DOM concepts to demonstrate how various node objects work.

Over the past decade, developers have buried the DOM under frameworks that simplify its use. This book brings these tools back into focus, using concepts and code native to modern browsers. If you have JavaScript experience, you’ll understand the role jQuery plays in DOM scripting, and learn how to use the DOM directly in applications for mobile devices and specific browsers that require low overhead.

  • Understand JavaScript node objects and their relationship to the DOM
  • Learn the properties and methods of document, element, text, and DocumentFragment objects
  • Delve into element node selecting, geometry, and inline styles
  • Add CSS style sheets to an HTML document and use CSSStyleRule objects
  • Set up DOM events by using different code patterns
  • Learn the author’s vision for dom.js, a jQuery-inspired DOM Library for modern browsers
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyDOM Enlightenment
 
3.0

(based on 3 reviews)

Ratings Distribution

  • 5 Stars

     

    (0)

  • 4 Stars

     

    (2)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (1)

67%

of respondents would recommend this to a friend.

Reviewed by 3 customers

Sort by

Displaying reviews 1-3

Back to top

 
4.0

A nice introduction to the DOM

By Eelco Deuling

from Teteringen, Netherlands

About Me Designer

Verified Buyer

Pros

  • Easy to understand
  • Helpful examples

Cons

    Best Uses

    • Intermediate
    • Novice

    Comments about oreilly DOM Enlightenment:

    As a front-end developer I neglected Javascript a bit as JQuery offers us a framework that is easy to work with. I did some online courses and read some books, but they tend to focus on the basics of the language (that are important of course) but not on DOM manipulation.

    This book offers just that: a solid introduction to the DOM.

    (5 of 9 customers found this review helpful)

     
    1.0

    Leveraging the obvious

    By Jim the Runner

    from San Jose, CA

    About Me Developer

    Pros

    • At Least It's Short

    Cons

    • Not comprehensive enough
    • Too basic
    • Too many errors
    • Violates Dry Principle

    Best Uses

      Comments about oreilly DOM Enlightenment:

      While the material presented does provide some good information on how the DOM can be used from Javascript, the actual useful material could probably have been boiled down into an interesting article, rather than being puffed up into a full-length (albeit short) book.

      The biggest failing of the book is probably the code examples, which suffer from a whole slew of ailments:

      - They seldom provide any motivation for using the DOM feature being described. More often than not they simply show a trivial use case and the expected result.

      - Ongoing examples always show all previous versions of the code, typically with just a small amount of new code added (although, thank goodness, the new bits are highlighted). This helps bulk up the page count, but adds very little to increasing the comprehension of the topic.

      - Examples nearly always violate the DRY (Don't Repeat Yourself) principle. For example, if an example shows several variations of using some DOM feature, all of which share nearly identical boilerplate code, the boilerplate code is repeated each time, often with the variant code buried somewhere in the middle of the common code. This places an unnecessary burden on the reader of parsing the same code over and over again, just to make sure that some crucial detail is not being missed.

      - Examples are sometimes ambiguous. Some DOM methods or properties have behaviors which, intuitively, could be implemented in more than one fashion. Rather than providing an incisive example that clearly illustrates the actual behavior, the example is often based on a result that could have been produced by more than one of the possible implementations, leaving the reader without a clear understanding of what the feature actually does.

      And finally, I would suggest that O'Reilly sponsor a contest to count how many times the author (often inappropriately) uses the word "leverage" or "leveraging" as if it were a synonym for "use". Why leverage a three letter word when you can leverage an eight letter word instead? Indeed.

      Overall, I wish I had the few bucks I spent on this book back in my pocket, but since that isn't going to happen, I hope I can at least help convince others to spend their money a little more wisely than I did.

      (8 of 9 customers found this review helpful)

       
      4.0

      Great look at the DOM

      By DScott

      from Bloomington, IL

      About Me Developer

      Verified Reviewer

      Pros

      • Helpful examples

      Cons

        Best Uses

        • Intermediate

        Comments about oreilly DOM Enlightenment:

        Cody Lindley takes the reader into the depths of the DOM with his work. This book does what it says it will in the beginning introduction by presenting a very terse cookbook: you won't be seeing tons of lengthy explanations. One of the best perks of this book was that in ebook form->the code was presented with links to code examples in jsFiddle (with Firebug lite) or github. This made it easy to run, modify, and look at the code in depth without even having to setup an environment or retype examples. Chapter 12 was also a nice addition to this book as it showed a short example of taking what you learned about in the previous chapters and thinking about the development of a dom library in many ways similar to what jQuery does today. While not very long, I also liked the chapter on DocumentFragments. It was nice to see that this often overlooked part of the DOM got some attention.

        Overall conclusion: This book is great for a very specific niche. If you want to take a quick tour of the DOM-then this is the book for you. Don't expect long lectures on the topics-just short examples.
        Disclaimer: I got a copy of this book for review as part of O'Reilly blogger program.

        Displaying reviews 1-3

        Back to top

         
        Buy 2 Get 1 Free Free Shipping Guarantee
        Buying Options
        Immediate Access - Go Digital what's this?
        Ebook: $9.99
        Formats:  DAISY, ePub, Mobi, PDF
        Print & Ebook: $16.49
        Print: $14.99