Refactoring HTML
Refactor Defined
Why Refactor
What to Refactor To
Move Away From
XHTML
CSS
REST
The Refactoring Process
Things Can Go Wrong
Tools
Validators
Testing
Regular Expressions
Tidy
TagSoup
Well-formedness Defined
Well-formedness Refactorings
Validity Defined
Validity Refactorings
Transitional
Strict
Layout
Accessibility
Web Applications
Content
Objections To Refactoring
As web sites transition from simple content to full-blown, two-way applications the legacy cruft of the past ten years is becoming apparent. There are millions of sites and billions of pages that have been around since the 1990s. Many of these pages were designed for browsers like Netscape 3, Internet Explorer 2, or even Mosaic. They may have been redesigned several times, but the underlying structure and markup remains the same; and this is becoming a problem. These pages don't work well with modern technologies and tools like AJAX, DOM, E4X, JavaScript, and more.
Consequently, many web developers and designers find themselves faced with legacy code for the first time. Until recently most sites and pages just weren't old enough for legacy issues to be a major concern. While legacy issues and the tools and techniques for managing them are well known to programmers, web folks are just now learning about these problems. As web designers begin to grapple with the legacy issues that have hampered programmers for so long, they'll need to learn the same refactoring techniques programmers have used to manage these problems.
Elliotte Rusty Harold is originally from New Orleans to which he returns periodically in search of a decent bowl of gumbo. However, he currently resides in the Prospect Heights neighborhood of Brooklyn with his wife Beth, dog Shayna, and cats Charm (named after the quark) and Marjorie (named after his mother-in-law). He's an adjunct professor of computer science at Polytechnic University where he teaches Java, XML, and object oriented programming. His books include Java I/O, Java Network Programming, the XML Bible, and XML in a Nutshell. His next book will be Refactoring HTMl from Addison-Wesley.