At my day job I’ve been working on integration between different systems through creating widgets. There are a few different avenues to take. My metric was the preceived integration with the site, so using the DOM ended up as the best option.
The DOM actually makes for a pretty decent medium for communication. If you force widgets to truly be written in the DOM instead of an iframe, every widget has access to those values that are in the DOM. Sure, you could also used namespaced JavaScript to grab values from other widgets, but then you require those widget’s dependencies. When the DOM is used, you can mock the information the other widgets provide. This allows you the option of rendering the widget on the server or via Javascript. This also allows you to specify initialization details via simple HTML instead of including extra JavaScript.
Likewise, by using the DOM, you can integrate your widget throughout the page. Things like CSS can apply directly to the widget HTML. Also, a widget may not even insert visible HTML in the dom. For example, an annotation widget might look through a DOM element to attach small balloons for notes that others left. None of this is trivial, but assuming the cross domain security issues can be dealt with reasonably, utilizing the DOM as something of a data store has its advantages.
Where this concept becomes even more powerful is in light of the Semantic Web. The Simile project provides a wealth of examples on how to take Semantic Data and present it in a useful way. Eric Miller describes this as creating an experience, which conveys the true value of Semantic Data. The idea of using the DOM in my widgets is to support a certain user experience where different services are used in unison to integrate the value of the systems. As the Semantic Web continues to evolve, the user experiences are where the biggest gains will be seen.


@Eric,
I've reread your post twice. And I still have no clue what your point is.
Care to clarify?
@M. David
The basic idea is you can use the DOM as a data store within the scope of a mash up. If you can read and write to the DOM of a page, then you have a decent means of communication between web apps built on a widespread standard. The alternative is something like Open Social or the Facebook API where an API is created specifically for interacting with the system. The DOM is not the most ideal arena for system communication, but it works and should be relatively well understood, so it makes for a pretty good layer to interact with different systems within the context of widgets.
This is very similar to utilizing RESTful web services. For example, if you want to work with an AtomPub service, the Atom feed is more or less the point of interaction. I'm suggesting the DOM can provide a similar function within the scope of a web page when considering something like widgets.
Does that clear things up a bit?
>> Does that clear things up a bit?
It does, yes.