Free Newsletters
Technology & Business Daily

InfoWorld
Log-in | Register
STRATEGIC DEVELOPER  

Developing with next-generation Dynamic HTML

Asynchronous JavaScript and XML combine to enable powerful new capabilities for browser-based UIs

By Jon Udell  
April 13, 2005
 

Last week I mentioned Greasemonkey , a Firefox extension that enables scripts to run in the context of Web pages. Since then I've written a few of my own Greasemonkey scripts. The first, which I've shown in a screencast, is an improved LibraryLookup.

Free IT resource

Open Source Business Conference (OSBC) May 22-23, 2007

Sponsored by OSBC

Free IT resource

Virtualization Insights from Top Experts - Learn how virtualization gets real!

Sponsored by Dell

Back to 'browser' report 

DOWNLOAD PDF

Click here to download InfoWorld's special report The browser reloaded


With the original, you had to click a bookmarklet to jump from an Amazon page to a book's record in your local library. Now, if the book is available in the library, the Greasemonkey script automatically inserts an alert into the Amazon page.

As I discussed in the screencast, page rewriting is a hot topic that's about to go nuclear. When Google's toolbar added an AutoLink feature that can turn postal addresses and ISBN numbers into links, it rekindled the debate that forced Microsoft to withdraw its similar Smart Tags feature several years ago.

The issues are complex. When a page that doesn't link to Google Maps or to Amazon is modified to do so, the alteration touches on the interests of three parties: the author of the page, the reader, and the proprietor of the service to which the link points. From the author's perspective, an altered page can be seen as a copyright-violating derivative work. From the reader's perspective, it might be seen as deception, which is why AutoLink must be explicitly invoked each time it's used. From the service provider's perspective, it's great -- so long as the provider's service is the link destination; otherwise, it's not so great.

My new LibraryLookup script touches on the same set of interests, albeit in slightly different ways. In this case, Amazon is both the author of the content and the provider of the service. Notification of an alternate service, when available, benefits the reader and nobody else.

It's hard enough to think about this puzzle in terms of content. It gets even harder as content and services intermingle. Here's a message I hope I never see, but fear I might: “Service unavailable. Your browser does not support DOM locking.”

I'll let the lawyers chew on that one. Meanwhile, let's focus on how this technology can deliver the kinds of dashboard views that make hearts flutter in the enterprise. Until recently, I've used a couple of bookmarklets to gauge reaction to my InfoWorld articles, based on the list of del.icio.us bookmarks pointing to an article and the Bloglines summary of citations. Now, instead, I have a Greasemonkey script that counts these things and injects the counts into the InfoWorld pages I read.

You'd think these extra requests would slow things down. But because they're asynchronous, they don't. The script just fires off requests. When (or if) answers come back, it interpolates them into the page. Two components make this possible. One is the scriptable DOM, which enables in-situ alteration of Web pages. The other is the XMLHttpRequest object, which is now available in all the major browsers and which supports asynchronous interaction with remote services.

Combine the two and you get a powerful system for delivering real-time alerts in the context of Web pages. AJAX (Asynchronous JavaScript and XML) is the new name for this strategy, but it's an old idea, and XML is optional. At its core, this is about Web pages that communicate autonomously and update themselves dynamically. You'll soon see a lot more of these, and you may well find yourself creating some, too.





 


 
Jon Udell is lead analyst and blogger in chief at the InfoWorld Test Center.

  More of Jon Udell's column
  Jon Udell's Weblog

Newsletter Check out all of our free newsletters!
Enter e-mail address:




 

TOP NEWS:


»  You don't know tech: The InfoWorld news quiz
Match your weekly tech news wits against our snarky quiz master

»  Fugitive spam king dead in apparent murder-suicide
Convicted penny-stock spammer Eddie Davidson earned millions of dollars through an e-mail spamming operation

»  Drizzle project plans a stripped-down MySQL
As MySQL's capabilities have grown over the years, many developers have pushed for a leaner, less feature-heavy version, which the Drizzle project will deliver

