AJAX without server scripts?

P

Platonistos

Greetings, all,

I have been developing with HTML and the XML suite (which I am still,
still learning: there is a lot to XML!) for some time now. My
ultimate goal is to be able to make web-based apps using AJAX
technology, but it is a level of complexity seemingly quite far above
the more-or-less simple DHTML I am used to.

My question is this: every instruction in AJAX I have seen seems to
imply that server-side scripting (i.e. PHP) is required for AJAX
applications to work. My question is, is it at all possible to do
AJAX-style operations (i.e. using JavaScript embedded in an XSLT
stylesheet) without having to learn server-scripting - or, if I want
AJAX, do I need to know server-scripting first?

If it *is* possible to do AJAX-style things without server-scripting,
what is the "trick" to it?

Thanks in advance for any info,

CMZ
 
H

Harlan Messinger

Platonistos said:
My question is this: every instruction in AJAX I have seen seems to
imply that server-side scripting (i.e. PHP) is required for AJAX
applications to work. My question is, is it at all possible to do
AJAX-style operations (i.e. using JavaScript embedded in an XSLT
stylesheet) without having to learn server-scripting - or, if I want
AJAX, do I need to know server-scripting first?

If it *is* possible to do AJAX-style things without server-scripting,
what is the "trick" to it?

The whole point of Ajax is to facilitate creation of pages that interact
with the server. If there isn't any code on the server to interact with,
what are you expecting to use Ajax for?
 
S

Steve Pugh

Platonistos said:
I have been developing with HTML and the XML suite (which I am still,
still learning: there is a lot to XML!) for some time now. My
ultimate goal is to be able to make web-based apps using AJAX
technology, but it is a level of complexity seemingly quite far above
the more-or-less simple DHTML I am used to.

My question is this: every instruction in AJAX I have seen seems to
imply that server-side scripting (i.e. PHP) is required for AJAX
applications to work. My question is, is it at all possible to do
AJAX-style operations (i.e. using JavaScript embedded in an XSLT
stylesheet) without having to learn server-scripting - or, if I want
AJAX, do I need to know server-scripting first?

If it *is* possible to do AJAX-style things without server-scripting,
what is the "trick" to it?

There's no trick at all. All AJAX does is make a normal HTTP request
to the server and act on the response. The server can respond with a
static resource or a dynamic one, the JavaScript at the browser end
will never know the difference.

However, there are probably very few actual cases where this would
really be useful, but as a learning exercise to familiarise yourself
with the JavaScript end of the AJAX, give it a try.

Steve
 
A

Andy Dingley

If it *is* possible to do AJAX-style things without server-scripting,
what is the "trick" to it?

It's certainly possible, and there's no trick to it at all.

The core of AJAX (without which it stops being AJAX) is that some
client-side JavaScript code loads some content up by a separate HTTP
transaction and does something with it. No more than that. The dynamic
on-the-fly web service SOAP-queriers are nice, but you can still start
small.

As an example, consider an RSS newsfeed display. The HTML host page
loads and then it once loads the RSS from elsewhere, renders it with
XSLT and places it into a <div>. It simply doesn't care and can't
actually tell if the RSS document it receives came from a static file
or was dynamically generated -- it just requests a URL and receives a
document in response. For many first-use RSS feeds, for caching
reasons, the document is a static file re-generated periodically by a
cron job. For filtered or aggregated RSS, it's probably a dynamic
database query. The AJAX consumer simply can't tell though.
 
P

Platonistos

It's certainly possible, and there's no trick to it at all.

The core of AJAX (without which it stops being AJAX) is that some
client-side JavaScript code loads some content up by a separate HTTP
transaction and does something with it. No more than that. The dynamic
on-the-fly web service SOAP-queriers are nice, but you can still start
small.

As an example, consider an RSS newsfeed display. The HTML host page
loads and then it once loads the RSS from elsewhere, renders it with
XSLT and places it into a <div>. It simply doesn't care and can't
actually tell if the RSS document it receives came from a static file
or was dynamically generated -- it just requests a URL and receives a
document in response. For many first-use RSS feeds, for caching
reasons, the document is a static file re-generated periodically by a
cron job. For filtered or aggregated RSS, it's probably a dynamic
database query. The AJAX consumer simply can't tell though.

Thank you very much to all responders - that's just what I wanted to
know. :) I'll keep working at the stuff; hopefully, it'll be under
my fingers before too long. It seems like I'm going to have to take
the bloody plunge and learn ASP or PHP if I want to get much further
in, anyway.

Now - can anyone explain why Mozilla won't format tables that mix
ASCII and Unicode-Hebrew correctly; or, even better, how to get
Mozilla to format mixed ASCII and UniHebrew tables correctly? :)
Problem has been buggering me for a week now. Bugger.

CMZ
 
B

Ben C

On 2007-02-26 said:
Now - can anyone explain why Mozilla won't format tables that mix
ASCII and Unicode-Hebrew correctly; or, even better, how to get
Mozilla to format mixed ASCII and UniHebrew tables correctly? :)
Problem has been buggering me for a week now. Bugger.

Post a url.
 

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,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top