weave-ethernet-cable

We talk a lot about Ubiquity being easy to extend, what with the ease of writing your own commands and so on.

But did you know that Weave is also built to be extended?

Weave uses a generic syncing algorithm which uses plug-ins called Engines to handle different data types. The following engines are built into Weave:

  • Bookmarks (fully functional)
  • History (fully functional)
  • Stored Passwords (currently being revamped for 0.3)
  • Tabs (being revamped)
  • Form Field Entries (being revamped)
  • Cookies (being revamped)

But since the syncing algorithm is fully generic, it will work with any data you give it. Therefore, you can write a sync engine to synchronize any data you want, as long as that data is accessible from Mozilla extension javascript. Your sync engine just has to extend some existing Javascript prototypes and add some logic for reading, writing, and updating your data type. The Weave core will do the rest.

It’s more work than writing a Ubiquity command, but not as much as writing a whole new extension.

Last night I finished writing the Weave client-side API documentation that describes, in excruciating detail, how to write your own sync engine.

I hope having this API documented will inspire some people to try their hand at weaving together their own data types!

(If there’s any part of the documentation that doesn’t make sense, leave a comment or visit #weave on irc.mozilla.org and let us know how it could be made clearer.)