incubator-wave-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pratik Paranjape <>
Subject Re: editor handling events vs tracking DOM changes
Date Thu, 10 May 2012 21:44:07 GMT
I am sure someone will correct me if I am wrong...

The editor does not handle all user events.The use a hybrid model.

There are things that are taken out by watching changes in DOM (e.g.
typing, pasting..).
Extractors are used for Typing Extractor. These changes are
then applied to
underlying XML model, in turn used to calculate operations.

Other things are handled before broswer does, like hitting Enter, bullets
XML model is modified first in this case then rendered to HTML in DOM.

There is also a third case, like in pasting. Browser is allowed to paste
somewhere off screen,
paste is observed , XML model is modified, then DOM is updated.

It seems it has more to do with flexibility of allowing such Rich Text
than performance improvements for OT. Etherpad was plain text (adding rich
text slowly now?)
and prolly did not care of this level of control on how contents are

More here:

On Fri, May 11, 2012 at 2:23 AM, Paulo Pires <> wrote:

> As far as I can tell, and if I'm not misunderstanding your question, a
> local local operation happens immediately, following the intent of
> having an "Optimistic UI", as Google called it. Only remote operations
> are transformed and then redrawn.
> Could it be that Etherpad has no such distinction?
> Btw, have you read the Operational Transform (OT) whitepaper?
> Cheers,
> PP
> On 10/05/12 21:21, Dylan Dandelion wrote:
> > If I understand correctly, the Wave editor handles user events and
> > processes them to generate operations, which are then applied to the
> > document result in the visual rendering of the operation.
> >
> > This approach is different from Etherpad, which finds DOM nodes that have
> > changed at regular intervals, and then generates operations, sanitizes
> the
> > input and redraws the actual DOM.
> >
> > What are some of the advantages and disadvantages of the event-driven
> > approach versus the diff-ing approach? Why did Wave choose to implement
> the
> > editor using the event-driven approach?
> >
> --
> Paulo Pires

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message