Re: Web application
- From: K Livingston <kevinlivingston.public@xxxxxxxxx>
- Date: Thu, 10 Jan 2008 17:16:29 -0800 (PST)
On Jan 10, 2:43 pm, Pascal Costanza <p...@xxxxxxxxx> wrote:
However, what I need is a way to trigger updates of a web page from the
server side, so that it can reflect state changes. I guess I need
something like Ajax for that, or so.
Can somebody recommend what libraries are good for that, and share some
experiences wrt things to watch out for? Also comments on what to avoid
would be useful.
With anything AJAX a library (for the client) is pretty much a must
(unless you like fiddling with little pieces of minutia in
javascript), because there's a fair amount of boilerplate needed for
just one request, and for added fun, the boilerplate changes slightly
from browser to browser.
There are several good ones out there, but right now I am really happy
with <a href="http://jquery.com/">jQuery</a>. jQuery makes
javascripting so much easier, and the plug-in model for functionality
is very nice. jQuery does Ajax out of the box, and can support most
of what you need, and can get as simple as this:
<a href="http://docs.jquery.com/Ajax/load#urldatacallback">Ajax/load</
a> the example there shows one line of code which will find the DOM
element with the ID "links", make an Ajax request to get new content
from the server, and put it in that DOM element.
Any good library should give you something close, but this seems to me
to be the simplest and also a well supported way to go.
I've even tried rolling my own Ajax code, a while ago, before I knew
about jQuery. And jQuery has all the features I thought I wanted,
simpler, and tons of support testing across browsers etc.
That may or may not have been a tangent, because the question was also
about lisp libraries for supporting this kind of thing. I don't have
any experience with lisp libraries for writing javascript or
simplifying the Ajax. For the kind of Ajax I do, I don't really see
the need. I use Allegroserve to produce my pages, and write the (what
little) javascript I need right into them. Although, I am finding the
escaping of quotes and things, along with formatting to be a bit of a
pain, so I might (very soon) start exploring some alternatives, like
ParenScript. Or just make a reader macro to escape all my quotes for
me -- although that won't help with the formatting in emacs.
.
- Follow-Ups:
- Re: Web application
- From: Robert Uhl
- Re: Web application
- References:
- Web application
- From: Pascal Costanza
- Web application
- Prev by Date: Re: Web application
- Next by Date: Re: Lisp and Scheme with fewer parentheses / Mathematica??
- Previous by thread: Re: Web application
- Next by thread: Re: Web application
- Index(es):
Relevant Pages
|
Loading