»  Microsoft bolsters Ruby efforts
Company unveiling initiatives accommodating popular language

»  Not so fast, 3G
Apple says its 3G iPhones have wireless speeds that are twice as fast as those on the old EDGE network, but that claim's accuracy greatly depends on where you are

»  Mozilla fixes nine flaws in Thunderbird
The update marks the first time it's plugged holes in the e-mail software since early May.




Keeping the E-Mail Flowing
Traditional exchange and recovery solutions are not only complicated, but very expensive. Learn from the experts how to implement Continuous Application Protection (CAP) and save yourself the complications and cost of traditional exchange and recovery solutions. Sponsored by AppAssure

»  Click here to view this Webcast
  Zombie PCs Are Attacking Your LAN
A recent study showed that malware-infected zombie PCs are now a bigger threat to ISPs and Web infrastructure than DoS attacks. As this brand new IT Strategy Guide explains, an increased use of peer-to-peer techniques by the attackers has made it harder to fight back. Download now, compliments of Verio:

»  Click here to download now

- Special Advertising Partners -
WHITE PAPERS
 

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
INFOWORLD MARKETPLACE
 
» BUY A LINK NOW
 

FIND PRODUCTS AND COMPANIES
» COMPLETE PRODUCT GUIDE



TECHNOLOGY INDEX
• Applications
• Application Development
• Security
• Networking
• Wireless
• Platforms
• Hardware
• Data Management
• Storage
• Web Services
• Business
• Telecom
• Professional Services
• Standards

TECH WATCH 


What's the 411 on GOOG-411?
Just as Google has become synonymous with "performing a Web search," 411 is understood to mean "information" -- as in "what's the 411?" I was thus surprised to discover, from a billboard, no less, that the king of search is taking on the ...

Apple HTML source reveals 'iPhone Extreme'
"This one's a stretch..." reports AppleInsider. Um, yeah. Reporting on HTML code sightings of product names could be called a stretch, but iPhone Extreme has a ring to it. Now, that sounds like the product Apple should have released first, rather ...

COLUMNISTS

Unified under law
Ephraim Schwartz's Column and Blog (InfoWorld) - In the litigious world we live in, deploying a unified communications platform in your enterprise could...
» MORE COLUMNISTS

MORE INFOWORLD BLOGS


Open Sources 
Product Management
When I joined MySQL four years ago, there was quite a lot of debate about product management. We didn't actually have ...

Zero Day 
Botnet herders tending smaller flocks
New research backs up the theory that botnet operators are keeping their networks smaller in a continued effort to keep ...



• Advice Line
• Database Underground
• The Deep End
• Enterprise Mac
• Geeks in Paradise
• Grid Meter
• The Gripe Line
• InfoWorld Daily
• Inside IT
• IT Troubleshooter
• ITXtreme
• Open Sources
• ProdBlog
• Real World SOA
• Reality Check
• Security Adviser
• SMB IT
• The Storage Network
• Tech Watch
• Virtualization Report
• Zero Day

ADVERTISEMENT


RESOURCE CENTERadvertisement 

GOVERNMENT IT & POLICY
'If you don't go after the network, you're never going to stop these guys. Never.'
From the State Department, All the News for Inquiring Minds
TechPresident, the Internet Citizenry's New Consensus Taker



Sponsored Technology Links

 
 
 HOME  NEWS  BLOGS  PODCASTS  VIDEOS  TECHNOLOGIES  TEST CENTER  EVENTS  CAREERS   About | Advertise | Awards | RSS | Contact Us 

Copyright © 2008, Reprints, Permissions, Licensing, IDG Network, Privacy Policy, Terms of Service.
All Rights reserved. InfoWorld is a leading publisher of technology information and product reviews on topics including viruses,
phishing, worms, firewalls, security, servers, storage, networking, wireless, databases, and web services.

CIO :: ComputerWorld :: CSO :: Demo :: GamePro :: Games.net :: IDG Connect :: IDG World Expo
Industry Standard :: IT World :: JavaWorld :: LinuxWorld :: MacUser :: Macworld :: Network World :: PC World :: Playlist