- Find your hooks and relationships: Examine the HTML you are working with to find the best way of letting your script interact with it.
- Leave traversing to the experts: When possible, let CSS take care of finding the element you want to change.
- Understand browsers and users: Don't deviate too far from the way browsers work and how users expect them to work.
- Play well with others: Make sure your script does not interfere with others, and make it hard for other scripts to interfere with yours.
- Work for the next developer: Make maintenance easier by writing logical code with clear variable and function names and commenting where necessary.
It's all excellent advice that goes beyond unobtrusive scripting and into the realm of general best practices.
I guess no matter which part of web development you look at there will always be people who couldn't care less about craftsmanship and quality, and are always on the lookout for shortcuts and ways to shut out minorities.
- Previous post: Manual for Apple VoiceOver in Mac OS X 10.5 Leopard
- Next post: AdvancED DOM Scripting (Book review)