[thelist] XML fragment into DOM
Jeff Howden
jeff at jeffhowden.com
Thu Jul 14 00:04:47 CDT 2005
Matt,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Matt Warden [mailto:mwarden at gmail.com]
>
> > Please tell me that you didn't try to write the script
> > for doing the XMLHTTPRequest yourself. I say this
> > because there are several very good libraries out
> > there that already abstract the browser differences
> > for you.
>
> The browser differences aren't a problem. This function,
> which is available on 13048901892308123 different sites,
> takes care of it:
>
> [snip]
>
> Now, you are correct that libraries abstract this, but
> who cares? What they *should* and *don't* abstract is
> the details of dealing with the XMLHttpRequest object
> itself. Or, at least, I have yet to come across
> one that does.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
I was specifically referring to the whole package, not just the XHR itself.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > [...] Purists will gag reading that and suggest that
> > you loop over the structure of the fragment inserting
> > the various pieces using calls to the createElement()
> > and appendChild() methods of the document object.
>
> Yes, "purists" will gag at the use of innerHTML, but
> it's more because of the mixing of data and
> presentation than any sadistic desire to see people
> using DOM functions for everything.
>
> The purist might also point out that you are obviously
> fully aware of the benefits of abstraction, but
> somehow disregard it for this purpose.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
Actually, I purposely did not identify myself as a purist or non-purist. I
was simply breaking out the options available.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > Neuromancer is a *very* robust XHR library.
>
> I had not seen this before. I only looked at it briefly,
> but it looks like it might encapsulate the use of XHR
> pretty well.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
Yes. That was the sort of library I was referring to in my comment above
about libraries.
[>] Jeff Howden
jeff at jeffhowden.com
http://jeffhowden.com/
More information about the thelist
mailing list