One Year of Operator

It's been one year since I released Operator and I wanted to take the opportunity to thank everyone who is using it and has had good things to say about it. I haven't advanced the technology as much as I wanted to over the past year but hopefully this next year we'll see much more, especially with the inclusion of a microformats API in Firefox 3.

And now for something completely different.

If you use Operator on, you might notice that the "Tagspaces" item is available, but when you pop it down, you get a lot of stuff that says "ref=tag_dpp_cust_itdp_t." This is because amazon (like a lot of other sites - any drupal site comes to mind) is not following the rel-tag spec. To attempt to work around this problem, I've added a hidden preference to Operator called "extensions.operator.allowInvalidTags." If you add this preference via about:config and set it to true, Operator will display the text content of the tag and use it, instead of the proper tag value. Note that although this makes some things work on, they still is completely clueless about how to use rel-tag - checkout their Firefox tag page and take a look at the Tagspaces menu with the hidden preference turned on. You'll get things like "See all 226 tags" and "See all 25 customers." Great job amazon! Go read the spec!

And for everyone else that has screwed up tags, please go read the spec. If you don't like the spec, that's fine, but please don't add rel="tag" to anything that is an invalid tag.

Operator 0.9 beta available

I'm making available a beta of Operator 0.9, which has support for Firefox 3 and uses the built-in Firefox 3 microformats support.

The primary focus of this release has been performance, and I believe it shows. Sites like the Samsonite Store Locator are MUCH faster. Note that if you want to improve performance even more, you should remove the adr microformat from your toolbar. I've done this for new installs of Operator in the future. Since most pages with adrs have them in hCards, I've moved all the functionality that was for adrs into the hCard submenus.

Other changes include support for whether or not hidden microformats are displayed. You can try this out on the Samsonite website. Note that this functionality doesn't work on Firefox 3 because it required a change to the core Microformats support which hasn't made it into Firefox 3 yet.

Other small changes are the addition of searching for tags on products, as well as searching for addresses on MapQuest.

One thing that is NOT in this release is modifications to support the new RDFa spec. We're still waiting for some stuff to be finalized for that.


Operator and Page Load Performance

One of the biggest complaints about Operator is that it affects performance when loading pages and switching tabs. I've been spending the past few weeks analyzing these problems and I think I have them mostly solved. Note that page load vs. tab switching are actually two different problems; tab switching has to do with how fast I process the microformat data, whereas page load has to do with listening to DOM events. So here's what I learned:

  • My method for removing duplicate microformats was unnecessarily expensive. I was sorting in every case, and also duplicating and chopping up arrays. I went back to the way I originally wrote it and it works much better.
  • The adr microformat is a real pain because it doesn't have the concept of default text to display in the UI like other microformats. This meant that any page that has a lot of adr microformats was very expensive because of all the work I do computing what the address could be. To solve this in the future, adr will not be on the toolbar by default.
    Incidentally, the only reason I added adr in the first place was because I wanted to handle the edge case of multiple addresses in one hCard. I have since added support for actions to function on multiple items in a microformat, so the next release will move mapping back to hCard where it belongs with a submenu if there are multiple addresses.
  • Some pages have lots of hidden microformats they show and hide based on interaction with the page. This can cause some performance issues. I think that by default, microformats should not be visible in Operator if they don't show up on the page. So a page can have a thousand hidden microformats and it won't affect performance. There will be an option to show all microformats.
  • You have to be very careful not to add event listeners too early or you will get WAY too many messages. I was adding my DOM event listeners too soon so I was getting all DOM events during page load. Bad idea. Listeners should be added on each individual pageshow event, not DOMContentLoaded, and you should not try to be smart and add listeners recursively. Just add them to each target for each pageshow event.
  • While we're on the subject of DOMContentLoaded vs. pageshow, if you have an extension that updates the UI based on page content, you have to manage the interaction between these messages very carefully. The problem is that there are cases where you get just pageshow, just DOMContentLoaded, or both. Here's the scoop: DOMContentLoaded happens on the first load of a page as long as it is not from back/forward cache. pageshow happens with the load of any page including from the back/forward cache and it happens after DOMContentLoaded. The case where DOMContentLoaded happens without pageshow is the display of error messages like when you put in a bad URL. So the trick is to disable your UI on DOMContentLoaded and do interesting stuff on pageshow.
  • My testing shows that a pageshow event for a page containing frames doesn't happen until all the child frames have received their pageshow. Because of that, I can wait to process the microformats on the page until I have received the pageshow event for the main content document since I am going to recurse into the child frames anyway. If I am wrong, someone please correct me.

