Você está na página 1de 8

Nectar: A browser-agnostic contextual web annotation tool

Daniel S. Crosta

December 14, 2005

Abstract courseware systems now include at least online


discussion forums associated with each class, and
Nectar enables users of the MoinMoin collabo- some support collaborative editing environments
rative wiki editing environment to conveniently (eg Blackboard’s “Team Sites” tool) which allow
create and view in-text annotations to wiki doc- users to create web documents quickly, without
uments without disturbing the underlying doc- being bothered to learn complex markup lan-
ument. It is designed to facilitate online col- gauges.
laboration for traditional classroom learning by These tools, however, are not tightly inte-
allowing authors to lock documents for editing, grated in the online interface, so that discussion
but still solicit comments online. Nectar has an boards and collaborative editing tools are often
obvious and easy to learn yet unobtrusive inter- a few clicks away, on a different web page. I
face, supports arbitrary threaded conversations believe that for collaborative tools to be widely
started from any annotation, and supports both adopted, they must be available in all parts of
contextual and page-level annotations. the online environment. This allows discussion
and collaboration around web documents to take
1 Introduction place in context, as discussion of paper docu-
ments in class takes place with the documents in
For both large lecture-style classes, and smaller front of participants.
discussion-oriented ones, the World Wide Web One area of active industrial and academic
has proven to be a valuable resource, allowing research hopes to bridge the gap between tra-
both teachers and students to extend learning ditional in-class and web learning by enabling
beyond the walls of the classroom. Early, pri- students and faculty to create in-text annota-
marily commercial work (eg Blackboard [3]) fo- tions on internet documents. This is usually
cused on easing course management for large called web annotation. In particular, Chong and
classes, with tools like gradebooks, online doc- Sakauchi [6] report that “students have the ten-
ument submission and distribution, and self- dency to write everything down during a lec-
grading quizzes. Recently, focus has begun ture...for fear of missing something important.”
to shift toward supporting collaboration among As laptop and tablet computers become more
students in small classes and groups within widespread, it will be possible for students to
larger classes on the web. Most educational have access to prepared lecture notes during the

1
Proceedings of the Class of 2006 Senior Conference, pages 1–8,
Computer Science Department, Swarthmore College 2005c
lecture. Web annotation, then, allows students fortunately, they do not describe algorithms nor
to make their own notes directly “on” the online data structures for dealing with changing under-
lecture notes, instead of having to keep personal lying document text. In this system, notes are
notes and prepared lecture notes separate, avoid- primarily for personal use, though they can be
ing the “split interface” problem also identified shared on demand.
by Chong and Sakauchi. Cadiz et al. [4] performed a case study of a
Web annotation is not a new idea, and sev- working online annotation system at a business
eral commercial and academic groups have made with over 400 users and over 1,200 documents,
preliminary stabs at it. Each implementation in which they discuss the “orphaning” problem
tackles part of the overall goal, with varying de- of notes losing the context to which they origi-
grees of sucess. This work attempts to draw to- nally refer. To address the problem, they suggest
gether insights and advances made in the past automatic notification to the note’s author, who
eight years, and create an integrated web anno- may then choose new context for the note, or de-
tation system for the MoinMoin [12] online col- termine that it may no longer be relevant to the
laborative Wiki [10] environment. The Wiki en- document.
vironment, while not specialized for educational The SCHOLION [9] system is a distance-
use, is a promising platform nonetheless, as its learning solution for publishing lecture slides.
flexibility allows for a variety of uses. I believe Students may arbitrarily annotate these slides
that an annotation tool in this environment is for personal or shared use. Additionally, stu-
more valuable than one specialized for any par- dents may reply to questions or notes posted
ticular existing courseware system, since it need by other students by creating links from anno-
not be specialized for all the types of documents tations to a class discussion board area. It is
one might want to annotate. unclear whether the discussion thread contains
a reverse link to the original annotation.
Finally, Chong and Sakauchi [6] present the
2 Related Work first in-browser web annotation tool geared to-
ward educational needs. Among their design
As early as 1997, instructors at Freiburg Univer-
goals, they reiterate the study benefits of anno-
sity identified the need to allow students to make
tating course materials. They also wish to sup-
annotations to online course material. Bacher
port students working in groups either concur-
et al. [2] describe a case study of moving course
rently or asynchronously, both for collaborative
materials for an algorithms and data structures
projects and group review sessions.
class to the world wide web. In it, they identify
the need for an analog to marginal notes students
would make on in-class handouts. Additionally,
they identify the need for “annotations at vari- 3 Overview and Goals
ous levels,” where notes may refer to either an
entire document, or some paragraph or segment I believe that a next generation web annotation
of text from within the document. This notion system ought to support all of the following fea-
was later termed “idea-level placement.” [5] Un- tures, from an end user’s perspective:

