Adam Bosworth is back on the web
Cool: Adam Bosworth is blogging again.
I thought it was a shame he stopped talking when he was hired by Google because a few people could not make the difference between his own opinion and the company he was working for.
Now that he has left Google and created a new startup, I’m looking forward to reading what he is up to….
Google Gears & Alchemy
Google just released Gears which is :
“an open source browser extension that enables web applications to provide offline functionality:
- Store and serve application resources locally
- Store data locally in a fully-searchable relational database
- Run asynchronous Javascript to improve application responsiveness”.
At first glance, it seems to be the implementation of what Adam Bosworth envisioned when he was talking about BEA’s Alchemy and browser connectivity (search for “When connectivity isn’t certain” at the middle of the page).
Gears is already enabled for Google Reader. I wonder how long it will take to have it supported in Gmail…
Another potential use case for Gears is to develop browser-based desktop applications. Their main data store will be provided by Gears database which could be synchronized from time to time to a web store. Office applications (document, spreadsheets, calendar) seem like good candidate for that approach: they’ll feel faster and more responsive that way. Synchronizing them will only be done when (auto) saving the document/spreadsheet/event.
Coolest Shopping Cart!
Spotted on Ruby On Rails mailing list: http://panic.com/goods/.
I especially like the ability to drag and drop items and the ‘puff’ effect when you remove an item from the shopping cart (it’s the same effect than on Mac OS X Dock).
Putting some order in chaotic wiki
By its very own nature, a Wiki is a bazaar and it works great like that. But from time to time, you neet to get some order from that chaos.
Let take the example of a big corporate wiki with thousand pages and hundred users. Most of the pages are related to a few other pages only and each users modify and read only a few pages.
More than often, the wiki ends up with a lot of related information disseminated on hundred pages with no apparent navigation between them. Given that users deal only with a small subset of this huge wiki, they may not be aware that potential useful information is sitting at other places.
To build some order in this chaos, a very useful feature implemented by most wiki is backlinks. To put it simply, a backlink on a page gives you a list of all the wiki pages pointing to that page thus enabling a backward navigation.
For example in the c2 wiki, every page has a backlink which is the title of the page. If you click on that title, you get a list of all wiki pages which points to that page. Other wikis present that differently (in Twiki, it’s a Ref-By link) but most wikis I encountered got that feature.
You then can use some naming rules. For example you can have (possibly empty) wiki pages whose names ends with Category (e.g. DevelopmentCategory, XmlCategory) and every pages related to that kind of category can add a link to one of these category pages.
E.g. on a page documenting XML binding, I would put a “in XmlCategory” at the beginning of the page to create a link to the XmlCategory page. An user interested to find information about XML has just to use the backlink of the XmlCategory page to find a link to my XML binding page.
<
p>
Basically with this very simple naming rule, you can categorize your wiki pages so that you can then browse the whole wiki through its backlinks.
To make it even better, I can create a CategoryCategory page which has a backlink to every other category pages. You have then an entry point to browse all the wiki based on these categories.
What is great with that approach is that users who write the pages and are the best to categorize it can help other users to find the information very easily.
As an aside, when I wrote this entry, I realized that there is a recurring pattern in the way I want to organize my data. I don’t organize my data anymore (a.k.a all in one place and no deep tree structure) but rely more and more on classification with tags, labels, categories to find it. This behavior is occuring with my mails, bookmarks, wiki pages, pictures,… But more about that in another post.
Simple del.icio.us bookmarklet
It’s so simple, it’s not really a bookmarklet…
I added a bookmark in Firefox which points to http://del.icio.us/jmesnil/%s and added a keyword d for it.
So now when I want to go to my del.icio.us java bookmarks, I just have to type d java in the address bar to go to it.
If I want to go to my java and jms bookmarks, it’s d java+jms.
<disclaimer>
I’m a total keyboard junkie. Too much emacs has definitely hurt my brain.
</disclaimer>
A del.ici.ous browser-based desktop application
Following my last post on browser-based desktop applications, I prototyped a little application to play with these ideas.
<
p>I’m a big fan of the social bookmarks manager del.icio.us which enable you to bookmark urls and categorize them. However, all your bookmarks are available to everyone else (it manages social bookmarks after all).
But, from time to time, I also need to bookmark urls that I don’t want to share (e.g. private ones or professional ones which could give too much hints to competitors).
So I bookmark these URLs with my browser. But they can not be categorized like del.icio.us ones (folders don’t help). So when I want to check bookmarks for a given topic I’ve to look in two different places and interfaces (the web bookmarks toolbar and del.icio.us).
I prototyped a simple application with the following requirements:
- keep a private list of bookmarks
- categorize them like in del.icio.us
- aggregate private and del.icio.us bookmarks
- display them in the same interface
- search categories for both private and del.icio.us bookmarks
The prototype is a browser-based desktop application (i.e. a standalone application which runs its embedded HTTP server and is displayed in the browser).
The application keeps a list of private bookmarks and aggregates them with del.icio.us ones (retrieved with del.icio.us REST API thanks to the delicious-java library).
In fact, from the user interface, it is quite similar to del.icio.us interface.
The only differences is that private bookmarks are automatically categorized with a private tag. (As an aside, I first had two type of bookmarks: public and private ones. But as I coded, I realized that I could used the bookmark own tags to categorize them as public or private…).
Special urls (like for displaying bookmarks for a set of categories) redirect to the application which filters both del.icio.us and private bookmarks.
Here some screenshots (I haven’t care much for the layout but it is based on del.icio.us):

