Friday, May 4th, 2007
How to correctly use the power of widgets in Ajax
Laurent Haan has followed up his post on creating an Ajax ratings widget by getting a little more meta, and has posted on how to correctly use the power of widgets in Ajax.
It covers the usability and accessibility problems of custom widgets, compared to the standard HTML widgets and discusses the possible implementation methods that could be used to implement them in JavaScript.
There is a lot of work in this area. From the Widget W3C group, to the new the new dijit project.












I dont understand why developers cant transport xml/xhtml/html using javascript directly, but has to work around it, using stuff like json?
XIN fetches entire xml/xhtml apps, with images, css, scripts and all, as a single unit and writes it into the page as part of it’s dom on the fly, works in all browsers too, and both the images and css are forceloaded into the page.
http://www.widgetplus.com is basically ‘proof of concept’ for this approach.
These widgets can be fetched cross-domain and appear anywhere, being injected into blogs, etc, using a single js-link.
There are no tricks, iframes or xmlhttp problems involved with this, and the apps are just plain dhtml apps with a server backend, so there’s nothing complicated writing one.
I’m sure you didn’t take the time to read the article or you would know that I’m not talking about “stand-alone” widgets that are responsive and already implement their functional behavior themselves, but rather input widgets that can be used in standard forms to enter a value in a more fancy way. A basic example would be an horizontal slider that is used to enter a value between 0 and 10.
This can’t be done without any fancy “work-around” since the interaction with the slider only results in an internal value change and not in something like a server request as in the rating widget example.
The widgetplus widgets are all serverbased, and updates remotly from the server live.
- I did read the article.
This shows you what I mean.. http://www.widgetplus.com/create.htm
The article would do well with subheadings and paragraph margins.
Yeah, I thought so too.
mikael, typo on your site — “This is a series of interconnected widgets, a suit of widgets if you will”… “suit” =>”suite”
Right. I’ll fix that pronto.