2
• Use context when it makes sense. Previous puter from which a web annotation system
work [2, 4, 6, 9] has shown that for many is likely to be used.
tasks, notes should be created and displayed
in context. If a note refers only to a partic-
These goals, then, inform the design of the
ular sentence, that should be made obvious
Nectar system. The most obvious data struc-
in both input and display. On the other
ture with which to implement threaded notes is
hand, some annotations may refer to the
a tree, in which each branch represents a thread
document as a whole (imagine, for exam-
of conversation. No restrictions are placed on
ple, concluding thoughts a professor makes
the branching pattern of the tree. Some notes
on a student’s paper). Thus, we have two
may comprise only a single node (if there are no
annotation types: idea-level and page-level
replies), while others may spawn deeply threaded
annotations.
discussions, which will take the form of highly
branching or very tall trees. Conceptually, the
• Annotations are conversations. SCHO-
document itself forms the root node, of which
LION [9] introduced the notion of linking
each annotation is a child. Replies to annota-
discussions to annotations. In the Microsoft
tions form additional leaf nodes, which can be-
Office Web Discussions system discussed in
come internal nodes when they themselves are
[4], this idea is taken further, by putting
replied to.
the conversation in context within the doc-
ument being discussed. Additionally, the Idea-level notes store an additional field in the
notes should be viewable as conversations root node: the location in the document that the
in their own right, with backlinks to the note references as context. This is used to locate
document which spurred the conversation. the idea-level notes in the text when displaying
A web annotation system should not im- the document, and also to gather the context for
pose one interface metaphor or the other on display alongside the annotation.
users; both should be available.

• No learning curve. Using the annotation 4 Implementation Details


system should not be an imposition on the
user, either by requiring the installation or The Nectar system is implemented as a set of
use of special software (eg a new browser, plugins to the MoinMoin wiki system. The wiki,
plugin, or other software), nor with a clumsy with its emphasis on shared authorship of web
or unusual interface. Using standardized documents, is a solid starting point for develop-
web technologies ensures that users will not ing a collaborative educational courseware sys-
be confused by the interface, and has the tem. In addition, MoinMoin handles many of
added benefit of supporting nearly all users the details of a multi-user online editing envi-
without any modification to their computer ronment, such as user authentication and access
systems. Nectar requires only a CSS- and control. MoinMoin’s modular design also allows
JavaScript-capable web browser, which is the wiki formatting markup to be reused within
a safe assumption on nearly every com- the annotation plugins.

