[Javascript] DOM vs AJAX

Matt Warden mwarden at gmail.com
Tue Jun 20 04:03:45 CDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Borchers wrote:
> with DOM i'd have to really create every element,
> but with AJAX i would simply store the elements in a seperate file
> and then import it into a <div>.

You are injecting serialized representations of elements into an already
unserialized document tree.

> seems much easier ans quicker to me.

It is quicker (for now). And it is easier for someone who already knows
(X)HTML.

> any disadvantages?

Higher maintainability costs. Less standardization in working with
documents (you use innerHTML for (X)HTML documents, but must use DOM for
others).

Those are the ones I like, but no innerHTML-lover ever seems to buy them.

For everyone else, I point them here:

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/innerhtml.asp
http://msdn.microsoft.com/workshop/author/tables/buildtables.asp

If it feels dirty, it probably is.

- --
Matt Warden
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEl7nxrI3LObhzHRMRAlFDAJoCQUhH2XrnKva0AmX8UF5OU3uFdQCgl42P
gCfEkhkmqLbMfKi6n8swrRk=
=9Qso
-----END PGP SIGNATURE-----



More information about the Javascript mailing list