Saturday, July 31, 2004

Running With JavaScript Scissors

Beginners can easily hurt themselves when wielding any promising but unfamiliar technologies. Sometimes our early technological bets turn out to be bad choices, but we don't find out until too late (at least too late to restart a project).

From my Google searches, Simon Willison and Peter-Paul Koch seem to have the leading edge observations on how to safely wield DHTML and JavaScript. They show us how to move beyond old-style DHTML+JavaScript (to which most of us probably crossed our eyes at). Their proscriptions on how to use DHTML+JavaScript correctly, thankfully, do not require new languages or browser capabilities.

Peter-Paul Koch:
Why do we need a new language/specification for Web applications? JavaScript is inherently superior to any new specification because it's already there.

Peter-Paul Koch again:
JavaScript has a PR problem. ... needs a new job description. It's going to have to prove itself all over again to a critical audience of web developers who want to know exactly why they should use JavaScript. ... JavaScript is meant for adding layers of usability (and not presentation) on top of structural, simple XHTML documents. These layers of usability will probably allow users to organize the data they receive, and maybe also to send out new data queries.

Although there are countless applications and programs that do this, JavaScript is unique in being seamlessly integrated in 89% of the most important data access applications there are: the browsers.

Their guidelines for modern, leading-edge "doing DHTML/JavaScript right" boils down to, no surprise: separation of concerns. We must separate structural markup (HTML) from presentation logic (CSS and JavaScript). Or, as Stuart Langridge calls it, the new successful pattern will be Unobtrusive DHTML.

UPDATE: Adding Aaron Boodman to the pantheon of thinkers here.


Post a Comment

<< Home