Sharing XULRunner between applications

Matthew Gertner proposes that all XULRunner applications (including Firefox) should share the same XULRunner instance.

While it’s very natural on Linux, I don’t think it’s reasonable on Windows and Mac to expect multiple application to run on the same runtime. That would force Mozilla to keep backward-compatibility, and that’s a big pain in the neck. Ask Microsoft about backward compatibility in Windows: over the year, they had to simulate bugs from older Windows versions to prevent breaking older applications.

Imagine Firefox 3.1 is released, and requires a newer version of XULRunner. You install Firefox 3.1, in order to do that you upgrade your XULRunner. Well, the Songbird folks may not have tested their bird with the latest XULRunner, and it may break. If it does, you’re stuck: either you give up on the latest Firefox, either you give up on Songbird.

That works on Linux because a single actor (the distribution) gets to pick what version to include, test to make sure it works, and patch stuff if necessary. In the Windows and Mac world, there is no one single repository and people get their software directly from upstream, so if you go down the path of dependencies it’s going to be a hell of conflicts… Unless Mozilla guarantees a full backward-compatibility, which is a lot of work because it requires testing.

Of course, that doesn’t mean applications shouldn’t be designed to allow runtime sharing. But I can guarantee that even when that happen, everyone (Firefox, Songbird, Thunderbird) will be bundling their own XULRunner runtime, just like they’re doing today… Except for the Linux distributions.

AMO editor

My application as a AMO editor has just been accepted!

I will now be reviewing Firefox extensions and themes, for the benefit of users and developers. Extensibility is a killer feature of any product based on Mozilla technologies, but it’s so powerful that it can be dangerous. Extensions can do whatever the hell they want, and that includes breaking a browser or do nasty things. The AMO editors must only show extensions that work correctly, don’t break the browser, and don’t invade the user’s privacy.

Especially after the launch of Firefox 3, most extension had to be ported, and a lot of new developers are coming to the platform, increasing the workload for AMO editors. I will be helping the AMO team to get quality addons in the front of users, while teaching developers what they should do to reach the quality level expected by AMO.

Note that, while the technologies involved are the same, this is independent from my day job. I will be reviewing extensions as an individual, not as an employee of my employer.

addons.mozilla.org

Little Brown Bear



Pretty similar to the rabbits of last time. From The Cute Book.

Kappa



The Kappa is a Japanese mythical animal. It has a beak, a turtle shell and stands on his two legs. Theoretically he also has a dish full of water on his head, and dies if the dish ever gets empty; this is why kappas can be found mostly in rivers. Hard life!

From The Cute Book.

Felt Rabbits



My first realization (yeah, I wasn’t very good at it yet). And it’s not crochet, it was during my “felt” period. From The Cute Book.

Getting more media sites in Flock’s mediabar, with Media RSS

Flock 2.0 is on its way to the final release, and many of you have noticed that besides all the Firefox 3 goodness, the experience is pretty much the same as in Flock 1.2. Well, it’s pretty much the same, not exactly the same. One discreet feature is the recognition of Media RSS feeds for the mediabar.

Media RSS on the French website lemonde.fr

While Flock has been doing a lot of service-specific integration, it has never been the intent for the long term. We do service-specific because we have no choice, but we are eager to support open standards (and promote them) as they get available. Our blog editor had support for MetaWeblog and ATOM Publishing Protocol from the beginning, and now it’s the turn of the mediabar to get some open standard love.

Media Discovery

What does it mean for you, the user? Well, it means that besides the 7 supported services, you can consume content from any website that advertise an RSS feed. You can try it, in Flock 2.0beta2. Here is a selection of websites:

Custom Search

So when you visit a page with a media rss feed, you can see it in the mediabar and subscribe to it. It gives a experience similar to Flock’s news reader, but with an experience more tailored to media content (images and videos). But there is more. It’s really an advanced feature, but if a website provides a media rss feed for a given search result, you can use that to add search in the mediabar.

Example: Hulu
Hulu is a website with TV content from the major networks (FOX, NBS, PBS…) with limited advertisement. You can get search for it in Flock’s mediabar, again that’s for Flock 2.0beta2:

  1. Open the URL “about:config”
  2. Search for “rssSearch”
  3. Change the value of flock.photo.rssSearch to:
    [{"hulu":{"id":"hulu","title":"Hulu Videos","url":"http://www.hulu.com/feed/search/%s","icon":"http://www.hulu.com/images/hulu.ico"}}]
  4. Open the mediabar

Voilà! You can now search for your favorite TV shows in the mediabar.

Search for "Homer" on Hulu.com

Get support for your site

If you have a feed with images or videos on your website/blog, you can get it in Flock’s mediabar pretty easily.

The easiest way is to pipe your feed through Feedburner, making sure you enable their SmartCast feature. Feedburner will nicely add the required markup to your feed (and they have a lot of other features too).

If you’re tech savvy and you’d rather do it your way, there is some documentation that I wrote for that.

Theming GTK+ in CSS? Hell yeah!

I read on Planet Gnome that there’s a plan to drop current theme engines to move to a CSS-like system. That’s really a great idea, and I was stoked to learn that Qt already has it.