3
Storage Notes are stored on the web server
as XML documents, with one note per file.
MoinMoin has a separate directory structure for
each page of the wiki, in which Nectar creates
a notes/ subdirectory, so notes are stored, as
Figure 1: The note icon indicates the presence of an idea-
well as displayed, contextually. This helps off- level annotation.
set some of the cost of using the filesystem to
store notes, since it is known exactly which set of
notes apply to any given document. Each file has may be unsuitable for large deployments. In par-
a unique filename, generated from the creation ticlar, since each note is stored in its own file,
date, type, and title of the annotation it con- small notes take up more space on disk than they
tains. The filename type marker further defrays otherwise might, since the minimum actual file
the cost of using the filesystem, as notes need not size in most filesystems is the block size (often
be read to determine which type of note it con- four kilobytes). The average note, on the other
tains. The tree structure is a doubly-linked tree, hand, even including the verbose XML wrap-
in which each root and internal note contains per, is usually under one kilobyte. In a rela-
a list of child note filenames, and each internal tional database, the note would only take up as
and leaf note contains the filename of its parent. much space as its contents and metadata (cre-
This makes it possible to recursively reconstruct ation date, type, context region, etc) require,
the entire thread of conversation from any note, and the block size isuse is not encountered since
which would be helpful when an internal or leaf all database records are typically stored in a
note is found as a result of a search. single file. Additionally, searching notes stored
Storing each note as a file makes the procedure in the filesystem would require opening all the
for displaying notes with a document simple (list files and parsing the XML, which is probably
the notes/ directory) rather than complex (cre- significantly slower than search in a relational
ating or dealing with a more robust database database. Implementing acceleration techniques
system). It does not, however, require signifi- (eg indexing note contents) duplicates much of
cant wasted effort to compute note threads, since the effort put into developing database systems.
identifying root nodes requires only listing the Nectar’s storage and interface implementations
directory, rather than reading and parsing the are kept strictly separate, to facilitate adapt-
note files themselves. Once the root note is ing Nectar to use a more robust storage system,
parsed, all the information necessary to create should this need arise.
the next level of the tree is present in that file.
For this reason, it was only more complex, and Rendering During page rendering, all the
not significantly more efficient, to store notes us- root notes for a page are loaded and parsed. For
ing a heirarchy of folders and files to mirror the each idea-level note, an icon is placed in text at
tree structure, rather than storing all notes in a the end of the referenced area, to indicate that
single directory. a note exists. When the user clicks the note
Storing notes on the filesystem as XML carries icon (Figure 1), JavaScript [7] running in the
with it some overhead in space and time which browser modifies the page’s Document Object

4
Figure 2: For idea-level annotations, this box displays
the threaded conversation floating “above” the document
text. The triangle and × icons may be used to collapse
or completely hide the notes, respectively. General anno-
tations are displayed similarly below the document text.
Figure 3: To create new annotations, the user is presented
with this prompt for information. The form for creating
Model (DOM) to “pop up” a box in the same a new general note is similar, but lacks the “Context”
page to display the notes (Figure 2). Page-level display area.
notes, are displayed at the bottom of the page,
and are always present when viewing the page.
dates the note tree data structures, and then re-
Both idea- and page-level notes are displayed
displays the page to the user.
with a collapsable, threaded view, so that the
user may choose which notes and replies to view Detecting the range of text a user selects is ac-
at any given time. complished through a bit of JavaScript and CSS
[14] trickery. At page render time, the follow-
ing snippet of HTML code is inserted into the
Creating Notes To create a note, the user has middle of each word in the document:
several options. To create new page-level notes,
the user fills out a form at the bottom of the
page, prompting for a title and comment about <span class="nw"> nw N </span>
the page. Creating an idea-level note is as sim-
ple as selecting a portion of the document and where N is a running word count in the docu-
hitting the “n” key (for new or note, whichever ment. Ordinarily, all the text in the span, that
is easier to remember). When a user does so, is, the nw N would be displayed, but the CSS
JavaScript again modifies the DOM to pop up a stylesheet loaded for the page disables this dis-
form similar to that of a page-level annotation, play. However, since the markers are part of
which the user may fill out to create a new idea- the page text, the JavaScript getSelection()
level note. The form also displays the text the method used to find what text the user has se-
user selected, for verification (Figure 3). The lected will contian them. Special care is taken
forms are submitted to the webserver, which up- when inserting the invisible markers not to in-