To save a bookmark, type its url, its description, its (optional) extended description and list of space-separated tags.
To save it in the application ( i.e. on your desktop), tag it as private. Otherwise, the bookmark will be saved on del.icio.us.

If I look for all the bookmarks with the osgi tags, I see that some of them are categorized as private. They’re stored on the application and not on del.icio.us (see my del.icio.us OSGi page to see the differences).
As you can see on the screenshots, the only differences is that private bookmarks are categorized with a private tag.
I haven’t reproduced all features provided by del.icio.us but this first prototype is functional enough to help me vizualize what browser-based desktop applications could be.
I see this prototype like the equivalent of Google Desktop Search but for bookmarks. Both application aggregates local and web data and displays them in a consistent way in the browser.
<
p>As for the technology I used, it’s based on the OSGi framework and its HTTP service (I used Knoplferfish implementation). The cool thing is that everything can be delivered as a standalone application that sits anywhere on your hard drive. You just start it and point your web browser to http://localhost:8080:<your del.icio.us name>. It’s also possible make it a Windows or Mac OS X service with a cute little icon in the tray.
And, being based on OSGI, you can also use it from your PocketPC!
One other cool feature of this application is that since it sits on your own machine, you can also bookmark local files and categorize them.
For example, I’ve a local version of the OSGi specification in PDF file. I bookmarked it with my application with the url file:///Users/jeff/doc/…../r3.book.pdf.
So when I want to see all my bookmarks related to OSGi (http://localhost:8080/jmesnil?tag=osgi), I’ve got both web url and local documentation (URLs starting with file:// are automatically tagged as private and local).

The only problem is that you can’t open the files from their URLs (I already blogged about it but I haven’t find a correct solution yet).
There is nothing rocket science in this prototype but there is some potential for such browser-based desktop applications to integrate in a consistent way desktop data with the whole web.
Accepting file:// URL from localhost HTTP server
I have got a stupid problem: I have a HTTP server on localhost which serve web pages containing links to file:// URLs.
Firefox refused to open these URLs (which is completely understandable to avoid security holes). In fact, you can’t load them by clicking on the link but you can load them by dragging the URL to Firefox address bar.
If I want to load them by click, I can bypass Firefox security by setting security.checkloaduri property to false (in about:config preferences page). However it will also expose this security hole to any HTTP server which is clearly not acceptable. What I’d like is that Firefox accepts to load file:// URL from http://localhost only but not from any other HTTP server.
I can’t find documentation to enable this… I need to look for another solution to this problem…
A new breed of applications: browser-based desktop applications
There is a lot of talks about RIA since there are web application which require richer widgets than HTML. Some approaches are XUL, XAML, Flex,…
However I wonder if there won’t be an opposite trend of browser-based desktop application, i.e. desktop applications which are used from a web browser.
An example which comes to my mind is Google Desktop Search.
The advantage of such applications is that they could enhance user experience by seemingly integrate local manipulation of data with the whole web.
For example, would it be interesting to have a browser-based application which aggregates your weblog entries, google searches, del.icio.us bookmarks and flickr pictures to provide a web dashboard (or more precisely a local web portal)?
You could then be able to drag and drop a google results link in your del.icio.us bookmarks. Or drag and drop a flickr picture in your weblog. Or drag and drop a picture from iPhoto in flickr. Or…
The application could be based on OSGi framework and its embedded servlet container. You have several bundles composed of Servlets for each type of “service” (del.icio.us, blog, flickr) and a dashboard which deals with interactions between the services. Data could be aggregated by REST Web services (either through XmlHttpRequest or HTTP/XML/XSL Java libraries).
Another potential advantage of such an approach is that these local applications could use an intelligent cache (a la Adam Bosworth‘s Project Alchemy except that this cache is not located within the browser…) which will keep the HTTP requests if you’re offline and send them once you are online again.
Does that make sense or is it a crazy stupid thought?
Firefox “Save as…” different behaviors
Following my latest blog, I discovered that Firefox handles differently saving a file if you save it as HTML only or as a complete Web page.
If you specify HTML only, it saves the static content of the page (what was loaded at first in the browser). It does not save the DOM of the page.
However, if you specify complete Web Page, it is the DOM of the page which is saved (including generated content of the page). The disadvantage of that approach is that it’ll also save the scripts which are used in the file locally in a *_files directory instead of keeping the original URL of the scripts in the HTML file. That means that this page is no longer self-contained and you can’t send it to someone else. You also need to keep the *_files close or the JavaScript parts of the page won’t work anymore…
What I’d like is to be able to save the DOM of the page but also keep the original URL of scripts. I need to dig into Firefox to see if there are ways to configure its saving behavior…
local CRC Cards Whiteboard
In fact, the prototype CRC Cards Whiteboard (with or without explanations) I made is already usable.
You can play with it, create new CRC cards, delete old ones, etc. The Good Thing is that if you locally save the page (with your browser File -> Save Page As...), the saved file will contain your modifications. You can then point to your local file to update it again. You can also create a new whiteboard by saving it under a different file name..
It was quite a surprise to me. Initially, I thought that the save function of the browser would save the static content of the page while what is saved is actually the DOM of the page even if some parts of the DOM have been generated dynamically.
I’ll never stop to be amazed by the power of web browser!