Skip to content

Instantly share code, notes, and snippets.

@robertknight
Last active September 18, 2017 18:53
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertknight/c619ab918fb17fbd1edb288400afddb6 to your computer and use it in GitHub Desktop.
Save robertknight/c619ab918fb17fbd1edb288400afddb6 to your computer and use it in GitHub Desktop.
Apache Annotator and Hypothesis

Apache Annotator and Hypothesis FAQ

What is Apache Annotator?

Apache Annotator is a project that develops libraries and tools that are useful in implementing projects that use the Web Annotations standards. It was started by ex-Hypothesis contributor Benjamin Young.

Why Apache?

Apache provides legal & technical infrastructure designed to support long-lived projects whose code is contributed and consumed by individuals and organizations that come and go over time. Having the project be governed by Apache avoids some of the potential hazards that come with having this code living on say, a personal GitHub repo.

How does this relate to Hypothesis?

Hypothesis uses a set of DOM anchoring libraries to map annotations to regions of the page in order to display highlights. We have needed to contribute bug fixes, performance improvements and tests to this code from time to time. This code is now expected to move to the Apache Annotator project.

In future, we might want to use other libraries, schemas or tools that are contributed to this project. We might also want to extract modules from Hypothesis that are likely to be useful to other annotation tools and make it available as an independent library under the banner of the Apache Annotator project.

What code be in Apache Annotator?

Initially the project will include the libraries that anchor annotations to regions of an HTML document. It will also include JSON schemas for validating annotations.

How will development of Apache Annotator work?

Apache Annotator has a website at http://annotator.apache.org which explains the scope of the project and has links to a mailing list and information for users and contributors. The code lives on Apache's Git server and is mirrored to GitHub at https://github.com/apache/incubator-annotator

Contributors will be able to make contributions by creating pull requests following the standard GitHub development workflow.

Code will be stored in a single repository, but be published as a set of independently usable npm modules under the @annotator scope.

How will Hypothesis use or contribute to code in the Apache Annotator project?

Initially the only change is that Hypothesis will be changed to consume the versions of these packages published by the Apache Annotator project. If we need to change these libraries in future, we'll follow the development process for Apache Annotator.

In order to make contributions to the Apache Annotator project, the copyright owner (both the individuals and the Hypothesis organisation) would need to sign a Contributor License Agreement (CLA).

How does this relate to the future of Annotator.js in the client?

The client is partly built on Annotator.js 1.x, a library that provides a framework for annotation tools. It was originally envisioned that Annotator.js would be moved into the Apache Annotator project.

Over time however we have heavily customized or entirely replaced much of Annotator's functionality with custom code or standalone modules from npm. Continuing to use Annotator v1.x has downsides for the download size/startup time of the client and the ease of understanding the codebase and making certain kinds of changes. As a result, our current thinking is that the use of Annotator in the client will be phased out.

Consequently, whether or not Annotator.js moves to the Apache Annotator project isn't really expected to impact us, and we don't have that much incentive to do that work ourselves. Decoupling code in the client from Annotator would however potentially allow us to submit it to the Apache Annotator project for use by other annotation projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment