Saturday, August 06, 2005

A del.icio.us Link Manager Written in XForms


Side-bar for IE to add links to del.icio.us. (Built using formsPlayer and XForms.) Posted by Picasa

Sorry it's been a bit quiet on the blog front, but things have been very busy here. The good news is that IBM's active promotion of XForms seems to be generating wider interest in this technology. But the bad news is that it seems to have panicked one or two server framework companies into claiming support for XForms when they patently don't have it. I'll be looking into some of these things in a future blog, but for now it might be worth saying...don't worry! Anyone worried about missing the XForms boat, there is still plenty of time to get it right. (And perhaps I should look on the bright side--when people start claiming to support a technology when they don't, it just might mean that the technology in question is coming of age.)

Anyway, on to the subject of this blog. I've been putting together some more tutorials, and the one that I keep coming back to is how a beginner in XForms would actually get going. What technologies can we assume they know, and therefore build on, when presenting to them how to build an XForm? Do we start with something akin to an HTML form, and then make it more complex? Or do we start with the notion of an application, say like with VB, and show how it can be built more easily?

I felt recently that we weren't really serving the newcomer well, so I thought we should start with what an HTML programmer would know, and build on that. But at the same time, I also felt that the usual way of doing things didn't really give a flavour of what is possible with XForms, and they certainly don't deal with the type of applications that people are interested in these days.

So, rather than doing the usual order-form-shopping-basket-invoice thing, I thought that the modern programmer might be more interested in things RESTful, social, and perhaps map-full.

As luck would have it, I was also looking for a convenient way to save bookmarks to del.icio.us. I like being able to put links there when I come across something interesting, but I don't like the way that the forms on the site itself mess up my browser history. Even the couple of downloadable toolbars that are knocking around link through to this same interface. However, since del.icio.us has a nice simple RESTful API, things looked like they could be coming together.

I therefore put together a simple XForm that saved a bookmark to del.icio.us. Since it uses REST it's in effect an XForms version of a simple HTML GET form. The main difference is that by using the replace="instance" feature of XForms we don't need to navigate away from our form.

Of course this is not a lot of use in a browser since the form is occupying the space where we want the page we are looking at to be. But if we move the form out of the way into a side-bar, things start to get interesting. And if we add to that a little bit of code to obtain the document title and any metadata from the main page, you have the possibility of saving a full bookmark with tags in only one click of the mouse.

Once the form was moved into the side-bar it opened up a number of areas to experiment with. For example, if there is a description in the metadata this will be copied to the extended field in del.icio.us. But if you have highlighted some text in the document then this will be used instead. It's a very convenient way to save a bookmark but at the same time draw attention to why you have saved it (by the next day I have usually forgotten).

Another area I've experimented with is adding personal tags that indicate why I've saved the link. I've just put 'To Blog' and 'To Read' in as options at the moment, to see how this works out. But I think this could be an interesting area to continue developing. (The tags used are actually "My/ToBlog" and "My/ToRead", as suggested by Leigh Dodds. I thought I may as well begin with tags that someone else has used.)

If you fancy giving this little application a whirl then you are best off getting version 1.3.5 of formsPlayer from the download area of our site.

Once you have the new version, simply go to the configuration form. This is just an XForm, and it doesn't need to copy anything from our server--i.e., it doesn't do any component installation, since bar installation just involves calling some built in XPath functions in formsPlayer. After successful installation you will need to open a new browser, and then you will have an option formsPlayer Bookmark Manager in the Explorer Bar menu, under the View menu of IE.

The buttons on the form are pretty straightforward; you can save your link and data or cancel. You'll see in the screenshot above that there is a refresh button; this reloads the title and metadata from the page currently in the browser, which means that you can navigate away as much as you like, and then just press refresh when you want to fill the fields from the main browser.

One final touch is that you can also use the formsPlayer RSS reader to load your bookmarks into another side-bar, and make them available as you browse.

I plan to expand the bar with other useful features, so any feedback would be appreciated.

(An additional feature has been added--using Google Suggest as a source of tags.)


Tags: | | | | | |

2 Comments:

Anonymous Anonymous said...

Mark, glad to see the extensive progress!

Mike, TechCrunch

August 18, 2005 3:16 AM  
Anonymous Anonymous said...

What a wonderful invention it is, this thing we call the Internet!

October 01, 2005 11:08 PM  

Post a Comment

Links to this post:

Create a Link

<< Home