Re: Anybody for a server-DOM spec -> transferring nodes and listener model.

Claude Zervas wrote:
> I guess either next/previousSibling or NodelList.item() can be
> efficient but usually not both.

Certainly the underlying representation may bias this one way or the other.

> The best way to solve this would be to introduce iterators.

As far as I can tell, that doesn't solve the efficiency challenge, it just
moves it out of the Node class. You still wind up implementing the same
logic. Having an iterator object may make caching some state information
easier, though, especially in a multithreaded environment, and may reduce
how much code you have to actually load into an application.

I'm not against the idea of mixing implementations. But the only way I see
to do it is to define new parts of the API to support it, which means
either figuring out exactly what's needed and trying to incorporate that
into Level 2 or writing a DOM superset which adds this. Either way, because
Level 1 _doesn't_ have the hooks to support it, you don't have complete
freedom to mix any two arbitrary DOMs.

And I still think mixability and server are separable issues. In fact, a
mixable-server is going to need code that can talk to other servers, which
is probably application-level (well, server-level) code rather than DOM
code.

______________________________________
Joe Kesselman  / IBM Research
Unless stated otherwise, all opinions are solely those of the author.

Received on Wednesday, 19 August 1998 09:09:34 UTC