5
validate the XHTML [15] structure of the docu- ment a solution, MoinMoin implements a form of
ment, so that it displays properly in all browsers.
version control similar to that provided by CVS
A regular expression is used to parse out the[8]. In particular, changed portions of the doc-
first and last markers in the selected text, andument can be identified between any two revi-
sions. With this information, it may be possible
these are sent to the server along with the user’s
form submission. Since the markers are inserted to preserve many annotations in changing docu-
into the middle of each word, the first and lastments by updating the context markers accord-
ing to how the document changed. It may also
markers are the word indices of the first and last
be possible, though more complex and expensive,
words, respectively, to be more than half selected
by the user. A little additional parsing is re- to use language processing techniques to relocate
annotations with a high degree of success based
quired to handle single-letter words, but this is
straight-forward and not prone to mistakes. on the contents of the document itself. As a
This hidden marker system is not without fallback, users should be notified when the doc-
ument is changed, as suggested in Cadiz et al., so
costs, though. Since the marker itself is signifi-
cantly longer than the average word length, for that they may update or invalidate their anno-
long documents (where the length of the docu- tations as appropriate. Currently, Nectar makes
ment text outweighs the static overhead of wiki the simplifying assumption that documents do
headers), the hidden markers may add as much not change, even though this is not realistic.
as five to six times more data to transfer. Addi- Another major problem, which seems specific
to Nectar, is the extra overhead of the hid-
tionally, the markers are visible in the document
source, which may be undesirable to some users. den markers required for idea-level annotations.
Unfortunately, this is the only system likely toSome existing systems [4] allow annotations only
work across the diversity of web browsers cur- at predefined intervals, eg the end of each sen-
rently in use. There are several possible solu- tence or paragraph. I believe that word-level
tions to these problems, discussed in detail in granularity or finer is necessary to create a useful
Section 5. To decrease overhead, if a particu- analog to pen-and-paper annotation. Another
lar user does not have permission to annotate a possible solution is to rely on JavaScript to in-
given document (permissions in MoinMoin docu- sert the hidden markers in the plain text after
it is delivered to the browser. However, this re-
ments are set by document editors, in the form of
quires a consistent implementation of regular ex-
access control lists), none of the hidden markers
pressions in all browsers, which has not been the
are sent to the user’s computer, nor does the in-
terface for adding annotations (by highlighting)case in my experience. Finally, the extra over-
appear. head of the hidden markers may become insignif-
icant even in long documents as high bandwidth
internet access continues to expand.
5 Future Work Other features that might be added to Nectar
are different interaction modes with the annota-
The problem of changing underlying documents, tions. In particular, further integration of the
identified earlier by [2, 4, 6], remains to be discussion metaphor with the annotations would
solved. Though Nectar currently does not imple- be ideal. Users should be able to browse anno-

6
tations either through the document annotation mentality in software design. There were some
interface Nectar currently implements, or a “fo- challenges I didn’t see ahead of time, in particu-
rums” view, where annotations are presented as lar, the need for inserting hidden markers in the
a list of conversations about a wiki page, with ap- text. I thought that it was generally possible to
propriate backlinks to the original document. A determine which DOM nodes were selected by
feature commonly found in web forums is search, the user, or in which DOM nodes the selection
which also makes sense for annotations. Both of was, which ought to have been enough to fig-
these features should be straightforward to im- ure out selection from the plain document text.
plement in future versions of Nectar. This stumbling block alone was enough to delay
Nectar by about a week as I struggled first to
find out how it was possible (“it must be pos-
6 Post-Mortem Reflections sible, right?”), and then to figure the best way
around it. There were a few ways to insert the
When I began this project, I wanted to recre- hidden markers, and it took some time to de-
ate an interface similar to Microsoft Word’s [11] cide on the middle-of-the-word strategy. This
“track changes” interface. Unfortunately, the di- seemed to represent the best mix of minimizing
versity of browsers, all implementing different overhead while still allowing flexible and useful
subsets of different interfaces and technologies, annotation.
and none of which are geared toward design- I also found the MoinMoin API a little messy
ing interactive user applications, makes this goal and undocumented, and in particular often got
nearly unattainable. I ended up doing the lion’s frustrated at the “TODO: update this com-
share of the work on the server side, for the ment for 1.3.5” type comments strewn liberally
goal of consistency between browsers and ease throughout the code. I think free and open
of implementation. It is, in many cases, possible source software is a fanstastic idea, and the avail-
to create fully cross-browser JavaScript applica- ability of MoinMoin’s source code made this
tions with advanced functionality, but in most project possible, but I wonder if it is possible in
cases this requires creating a meta-API where such an organically grown project as MoinMoin
each function your application calls is a wrapper to maintain strict standards of coding, testing
which first detects browser capabilities, and then and documentation.
decides how best to go about the task. Develop- Finally, I wish that neither of the above had
ing such a meta-API requires time I did not have been problems so that I could have had time to
this semester, so at this point, Nectar is only tackle what I see as the major advance of Nectar
tested and known to work with Mozilla Firefox among web annotation systems, the “forums” in-
[13] and Apple’s Safari [1]. In future versions, terface I mentioned in Section 3. It has always
I expect that more of the work can be done on been a priority for me, both in this project and in
the client side, easing the load on the server and other applications I have made, not to try to im-
increasing Nectar’s scalability. pose interaction methods on the user, or at least
When comes to the actual code of Nectar to avoid doing so as much as possible. In addi-
itself, I am now beginning to understand the tion to adding interface flexibility, I had hoped
“write it once, throw it away, write it again” that the forums interface would allow users to