Well that's what I've learned so far. There should be an Operator release soon that addresses all these issues.

Microformats and Web Services Redux

Earlier I made a comment about how I wished there was a better way to connect microformats to web services. I'd like to elaborate on that comment and see if I could get some discussion going around the subject. First let me summarize the problem. (Note that throughout this post I will use the term microformat, but all these problems hold true for RDF as well)

The problem is that there is no standard way (that I've found) to interact with various web services that deal with the types of data involved in microformats. Note that in some cases there are standard data interchange formats (like vCard and iCal), but the web services do not always accept these formats.

The way Operator solves this problem through the use of user scripts that implement actions. What these actions do is take the microformat and use the data to construct a URL (or even a POST request) that connects to the appropriate web service. For instance, if I want to add my hCard to to the Yahoo! address book, the URL might look something like this:

In this case, the user script has taken apart the microformat and then constructed a URL that emulates adding a Yahoo! Contact. In doing this, lots of code was involved because the Yahoo! Add Contact does not map completely to the data that was in the microformat (you can see that code in yahoo.js). (Folks might ask why I'm not using Yahoo! APIs - that's mainly because I don't want to mess with authentication keys and stuff - this is a web interface, so I'd rather just redirect to websites)

The problem with this code is that in order to express the mapping from a microformat to Yahoo!, I require a large chunk of code.

For Firefox 3, I want to provide some UI that connects microformat to web services, but I want that to be extendable by third parties. I want it to be similar to how feed readers work in Firefox 2 (see registerContentHandler). While my action architecture works in the context of Operator, I do not believe that it is robust enough to be a part of Firefox 3. So what I'm trying to find is some better way to describe the mapping between microformats and web services or possibly to create a new standard around interacting with these web services. It might be as simple as just encouraging all of the vendors to accept the upload of vCard and iCal. I don't know. Here are some thoughts I (and others) have had.

Encourage people to support the submission of vCard and iCal in a standard way

The obvious thing to do here would be for services to allow the submission of vCards and iCals directly to their web services as a way to provide information to the services. 30 Boxes currently allows this, but unfortunately the iCal must be physically located on a web site, so I can't send it to them. Other services that accept vCards use a POST mechanism that is difficult to emulate because it relies on lots of private data during the POST submission.

Server Data Broker

Setup up a web service that would essentially act as a data broker. Data could be given to this server in a standard way, and then the server would turn that data into a URL that could be used to redirect to the appropriate web service. In this way, the logic to turn the microformat data into a URL would be done on the server. The client would give some common data source to the server, telling the service where it wanted the data to be sent and the server would simply send the client a redirect URL.

OpenAction similar to OpenSearch

S. Sriram had an interesting thought in reply to my previous post. He thought about using something similar to OpenSearch where web services can have an XML description file that describes how to interact with their services and then we could use that file to determine how to map the microformat data to the web service.

Those are just a few ideas we've come up with. I'd love to hear any other ideas you might have...

Ajax Experience Trip Report

Thought I'd take a minute to post about Ajax Experience.

Before I talk about the conference, I want to talk a little bit about some really cool technology that was in the Seaport Hotel. It's called Seaportal. Seaportal is a machine running Windows XP Embedded that provides web surfing, office applications and free Voice over IP. It uses OpenOffice for the office applications and Internet Explorer for the web surfing. I was curious about the mix of open source and non-open source, so I contacted the IT department. The answer was what I expected. They picked OpenOffice because it saved them money on licensing, and they picked IE because it was a part of the embedded stack that came from their vendor They didn't want to add extra software to the stack, which makes perfect sense. The IE also came pretty well customized by the vendor, although they did have to work to figure out how to do more customization with the registry.

All in all, I was VERY impressed by their solution and found myself using it a lot to avoid turning on my laptop when I needed something quick. My only complaints would be that using IE 6 is REALLY painful and that they need to be more current with adding interesting plug ins and things. For instance, I couldn't watch TV shows from because it uses some proprietary plug ins.

If you stay in Boston, stay at the Seaport and request a room with Seaportal to check it out. Now on to the conference...

Started out the conference on Wednesday by attending "State of Ajax" by Ben Galbraith and Dion Almaer. Good talk. Awesome pie chart about where web developers spend their time that I wish I could find to show you. (Their State of Ajax talk is not on the Ajax Experience slides page.) I disagreed with their assessment of JavaScript tools. There is more to life than Firebug.

Next up was Kevin Survance from MapQuest. This keynote was awesome. Kevin is an excellent speaker and he gave a great picture of what MapQuest is doing to reinvent themselves. He talked about the new MapQuest which is in beta right now. I find it funny that despite the popularity of Google Maps, the term MapQuest is embedded in our culture similar to Kleenex. On a side note, I talked to a couple MapQuest developers about microformats and I'm hoping they'll put them on the site. I'm planning to do an Operator action for the new MapQuest beta.

From there I went to the Aptana IDE presentation. This presentation was disappointing. The presenter just wasn't the right guy to do this, and there was actually too much demo and not enough slides.

After lunch I went to the Google Gears talk, and it was interesting, but there really wasn't much that I couldn't have gotten from reading documentation on the web, so I went over to catch the tail end of Accessibility and Internationalization with Dojo. Good presentation, but it was folks on my team, so what did I expect.

After lunch I went to "iPhone and iPod Touch Web Development" which was a horribly named presentation, because it was basically a plug for Aptana. This session should have been simply combined into the other Aptana presentation.

Skipped the next round, but caught the Silverlight presentation later that afternoon. What impressed me most about the Silverlight stuff was the tooling. Microsoft really has the tooling down.

Thursday I started with "Introduction to jQuery" by John Resig. This was great. I finally "get" jQuery and hope to start messing around with it soon. Really showed off how useful Firebug was for jQuery development.

The "Ask the Ajax Experts" panel was interesting, but everyone involved in this session needs to learn a little bit about how a panel works. Basically with the VERY long answers and the number of questions that Ben and Dion asked, there really wasn't much time to get questions from the audience.

Next up was my session on the Ajax Toolkit Framework. I thought it went well, although I need more content for my presentation. I was 20 minutes short.

After my presentation, I skipped out to meet with a friend over at IBM Research.

Friday morning I didn't have a lot of time before my flight, but I caught Aza Raskin from Humanized talking about the ZIA or Zen Internet Application. This was a really interesting presentation that really got me thinking about the best way to do microformat UI. I'm still thinking.

Other interesting notes were meeting Mark Finkle in person and getting to see the qooxdoo folks again.

Next time I'll plan less stuff on the side and go to more sessions.

Heading off to Ajax Experience

As part of my whirlwind tour talking about the Ajax Toolkit Framework, I'll be headed to Ajax Experience in Boston.

This presentation will be about using Eclipse for JavaScript development, with an emphasis on the work we did to embed Mozilla in Eclipse and provide access to various browser tooling, including JavaScript debugging, CSS tools, etc. We'll also talk about JSDT which is the new JavaScript editor we are working on for Eclipse.

If you are in town, look me up. My presentation is Thursday at 2:10.

ATF at Eclipse Summit Europe 2007

If you're wondering why I've been quiet, it's because I'm at Eclipse Summit Europe 2007 in Germany demoing and talking about the AJAX Toolkit Framework. While I'm here, though, I've seen some interesting technology I wanted to share.

qooxdoo is a very cool looking AJAX toolkit that's actually been around quite a while. Right now it's more geared toward building an application from the ground up. The widgets look amazing! Check out the demo. Incidentally, the RAP project is using qooxdoo to render RCP applications in the browser.

When I first heard about Jazz, I thought it was yet another bug system. Boy was I wrong. This is a very cool tool set that helps people collaboratively build software. It's being used by the Jazz team to build Jazz. You should take a look.

That's all for now. Next up is a week at home and then off to Ajax Experience. See you there!

Getting microformats working with web services

Hey Google, Yahoo! and 30 Boxes (and others).

PLEASE create places where I can simply POST vCards or iCals or microformats or JSON or something else to your services to add contacts and calendar entries. I'm not a web app, so I can't get an API key. And I shouldn't have to maintain login state when the browser is doing it for me. All I want is an easy way to add stuff to a logged in users account. Is that too much to ask?

With Yahoo! calendars and contact, as well as Google Calendar, I have to resort to undocumented URL syntax. Google Contacts I can't do anything. 30 Boxes requires that the ics file be physically located on a server, although they have a URL syntax that kind of works.

It doesn't even have to be a POST. If you could come up with some straightforward URL syntax, that would be great. Trying to figure out the stuff you guys have put together so far is incredibly painful.

So please. Help a guy out.

Firefox EWG - Meeting #3

Cross-posted from the Enterprise2.0 blog

Call on Sept 19th was about useful Extensions for the Enterprise. A larger portion of the meeting, however focused on the apparent dwindling interest in Enterprise Firefox within the larger community.

Is the Enterprise simply not ready to bring Firefox in-house? Or, are the majority of institutional adopters simply happy with a consumer product floating about?

Perhaps one of the problems is that we still talk about Firefox as a Web Browser as opposed to a "Productivity Platform" for the Desktop.

Firefox is a Productivity Platform
All the features that make Firefox a consumer favorite deal with productivity. Tabs, keywords, search bars, extensions, dictionaries, etc help us be effective and productive in our work and home lives. When consumer says "better usability", enterprise says "better productivity".

Mike Kaply spoke about adoption at IBM. Developers are finding ways to enhance the end-user experience by writing custom extensions for Firefox. Whether the extensions glue several applications together or simply automate the tedious process of filling out web-forms, end result is a boost to productivity.

If Firefox is the gateway or glue between what's on the Desktop and what's on the network, potential for productivity-boosting application is something to ponder.

Raising awareness
Mike and I are going to take lead on a few initiatives to help raise awareness on the Enterprise Firefox front:

  • 10 Steps to adopting Firefox in the Enterprise -
    Now that we've begun to pool experiences, we should be able to bake out a definitive guide of sorts for things to consider when bringing Firefox into an enterprise environment
  • Good Ol' Conference -
    We will begin looking at opportunities to present at some Conferences
  • Blogging - check...
  • Code Day and Training -
    The learning curve for any kind of Mozilla-related development is rather high. Perhaps training targeting institutions and enterprises (like an Enterprise track) will help developers scale this wall.
  • Enterprise Firefox Incubator -
    Talk has alway been cheap. As we address settings management, security, tools etc we will kick off projects within the Enterprise Working Group.

Enterprise Working Group Incubator
On my end, I'm going to kick off some projects for the Incubator. Specifically there has been interest in:

  • Mission Control - how to get up and running, what the back-end implementation can look like and benefits over GPO
  • Customized Reporter Extension - so that you can redirect Broken Website reports to a repository on your intranet
  • Managed Security Zones for Firefox - how to configure and lock capabilitiy.policy settings in Firefox, how to create a "trusted" zone and fully leverage Web2.0 technologies within your trusted intranet.

As always, if any of these topics or projects are of interest to you, please visit the wiki, participate in the calls or simply leave a comment on this here Blog.

AJAX Toolkit Framework

Some of you may not be aware of another project being worked on by members of my team callled the AJAX Toolkit Framework (ATF). ATF provides an AJAX Tooling Environment in Eclipse that includes things like a DOM Inspector, an HTTP request monitor, JavaScript debugger, JavaScript editor with validation and code completion, and more. This functionality was created by embedding Mozilla technology into Eclipse using JavaXPCOM.

What's exciting is that we final got all through all the legal hurdles so you can now download one package that contains the entire environment, with stuff that isn't relevant to ATF removed. So just download the M4 milestone from here, unzip it and you can try it out. If you want to see how it works, you can check out the demos, but note that we are in the process of updating those to the new version.

I'll be at AJAXWorld next week talking about this project so feel free to look me up. I'll definitely be at the ATF presentation on Monday at 5:40 and I'll probably be hanging around IBM booth on the Expo Floor at other times. If you want to set up a time to meet with me about something specific while I'm out there, feel free to contact me.