[OpenLayers-Dev] Fwd: [OpenLayers-Trac] [OpenLayers] #1170: Ajax handler update

Christopher Schmidt crschmidt at metacarta.com
Tue Nov 27 14:09:03 EST 2007

On Tue, Nov 27, 2007 at 11:59:02AM -0700, Tim Schaub wrote:
> Hmm.  I'm a bit turned off by the prototype.js ajax stuff.  I'm more 
> interested in things like http://code.google.com/p/xmlhttprequest/.  Now 
> I know that is pretty bare bones, but I'd rather start with a uniform 
> XHR interface and add a few utility methods around it.

We're not talking about going with some new code, we're talking about
updating our code to line up with bugfixes from upstream. We've already
seen at least two cases where fixes upstream caused bugs because we
didn't pull them down into our code. While I appreciate the desire to
ditch Prototype's Ajax stuff -- and I'm totally in favor when we get to
3.0 -- For now, we should maintain API compatibility for our Ajax stuff.
I've got a lot of old code that I'm not going to go around and update,
and the last thing I want at the moment is *two* different methods of
requesting stuff from the server.

> Anyway, I know that doesn't really represent an opinion on your 
> suggestion - but if any work is going to be done on the XHR stuff, I 
> would like to see the result be something far simpler than what we've 
> currently got.

This isn't about 'doing work' -- this is about cleaning up the code
we've already got to match changes that have been made upstream. 

> If others really like the ajax stuff from prototype.js, then I'd suggest 
> we take it wholesale - instead of trying to write a matching set of 
> functionality in our namespace and keep up with their changes.

It's too late to go this route: We've already decided to write a
matching set of functionality in our namespace and keep up with their
changes. (Unless you're saying that we should discourage users from
using OpenLayers.Ajax, and treat it as internal-only, and hten only fix
bugs when they affect library functions. Which might be the right way to

> A nice 
> small utility library around XHR would be pretty handy.

But not API compatible with the existing OpenLayers.Ajax code. 

Christopher Schmidt

More information about the Dev mailing list