This is the kind of change that can really make a difference in the number and quality of available themes. While the current system requires C programming to create an new engine and unleash the full power of GTK+ theming, a system based on CSS would only require knowledge that most designers today already have. Most people are working on web app, so let those people hack on desktop apps with more or less the knowledge set they already have is a great way to keep the desktop alive.

Hey, isn’t it why Firefox extensions and themes are so popular?

Flock in Japanese

Update: Flock in Japanese has been released. You can download it here.
Update2: A blogger found the right words to announce this release:
Flock 日本語版 キタ━━━━━━(゚∀゚)━━━━━━ !!!!!

It’s been a long time, but we’re finally there: the release of Flock in Japanese is very close! You can read details (in Japanese) on the blog of one of the translators. It even includes a link to a pre-release of the Japanese version. As the translator says, it’s better to send feedback about the translation directly to the translators. If you use the “feedback” button, that get to our support guy who won’t understand much.

As good news always come by two, an other member of the JA translation team will make a seminar about Flock, in at OSC Kansai 2008 (Open Source Conference) on July 18th. If you’re in the region at that time, that’s a good opportunity to meet between Japanese Flock users/contributors.

And again, congrats to the JA localization team!

Week-End Hacking

I’ve spent a day hacking on a new extension. It’s for gamers (like me!) who like to check reviews about new games before they buy. I’ve put Amazon customer reviews score, the mandatory Metacritic score. More to come - let me know what you think should be there.

Also, when you visit Metacritic, IGN or Gamespot, games get detected, so all you need when you’re viewing a page about a game is to click on the famicom icon, and the info will open on the left. Pretty cool, eh?

It’s in AMO sandbox now, so if you don’t have an AMO account with Sandbox access you can also download it here. And if you like it, don’t forget to write a review on AMO, so it can get out of the sandbox!

Video Games Spy

"Boom Blox" in VGSpy

Flock on Firefox 3

Update: a public beta of Flock 2.0 is available.

In order to minimize the wait between the release of Firefox 3 and a Flock version based on it, Manish and me started to work on porting Flock to FF3. The current stable version of Flock is based on Firefox 2, the latest stable release from Mozilla.

That’s today that we’re very glad to work on overlays, and keep our source modification away from Mozilla files as much as possible. Changes that were touching Mozilla files take way more time to merge/migrate. That’s also an opportunity for us to clean up some of our code. For example, the way we were changing entities in browser.xul was to replace the DTD file. Bad, because we were missing the new entities from Firefox 3. We fixed that to only override the entities we want to change (Firefox -> Flock, Bookmarks -> Favorites…)

So here is where we are after a few days.

What works

  • The datastorage layer. The data layer of Flock consists in an RDF datasource accessible through a Javascript object mapper (Coop) and serialized on the disk in a mozstorage (sqlite) database. I don’t know if Manish had to do anything to make it work in Firefox 3, but it seems to be working great.
  • The services backend. We had to migrate to the login manager because the password manager is deprecated. So long nsIPassword, the time of nsILoginInfo has come.
  • The web clipboard. Not really a surprise, it’s simple enough not to break. Cherry on the cake: now when you drag a picture or a snippet, the whole picture moves with your cursor. That really looks great and make drag’n drop very clear and easy to understand.
  • The blog editor. Still some bugs, but the basic functionality is there. Almost no work required!
  • The people sidebar. I’m really impressed. This is a big piece of code, but as soon as the service backend was fixed it just worked out-of-the-box. Everything seems to be working.
  • The star button. That one was easy. Mozilla is introducing a one-click bookmarking star button (just like the one we’ve been having in Flock for 2 years). So all I had to do is drop our own star, move Mozilla’s one from the right to the left and theme it correctly. Tada! No online bookmark yet and it’s not clear whether we’ll stick with Firefox’ behavior (that’s not yet clearly defined anyway), but it’s a start.

What’s broken

  • The theme. I started to fix it, but there is still a lot of work to do. The background on toolbars is missing, tabs and the URL bar need to be styled…
  • Full text history indexing. Manish did some work on the Lucene level, and I started to migrate from the History RDF to Places. Not quite working yet.
  • The searchbar. I didn’t look at it yet, but as you can see on the screenshot it’s not pretty. Maybe it will just work after we fix the theme and the indexer?
  • Online bookmarks (Delicious, Magnolia). They do get synchronized locally but don’t appear in the UI yet. With Places we’re basically throwing away most of our UI favorites code, but we need to reinject the code related to online bookmarks in the Places UI.
  • Mediabar. It’s pretty much busted. We’ve been using hacks and non-standard techniques more than in any other modules; I suspect that most of the breakages are due to things we were not supposed to do even in Firefox 2, and we may have to redesign some pieces to do it “the right way”.
  • Notifications. I reverted that change because it was preventing the browser to start (”can’t find the XBL for browser”: hard to use it when the browser window doesn’t appear!). Manish is going to take care of it, and that’ll probably end up being a simple change.

I recommend to anyone coding on the Flock browser to have a look at Mozilla’s page about porting extensions to Firefox 3. In particular, there are points about stuff that work in Firefox 2, but that we were not supposed to use and will stop working in Firefox 3. For exemple, event.preventBubble deprecated in favor of event.stopPropagation. If we start to be careful about these points in Flock’s trunk, the migration to Firefox 3 will be much smoother.

And if you want to play with a broken browser… Feel free to build the branch experimental/firefox3-merge.

Flock on Firefox 3