Tag Archive - operator

Microsoft Activities for Firefox

After looking at Microsoft Activities in IE8 and noticing that they look suspiciously like my ideas around actions in Operator, I decided to implement them in Firefox.

For your downloading pleasure, here is a first pass at Activities support in Firefox. I haven’t actually looked at IE 8, so what I did was based on the page about Activities I saw this morning. You can install activities from the Service Gallery, and then if you open a new window, those activities will be active (they don’t become active in the page you download them from – working on that). To use an activity, highlight some text and right click on it.

If folks think this is interesting, I’ll keep working on it. Enjoy.

Note this doesn’t support previews yet – I’m working on that.

Operator 0.9g (Release Candidate) available

I’m making a release candidate for Operator available hoping that I can shake out any last bugs in it. It’s available here. Note the release candidate is English only. I have it on Babelzilla at this moment getting translated.

First the caveat – RDFa support is not baked in this version (as in RDFa the old way doesn’t work, and RDFa the new way doesn’t work). That’s mainly because the RDFa spec was in flux. I think it’s done now and hopefully we’ll have the RDFa parser before I release the official 0.9.

So what is going to be new in 0.9? Lots of bug fixes and improvements to general interpretation of how microformats work. I detailed this in a previous post, but here are some highlights:

  • Songbird support!
  • Fixes to make sure things work in Firefox 3
  • Menus no longer magically disappear on some pages
  • hCards supports nested menus to access actions (more logical than trying to use adr for multiple addresses)
  • Nested microformats are now handled per the spec as best we can figure it out
  • Performance should be much better (and it has been in my experience)

I hope some people will try this out and let me know how I did. I’m trying to get 0.9 out next week for SXSW. Thanks!

ONE MORE THING: If your microformat is hidden (via CSS or otherwise), it will no longer display in Operator by default! You need to turn on the “show hidden microformats” preferences. See this post.

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 amazon.com, 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 amazon.com, 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 amazon.com 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.

Enjoy!

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:

http://address.yahoo.com/?ln=Kaply&fn=Michael&co=IBM
&e=nospam@example.com&pu=http://www.kaply.com/weblog/&A=C

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…

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.

iDOO and Operator

The website iDOO added support for hCards and created an Operator user script to integrate with iDOO. The even plugged Operator in their announcement. Nice work!

You can get more information here.

Operator 0.8 is available

Operator 0.8 is now available from addons.mozilla.org.

One of the first things you’ll notice is that I changed the default view to be data formats instead of actions. I did this because I found this is what most people did anyway. If you disagree, you can go to Operator Options and switch back to options.
You’ll also notice that if you did any customizations, you lost them. Unfortunately I did some preference rewriting this time around and the migration was getting to be painful. It shouldn’t happen again.

Some of the new features in Operator 0.8 include:

  • RDFa support (courtesy of Elias Torres)
  • eRDF support (courtesy of Keith Alexander)
  • New user interface elements, including an icon on the location bar as well as a sidebar
  • New preferences including auto-hiding the toolbar
  • The address microformats has been split out so that actions can be more granular
  • Actions can now be associated with multiple types of data, so the Google Maps action, for instance, works with Addresses and Locations
  • Much better support for frames and iframes
  • Support for non HTML documents
  • When debugging microformats, Operator connects to Brian Suda’s X2V behind the scenes so you can compare results
  • Lots of bug fixes

I had to break user script compatibility with this release. Most user scripts have already been updated and can be found on the user script page. I also changed the location of user scripts, so old user scripts won’t conflict.

Finally, I’ve created a page specifically to talk about Operator. If I’ve missed anything, please let me know. And feel free to visit my weblog and take my poll about how you interact with Operator.

Have fun!

Special note to users of the 0.8 betas – you’ll need to go Options and delete “RDFa” and re add it as “RDF” to get RDF functionality back.

Latest Operator News

Operator 0.8 is getting very close. I’m trying to finalize some UI stuff, specifically for testing some stuff for Firefox 3. Stay tuned. In the mean time, here’s some random things I need to post.

Operator 0.8 is going to have support for eRDF. Because of this, I’m changing “RDFa” actions to simply be “RDF” actions. So anywhere you use “RDFa” in an action, please change it to “RDF” for 0.8 final compatibility.

If you are interested in writing actions, I created an advanced article on creating actions. This is a follow up to my basic article on creating actions

The latest user scripts will always be on the Operator User Scripts page. This will be the home for any user scripts I mention in my blog and will also have links to third party user scripts. If you find bugs in user scripts, check that page to see if the scripts have been updated. I’ll mark any updates to that page with “NEW.”

And speaking of user scripts, there are new user scripts from Dan Noble for mapping hCards and hCalendar with Google Earth, as well as a user script from Thorsten Panknin for the Mister Wong social bookmarking site.

Incidentall, if you are an extension developer and want to try using the new microformats code in Firefox 3, you can download Gran Paradiso Alpha 7 and then follow these instructions to try it out.

Page 2 of 6«12345»...Last »