143
tweenlooselycollaboratingindividuals.Thearchitectureproposedhereallowsthepatternof
communicationtobeabstractedawayandmanagedseparatelyfrommanydetailsofcommu-
nicationmediumandprotocol.
7.2 Theapplicationinterface
ThemostbasicinterfacebetweenanapplicationandaPalimpsestdatastorewouldbethe
setofmethodspresentedinFigure7.2.Thatinterfacenotonlyprovidesalotofdetail,butit
assumesthattheapplicationisbuildingitsdisplaysdirectlyfromthePalimpsestdatastruc-
tures.Whilethatisavalidoption,inmanysituationsitisnotthemostconvenientoption.
Norisitnecessarilythemostefficientoption.Thereasonisthatmostuserinterfacetoolkits
alreadyhavehighlydevelopedinteractivetext-editingmodules.Thesemodulesarenotal-
waysthemostfull-featuredinteractiveeditorsavailableonaplatform;generallyspecialized
toolslikeprogrammingeditorsandwordprocessingpackagesoccupythisniche.Theiruse
usuallyprovidesasignificantsavingsinapplicationdevelopmenttime(becauseevenbad
text-editorstakealotofworktowrite),andtheyoftenincludespecializedperformancefea-
turesthatmaybehardtoduplicate.
Finally,itisoftendesirabletointegratecollaborationfeaturesintoexistingprograms
thatalreadyhaveeditinginterfacesclearlydefined.Thecaseforextendingexistingapplica-
tionsratherthanbuildingnewoneshasbeenstronglyadvocatedintheOpenHypermedia
systemscommunity(Nürnberg,Leggettetal.1998;GrønbækandTrigg1999(forthcoming)).
Therelatednotionofcollaborationtransparency(LauwersandLantz1990)alsohasalong
history.Thearchitecturepresentedhereisnottryingtosolvetheproblemofproviding
usefulcollaborationusingunmodifiedapplications.Indeed,collaborationsupportthatallows
fordivergenceandprovidesmethodstorepairdivergentstatesisprobablyincompatiblewith
theuseofunmodifiedapplicationsthatarenotalsopowerfulprogrammingenvironments
(liketheEmacseditor).
144
Forthesereasons,thesimplestinterfacetoaPalimpseststore,andpossiblythebest
performingone,isaninterfacethatwillfacilitatethemanagementofanindependently
maintainedscreenbuffer.Generally,itiseasytogetaccesstofine-grainededitingevents
frommanyapplications,andmost“ready-made”textwidgets.
ThetwoprototypeVTMLeditorsthatIhavebuiltfollowedthisstrategywithsomesuc-
cess.Theinterfacetotheback-endprocess(whetherdirectorviaHTTP)operatedintermsof
characteroffsetsinthedisplaybuffer.Theeditingeventinformationrequiredtodrivethis
processwasrelativelyeasilyaccessibleinbothenvironments(Javatexteditingandthe
MacintoshOS).
insert(version,dest,string)
delete(version,start,end)
move(version,start,end,dest)
copy(version,start,end,dest)
registerNotifier(version,notifier)
Notifer.insert(version,dest,string)
Notifer.delete(version,start,end)
ChangeListgetChanges()
undo(Changechange)
redo(Changechange)
versiongetVersionHandle()
BuffergetContents(version)
F F F F iii ig g g gu u u ur r r re e e e 7777....3333:::: FFFFuuuunnnnccccttttiiiioooonnnnssss ffffoooorrrr mmmmaaaannnnaaaaggggiiiinnnngggg aaaa ppppaaaarrrraaaalllllllleeeellll bbbbuuuuffffffffeeeerrrr
ThefunctionsinFigure7.3alltakeaversionparameter:thisisauniquetokenrepre-
sentingaspecificstateoftheeditorbuffer.Theapplicationisresponsibleforpassingediting
eventstothePalimpsestimplementationusingthefirstfourmethods.Whenexternal
changesarrivefromcollaborators,theadjustmentstothestateofthedocumentarepre-
sentedtotheapplication’snotifierintheformofinsertionanddeletionevents.Thesame
mechanismisusedtoreflectbufferstatechangestotheapplicationwhenoperationssuchas
undoorredoareexecutedandcausethebufferstatetochange.Theversionandchange
Previous Page Next Page