Dynamic HTML The Definitive Reference (2nd edition)
What's in the book?
The book is not an introduction to DHTML but it does have an 183-page section on Applying DHTML that covers not only the current state of the art but also gives clear guidance in making use of all the features. The guidance is of a good enough standard that a firm's Quality program could simply cite this book as the basis for the web development standards that a team adopts. Goodman makes it very clear that he is not going to discuss the DHTML that Navigator 4 introduced, the <layer> tag and JavaScript style rules, but points out that they are covered in the first edition should you really need to know.
The layout of the book is the same as the first edition, with the reference sections divided into HTML, DOM (Document Object Model), CSS (Cascading Style Sheet) and JavaScript. A new section for Events also makes an appearance. The reference sections on HTML and DOM have sub-sections that precede them on the shared attributes of all elements. These are particularly useful and I think should be committed to memory.
There is also a very curious Cross Reference section that has an HTML/XHTML attribute index and a DOM property, method and event handler index. It takes each HTML/XHTML attribute and shows which elements support it and then each DOM scriptable object property, method and event and which objects support it. I'll confess I've never had any call to use this section but I can see how it could come in handy -- and it hardly takes up much dead tree.
The upper limit of standards coverage is HTML 4.01, XHTML 1.1, CSS Level 2, DOM Level 2, and JavaScript (or ECMAScript) 1.5. The browsers considered are IE6 (Windows), IE 5.1 (Mac), Netscape Navigator 6 and 7 and Mozilla 1.0. Opera is also mentioned in the section on Applying DHTML in that it mostly follows the IE DOM. The timeline for any element can go back as far as HTML 3.2, Navigator 2 or IE 3.
As you would expect, there are some useful appendices: Color Names and RGB Values, which I expect to be using more now as sites are required to meet Accessibility guidelines; HTML Character Entities, for when you don't have a copy of Macromedia Dreamweaver or when your favourite HTML editor doesn't have a complete list; Keyboard Event Character Values, for your scripts when you want to catch all those key presses; Internet Explorer Commands, which along with the MSHTML.dll can allow the creation of a very neat content editor quite quickly and easily; and finally, an HTML/XHTML DTD Support cross-reference that may help catch validation errors as you move from an HTML 4.01 Transitional DTD to a full-on XHTML 1.0 Strict DTD.
What makes it worth having?The quality of Danny Goodman's writing is both technically accurate and easy to read. The clarity and lack of fluff is good, but there is no skimping on detail where such is needed to illuminate a point. Let's face it: web development is not as complex as most software engineering or systems development tasks, but it is a discipline with quite a wide base, reflected in the 1400 pages of this tome. I wouldn't trim any of it, however, and I expect that after about a year of use I will have referred to a good proportion of the contents. Take, for instance, Goodman's estimate that there are more than 15,000 unique instances of properties, methods, and event handlers supported by numerous document objects and you get an good impression of the size of the documentation required.
The book could be regarded as two books in one: There is the Applying DHTML book and the Reference book. The best things about the reference sections are the excellent descriptions, the clear little examples, and especially the quick summary of where you can expect these things to be supported. Referring to this book is the simplest way to avoid going down the proprietary browser extension cul de sac.
The Applying DHTML section is worth reading all the way through. It is great for getting yourself into the various technologies and seeing how they are meant to work. There are interesting points made on how each of the technologies are evolving. There's material contrasting the various DOM implementations and there are chapters on style sheets, positioning in CSS, making the content dynamic (of course, this is what DHTML is all about, after all) and scripting events.
There is a very useful cross-platform API for DHTML (which can be downloaded as a zip file along with the other examples from the book on O'Reilly's web site). I've used the version from the first edition quite a lot, and I've used the new version in my most recent work. It doesn't rely on browser version sniffing, but rather on object detection, which is explained with some examples, and can be easily extended to handle any DOM call you may wish to make. The API is especially useful for any CSS positioning tasks you may have. Goodman also goes over other strategies you can adopt to make your sites cross-platform, such as page branching, designing for a common denominator, and some other, neater, solutions.
There isn't anything on Accessibility other than a single paragraph drawing your attention to the Web Accessibility Initiative (WAI). DHTML and Accessibility could be considered inimical but that isn't the case and I'd perhaps have liked to see this elaborated on with some suggestions on how to achieve an Accessible site while still using DHTML. In practice, however, I've found it easy to meet the Priority 1 checkpoints (or A rating) set by the WAI even with a complete DHTML site so perhaps this is not really an issue.
I find this book really useful. I can't imagine any web developer doing without this book and managing to produce a good cross-platform solution, and I also can't imagine that developer needing any other texts on any of the technologies covered here. I certainly don't have any others on my desk today.
The O'Reilly web site has a complete Table of Contents available. You can purchase Dynamic HTML The Definitive Reference from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Used copies of first edition are pretty darned cheap.
Easy guys, I put my pants on one leg at a time. The difference is after I put on my pants I make gold records!
This book, as he says, "is not an introduction to DHTML". If you are looking for a book to get started with DHTML, I highly reccomend Essential CSS and DHTML for Web Professionals (2nd Edition), by Dan Livingston. I learned most of my DHTML fundementals from the first edition, and recently purchased the second edition as well. This is a very short book, an unlike many of its kind, can be read almost in "novel" form to get a basic overview without getting bored. You can then go back and try the examples, and actually implement some DHTML. Without a doubt one of the best web development books I have gotten.
-Pete
Soccer Goal Plans
As I just stated, the first edition was a great book and it has never left my desk since the day I bought it. If your a serious web developer or just a part time page monkey, this book (the first or I guess now the second edition) is for you. Hard to go wrong buying an O'Reilly book.
An optimist believes we live in the best world possible; a pessimist fears this is true.
... no matter how good the book is (and it probably is, I'm not meaning to say it isn't), doing good html is really hard / complicated. A good book isn't going to automatically mean you master it - you need to practice like mad, read the source code for websites, create websites, have common sense, a decent understanding of the human-usability thing (not easy), and be prepared to do the tedious work that is typing out html once you've mastered the skill in the first place.
Though The browser war is over ...
To borrow a quote from my friend, "John 'Bluto' Blutarski" who spent most of his college career on double secret probation.
Was it over when the Nazi's bombed Pearl Harbor?
Well it ain't over now!!!!!!
The browser wars won't be over until Mozilla stomps IE.
Other than that, the book sounds excellent!
That's a good point; much as I'd love to add stuff to my web pages, I don't want to block out some of the lower denominators such as lynx or, possibly more importantly, software such as readers for the blind. If DHTML screws up on those, you're losing a portion of your audience; not perhaps a large one, but it's still there.
figure out if any DHTML techniques have become standards.
DHTML means manipulation of the HTML DOM through ECMAScript. The HTML DOM is a W3C Recommendation, and ECMAScript is a European international standard.
Will I retire or break 10K?
Oh, that's right, you only have to design for IE now. Silly me, I forgot that all the other browsers are dead. That, or maybe, they all render DHTML exactly the same now? (HAHAHA)
(Well, maybe Lynx is dead, it's web page seems to be down...)
Although I consider the parent thread flamebait, I will respond anyway. The book is not just about DHTML, it is in fact a very good reference for HTML, CSS, and Javascript which are used every day by most web developers. The book outlines which tags are supported by what browsers and thus allows you to create a site that is accessable by all. The book is good for anyone who does or doesnt use DHTML just due to the fact that is is a general reference book.
An optimist believes we live in the best world possible; a pessimist fears this is true.
From where I look at this, the market is actually quite different.
I would say the vast majority of sites I have personally ever worked on have been internal projects. Using web standards to create a front end for an application is a very appealing idea. After all, if one decides to turn the application into a distributed app, there is a lot less work.
This is where I see the advanced topics of DHTML and JavaScript being used, not in the latest homepage of some stranger. Probably not even in the latest shopping site, which was probably designed years ago for ultimate compatibility.
As an aside, with Mozilla (the engine) gaining in popularity as an application framework, I can only see these topics gaining even more relevance.
This book covers a huge amount of material. After all, DHTML is just a name used for the interaction of a bunch of different things, and this book seems to try to cover all of them. I wonder whether Goodman is really an expert on all of it (or whether anyone can be). I'd be a lot more comfortable trusting a book like this if it were written by a group of authors with different areas of expertise.
Looking at what I can find about the book's coverage of CSS (which I know a lot about), I'm not optimistic. He seems to make up his own terminology, which can cause significant confusion in any public discussions. He uses the word "attributes" instead of "properties" (e.g., the CSS 'position' property) in the sample chapter available at O'Reilly. This is a mistake that's become very common these days, perhaps due to earlier editions of this book, and causes lots of confusion when people really need to discuss attributes (in HTML). The table of contents also shows sections titled by terms that he seems to have made up: "Common Subgroup Selectors" and "Advanced Subgroup Selectors".
It could be that he's decided he doesn't like the terminology used by the CSS specification so he's making new terminology. Such a decision has significant costs for communication between and among web developers and standards organizations. However, I fear it may not even be a conscious decision, but rather than he just doesn't know enough about CSS to know the correct terminology. (Not that I would expect any one person to be able to learn enough about all the topics covered in this book to be an authority on all of them.)
(If you want a good book on CSS, look for Eric Meyer's books on CSS, one of which is also published by O'Reilly.)
Other authors may do more for back end programming in your specific back end platforms and tools of choice, but you won't do much better than these two for front end browser programming.
...Open Source isn't the only answer -- but it's almost always a better value than the alternatives...
Cheers,
Ian
First off, the article misleads you into believing that there are only four or five web browsers. The truth is, there is only one--Internet Explorer.
Really? Let's find out. Everyone out there who is not using Internet Explorer, raise your mouse hand.
[Earth's orbit changes infinitesimally]
Thank you
"Where's my other sock?" - A. Einstein
DHTML is dependant on two things: (1)browser ECMAScript compatibility and (2)the browser's DOM. ECMAScript Core is implemented 100% correctly as per the spec on most modern (version 5) browsers. The problem is the DOM. The Gecko and IE engines both support the W3C DOM spec but there are still some minor differences. DOM Level 2 is not yet 100% implemented on either browser engine afaik. The other problem is that HTML also depends on event bindings to the DOM. Mozilla implements the W3C DOM-Events model, and IE uses its own event model.
Besides the major two browsers, Opera does in fact implement a great deal of DOM Level 1. I'm not up to date on Konqueror but last I checked it supported a good chunk of DOM Level 1. DHTML on Macs is relegated mostly to IE for Mac, but beware, it acts differently from IE for Win. You need to test them as two separate browsers. I haven't checked iCab lately, but last year it was beyond hope. There's also Chimera, a Gecko port, which should act the same as other Gecko engine browsers. Some people are still using Netscape 4 and you're stuck with a layers DOM there, totally different from any other DOM.
So it really depends on what browsers you are targetting and what kind of things you want to do. DOM Level 1 is about as close a standard as you can get, but you're still going to have some browser-specific code.
I'm not a web developer, but I've heard that DHTML support in Mozilla is pretty bad. There are a few sites which either don't work at all in Mozilla, or have "static" versions with DHTML removed*. Some of the web developers around my office have complained about this, and cite IE's DHTML support as the best.
Is this an issue of actual support, or just "IE standards" where people don't want to use real standards, just whatever "standard" Microsoft supports?
* The site I'm thinking of is Citibank's credit card management section. here. Of course, if you don't have a card with them, you can't log in to check it out.
Chapter 1
Don't use DHTML. It's pain in the ass. If you want "cool" stuff that makes Web sites non-accessable, use Flash. You only have to write one set of code then.
Department of Homeland Security: Removing the rights real patriots fought and died for since 2001
"Let's face it: web development is not as complex as most software engineering or systems development tasks"
You obviously never had to cope with developing a complex web application. When done right, it's a task far more complex than "conventional" software engineering.
Rich client-side interface doesn't mean a mouse-cursor tracker or validating your form on the client-side. It means letting the client side do ALL your application logic and interface, seperately. And let the server do the dumb job of validating, saving and returning raw data that can be handled by client-side custom components or logic-flow.
Not as complex? No, even more complex, if you're doing anything worthy.
Anyone who develops sites for corporates is going to be using DHTML to make it appealing and easy to use. I develop internet apps for a living, and I use DHTML all over the place in my development. You can make some VERY effective user interfaces with DHTML... I've used it in my sites to create extremely flexible/dynamic forms that pass sophisticated information in a single form that would require 5-6 round trips to the server without it. You quite obviously have no idea what you're talking about. Perhaps you should stop spewing crap and learn a little about the subject before you mouth off.
-1 Uncomfortable Truth
I'm not trying to troll here, this is an actual question because I don't know.
Is DHTML still as relevant as it used to be? Aren't people using server side scripting (perl, php, asp, etc) for truly interactive sites and things like DHTML are little more than nice HTML enhancements for doing the odd neat thing?
I just wondered what the perception was? I'm not anti-DHTML by any means, I'm just interested in where the general trend of web development is going.
And bookpool has it even cheaper ($36.50). I don't work for them, just a very happy customer. For any IT/CS type books, bookpool is cheapest probably 90% of the time...
-Gabe
You obvisouly don't know what you are talking about.
Well-used Javascript and DHTML is harder to recognize than the obvious stuff you come across as popups and various ad-schemes. Apparently, you pull stats ("99.9999%") out of your ass and try to pass your opinions as facts. Are you in the industry, or is your main experience that as a surfer ?
There is tremendous power to DHTML and Javascript, and it is widely used in commercial sites. It allows the user to interact with the otherwise dead html in ways that help the user and the site.
For a great example, look at International Herald Tribune. You can select articles from the frontpage and put them in a "clippings" folder - no you don't have to login - and then you can read them all later on. No more "open in a new window". For individual articles you can select how it will presented; font size, colums per page etc. This is an example of a site that is usable and intuitive thanks to Javascript, in this case.
So, get a clue to what you are talking about.
Oh, I can't help quoting you because everything that you said rings true
Anything you can do, I can do meta.
This is the sound of someone sorting a list of items without client-side javascript...
click (wait)... click (wait)... click(wait)...
One example of thousands of times where client-side scripting is useful. Is server-side scripting more useful? Certainly. Should server-side scripting be learned first? Probably. But any web developer that isn't familiar with client-side scripting is a mediocre web developer.
Don't click on the above Amazon link either. Amazon is well known for their abusive business practices, and the link is for the poster's affiliate program. Instead, use Bookpool - $36.50 there.
The best thing about a boolean is even if you are wrong, you are only off by a bit.
Yes, half the slashdot population could indeed be using a browser that is not IE. However, 99% are not, so making DHTML compatible for other browsers should be the least of a web developer's concerns. Content and navigation should come first.
:)
I agree. I guess DHTML and JavaScript have excellent tools for intranets, for instance for services like accessing Novell GropWise through the web browser. I think you're right, that there are good uses for DHTML.
I don't mind useful applications, but it seems that the internet is more annoying now it was in 1996 and DHTML is one of the reasons no doubt. It does have good purposes, but no thank you 99% of the time, when I'm accessing the internet and not intranets.
Thank you to people who enlightened us all about intranet usefulness. I posted my opinion, it went to 4, Interesting, and generated a few explanations of how DHTML is useful. Now that my perspective had a counterpoint, my moderation quickly went down to zero. I ask, are we not all enlightened from the discussion that took place? How can something that entices useful information be devalued once moderators judge that a 'better' opinion appears, all stemming from this? And flamebait, of all things...
Cover your eyes and click this link!
I'm not so up to date what's the current state of the art, but some years ago, when I was applying DHTML, I always found Dan Steinman's Tutorial Dynamic Duo very helpful (thanks Dan!).
It has been continued as DynAPI
Do you also cross the street with knee pads, wrist guards, and a crash helmet?
adam
Wow, well it's good to see that you're very progressive and open-minded. Why don't you try broadening your scope a bit? Sure, no one needs Java, Javascript, Flash, CSS, or DHTML to punch up a few news stories or your resume. But what about sites that let you dynamically monitor distributed processes? Or how about a little thing you've obviously never heard of called "e-commerce?" There are plenty of real, useful ways in which scripting makes things a lot easier, both for the visitor and the author.
It says a lot that you couldn't see that. Period.
Like woodworking? Build your own picture frames.
"If you were commissioned to design a new 8-lane, divided highway, would you set the speed limit at 30 mph, to ensure that those who choose to drive around in Model T's can keep up with traffic?"
This isn't a very good analogy. When you go to a non-dhtml web page, are you dissapointed, or othwise negatively affected specifically because they aren't using DHTML? Your analogy states that everyone would be negatively affected by someone's choice not to use the latest and greatest.
I will counter your analogy with another bad/wrong analogy:
If you were commissioned to design a new 8-lane, divided highway, would you make all the road signs fly from one side of the road to the other? Would you have "Hit the Monkey and Win $20" interactive highway advertisements? Would you make drivers have to drive over a certain spot to see certain signs?
It all depends. Most of the things in my bad analogy wouldn't be good ideas. It just depends on the audience, and what you are trying to convey. Not using the latest and greatest isn't a 100% sure sign that a site will be a bad experience. That depends on the skill and intent of the designers/programmers, not on the technology they use.
"... the advance of civilization is nothing but an exercise in the limiting of privacy" - Janov Pelorat
"Well, that's certainly a pretty low denominator! But let me ask you this. If you were commissioned to design a new 8-lane, divided highway, would you set the speed limit at 30 mph, to ensure that those who choose to drive around in Model T's can keep up with traffic?"
Arrrgh I'm sick of people arguing with metaphors! Feels like I'm watching an old episode of Star Trek!
There are reasons to not rely 100% on the imagery of your site. For example: I went on a business trip, the modem connection was awful. I turned off images in Opera so that I could browse the web in a reasonable amount of time. The reason why that works is because most of the sites I went to had documented what each of the images are.
It's a matter of accessibility, not speed. If you support blind people, for example, then your website doesn't suddely slow down to 30mph as your poorly chosen metaphor suggests.
Well I used to run with all the bells and whistles enabled. Unfortunately, I stumbled across a website whose author was more interested in causing havoc on my machine than in providing content.
It's true that well-intentioned scripting features can make things easier. It's also true that, in the wrong hands, those features can cause havoc. To me, it's not worth it.
As to your last comment, E-commerce doesn't require DHTML, Flash, CSS, java or javascript. In fact, if you ever read the W3 specs, they make a point of saying that web sites shouldn't require any of those technologies to function properly. If you want animated pictures of butterfly-costumed men obscuring your screen, be my guest. Just don't insist that I watch them too.