Thursday, May 3rd, 2007
DomAXh: Ajax for Dommies
"Ajax for Dommies". That is nice and corny. DomAXh is a simple Ajax library that allows you to kick off requests to xhtml data and have it placed into your document.
The homepage itself has arrows that flip through content:
-
-
function substituteContent(obj, url){
-
obj.showResponseContent= function(originalRequest){
-
// This is the actual call to the dom translator..
-
domaxh(originalRequest,this); // Here is where the magic happens
-
}
-
// Ajax request using prototype.js
-
obj.myAjax = new Ajax.Request(
-
url, {
-
method: 'get', onComplete: obj.showResponseContent.bind(obj)
-
});
-
}
-













Quote from their site: “Actually its revolutionary, and it will probably be one of the most important scripts that will allow the masses to add Web 2.0 behaviour to their web sites and applications. Why? Because it lets you write your ajax responses in plain valid (X)HTML, including css and javascript inclusions, imbedded scripts, images, etc.”
Dudes… it’s not revolutionary, it’s called the AHAH pattern (http://ajaxpatterns.org/HTML_Response), and you didn’t invent it. Yay, good… you’re on to something past traditional AJAX… so are others :-)
To DomAxh authors: Please don’t take this comment the wrong way. I’m sure your stuff is good, but please try to refrain from silly comments like the one I pulled from your site above.
The key, I think, is that they are presenting an alternative to innerHTML. Anyone know a way to implement AHAH without using innerHTML? Does it work in MSIE with imbedded scripts? stylesheets? .css and .js files? That is the niche that they seem to try to be filling
From Wikipedia (http://en.wikipedia.org/wiki/AHAH): “Like Ajax, the XMLHTTP functionality is used [...] but rather inserts the response directly into the intended target element of the document using the non-standard innerHTML attribute of elements.” So basically i get that it implements the AHAH model but without using innerHTML.
This is using innerHTML as everybody else when it’s needed. line 131
if(texto!=undefined&&texto!=null){nuevoElm.innerHTML=texto;}
The fact that it’s on ajaxian and have silly “marketing” comments on the website doesn’t make it revolutionary at all.
And imo this is not a really efficient code, example line 39 to 45
if(data.getElementsByTagName(”script”).length > 0){
for (i = 0; i
I’ve given up dissing things because they’ve been done before. Good on you guys, its worth reporting these things.
Taconite is similar in concept to this library except that it is much more powerful and more mature.
http://taconite.sf.net/
I was coming here to say Taconite is already the best XHR library available. Ryan beat me to it. :D