7
discover new wiki pages by browsing what was [7] ECMA International. Stanrard
being said about them. It has certainly been ECMA-262: ECMAScript Language
my experience in education that the discussion Reference, December 1999. URL
around and about class readings, for instance, http://www.ecma-international.org/
is both more in-depth and more comprehensible publications/ECMA\ ST/Ecma-262.pdf.
than the primary document; I suspect this is true
for other fields, as well. [8] Free Software Foundation. CVS - Open
Source Version Control. URL http://www.
nongnu.org/cvs/.
References [9] Barbara Froshcauer, Chris Stary, Michael
[1] Apple Computer, Inc. Apple - Mac OS X - Ellmer, Thomas Pilsl, Wolfgang Ortner,
Safari RSS. URL http://www.apple.com/ and Alexandra Totter. Scholion: Scaleable
macosx/features/safari/. technologies for telelearning. In Proceed-
ings of the 2000 ACM symposium on Ap-
[2] C. Bacher, R. Müller, T. Ottmann, and plied computing, volume 1, 2000.
M. Will. Open hypermedia educational en-
[10] Bo Leuf and Ward Cunningham. The Wiki
vironments: A feasible approach to over-
Way: Collaboration and Sharing on the In-
come some difficulties. Technical Report 91,
ternet. Addison-Wesley Professional, April
Freiburg University, 9, 1997.
2001.
[3] Blackboard, Inc. The Blackboard Academic [11] Microsoft Corporation. Microsoft Office
Suite. URL http://www.blackboard.com/ Online Home Page. URL http://office.
products/as. microsoft.com/en-us/default.aspx.

[4] J. J. Cadiz, Anop Gupta, and Jonathan [12] MoinMoin. URL http://moinmoin.
Grudin. Using web annotations for asyn- wikiwikiweb.de/MoinMoin.
chronous collaboration around documents.
In Proceedings of the 2000 ACM conference [13] The Mozilla Corporation. Firefox - Redis-
on Computer supported cooperative work, cover the Web. URL http://www.mozilla.
2000. com/firefox/.

[14] World Wide Web Consortium. Cascading


[5] Laurie Causton. Web-based tools for docu-
Style Sheets, level 2 revision 1 CSS 2.1 Spec-
ment annotation, 1999. URL http://www.
ification, June 2005. URL http://www.w3.
elpub.org/html/tool annot.html. Docu-
org/TR/CSS21/.
ment no longer available, cited in [6].
[15] World Wide Web Consortium. XHTML 2.0,
[6] Ng S. T. Chong and Masao Sakauchi. Cre- May 2005. URL http://www.w3.org/TR/
ating and sharing web notes via a stan- 2005/WD-xhtml2-20050527/.
dard browser. ACM SIGCUE Outlook, 27
(3), September 2001.

Você também pode gostar