An Ajax Dictionary... My first AJAX project...

D

Dylan Parry

Pondering the eternal question of "Hobnobs or Rich Tea?",
(e-mail address removed) finally proclaimed:
Take a second to check it out & let me know what you think.

Works fine from here. I only took a very quick look at it, but I liked
the way that it worked! Nice and fast, and the results that popped up
predicted what I was looking for pretty well.
 
A

Alan J. Flavell

Same here, could not be found

$ host www.dictionary.sc
Host www.dictionary.sc not found: 3(NXDOMAIN)

$ host dictionary.sc
dictionary.sc has address 65.98.89.115

Seems pretty clear to me (or rather, to our DNS servers).

Some client agents might obfuscate the situation by adding or
taking-away "www.", if their first try got nowhere.
 
J

Julien CROUZET

Alan J. Flavell a formulé la demande :
$ host www.dictionary.sc
Host www.dictionary.sc not found: 3(NXDOMAIN)

$ host dictionary.sc
dictionary.sc has address 65.98.89.115

Seems pretty clear to me (or rather, to our DNS servers).

Some client agents might obfuscate the situation by adding or
taking-away "www.", if their first try got nowhere.

Probably just a refresh delay :

$ host www.dictionary.sc
www.dictionary.sc CNAME dictionary.sc
dictionary.sc A 65.98.89.115
 
J

Jonathan N. Little

Julien said:
Alan J. Flavell a formulé la demande :



Probably just a refresh delay :

$ host www.dictionary.sc
www.dictionary.sc CNAME dictionary.sc
dictionary.sc A 65.98.89.115

Well from here I get:

# host www.dictionary.sc
Host www.dictionary.sc not found: 3(NXDOMAIN)

65.98.89.115 in a browser gets me to a single page that reads:

"Secure Onlines

"Welcome, This is A Secure Area.

Access Denied

Any question you can email (e-mail address removed)"
 
D

Disco Octopus

Jose said:
Cool. But AJAX isn't in it.

Oh, the irony!

Jose

Ye. It looks to me like just plain old javascript doing some stuff to an
innerHTML.

I thought that AJAX was something different to that.
 
D

Dylan Parry

Pondering the eternal question of "Hobnobs or Rich Tea?", Disco Octopus
finally proclaimed:
Ye. It looks to me like just plain old javascript doing some stuff to an
innerHTML.

How else would you update the page with the new results? Google et al
use nothing different in their own AJAX apps.
I thought that AJAX was something different to that.

The specific part of the code that tells you it's AJAX is:

//Gets the browser specific XmlHttpRequest Object
function getXmlHttpRequestObject() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else if(window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
} else {
alert("Your Browser Sucks!\nIt's about time to upgrade don't you
think?");
}
}

The rest of the code will handle the sending and receiving of requests,
and the updating of the page with plain old Javascript.
 
J

Julien CROUZET

Dylan Parry a pensé très fort :
Pondering the eternal question of "Hobnobs or Rich Tea?", Disco Octopus
finally proclaimed:


How else would you update the page with the new results? Google et al
use nothing different in their own AJAX apps.

Well, "AJAX" is just some wind. All discussions are about the "X"
for XML in AJAX. Technically this :

* Can be AJAX as it use XmlHttpRequest and it's supposed to fetch some
XML (or kinda badly formed HTML etc)
* Is not really "elites AJAX" as it just update some innerHTML, and
not some SOAP or some "fashion frameworks".

I juste see an inconvenient on the bandwith use as ALL the HTML is sent
on every search, but i found it cool and fast.

Nice work.
 
A

Andy Dingley

How else would you update the page with the new results? Google et al
use nothing different in their own AJAX apps.

The honourable cephalod is quite right. ".innerHTML" has no part in
well-written AJAX work. It's flakey, it's slow and it's going to get
even more so as we drag slowly towards XML processing on the client
side.

AJAX is (or should) be about manipulation of the client browser's DOM,
i.e. the Object Model of the page, as it's in use by the browser and
long fter it has been rendered from the HTML document. Although it's
admittedly easy to work with innerHTML and insert some HTML fragments
into it that way, these need to be parsed by the browser before being
inserted into the DOM. If your AJAX is building long navigation browse
lists on th efly, then this speed difference can be appreciable.

For XML documents it's even worse, as innerHTML may force the browser to
flip from an XML DOM into a HTML representation (it might swap back
again later, if possible). Using innerHTML is _really_ incompatible
with trying to work in an XML style.


There's no hard and fast spec for AJAX, so its hard to say just what is
and what isn't. But using .innerHTML is shoddy coding and I certainly
don't permit it for new work.

The difference between AJAX and the asynchronous JavaScript and
XMLHTTPRequest work that was going on back in '99 is that AJAX
represents a set of well thought out good practice for how to build
apps. .innerHTML is one of the possibilities that was rejected through
this tidying up process.
 
J

Julien CROUZET

Le 18/02/2006, Andy Dingley a supposé :
The honourable cephalod is quite right. ".innerHTML" has no part in
well-written AJAX work. It's flakey, it's slow and it's going to get
even more so as we drag slowly towards XML processing on the client
side.

AJAX is (or should) be about manipulation of the client browser's DOM,
i.e. the Object Model of the page, as it's in use by the browser and
long fter it has been rendered from the HTML document. Although it's
admittedly easy to work with innerHTML and insert some HTML fragments
into it that way, these need to be parsed by the browser before being
inserted into the DOM. If your AJAX is building long navigation browse
lists on th efly, then this speed difference can be appreciable.

For XML documents it's even worse, as innerHTML may force the browser to
flip from an XML DOM into a HTML representation (it might swap back
again later, if possible). Using innerHTML is _really_ incompatible
with trying to work in an XML style.



There's no hard and fast spec for AJAX, so its hard to say just what is
and what isn't. But using .innerHTML is shoddy coding and I certainly
don't permit it for new work.

The difference between AJAX and the asynchronous JavaScript and
XMLHTTPRequest work that was going on back in '99 is that AJAX
represents a set of well thought out good practice for how to build
apps. .innerHTML is one of the possibilities that was rejected through
this tidying up process.

That's true for a big, full AJAX based application, but I'm not sure
that using a > 200ko framework for such a tiny application is such a
good idea.

Just my two cents.
 
A

Andy Dingley

That's true for a big, full AJAX based application, but I'm not sure
that using a > 200ko framework for such a tiny application is such a
good idea.

What's a "framework" ? AJAX is _not_ a "framework", in the sense that
the term is normally used in the heavyweight Java world. You might well
have a point that such frameworks are inappropriate for simple apps, but
that's not what AJAX is advocating anyway.

Secondly, bad code is bad code. Doing it wrongly in a small app is no
more excusable than doing it wrongly in a large app. The two axes are
unrelated.
 
A

Aaron Gray

Hello...

Hi
Just wondering what you guys think of my first AJAX project...

http://www.dictionary.sc/

Take a second to check it out & let me know what you think.

Its a bit nondeterminate.

It seems to get words after a while of typing them in a number of times ?

Are you reading from anothre source on the web ?

God though.

Aaron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top