# Really Simple Ruby AJAX tutorial

**URL:** <https://www.ruby-forum.com/t/really-simple-ruby-ajax-tutorial/81958>\
**Category:** Ruby\
**Created:** [January 16, 2007, 3:24pm UTC](https://www.ruby-forum.com/t/really-simple-ruby-ajax-tutorial/81958 "2007-01-16T15:24:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [January 16, 2007, 3:24pm UTC](https://www.ruby-forum.com/t/really-simple-ruby-ajax-tutorial/81958/1 "2007-01-16T15:24:59Z")

</div>

Hi,

I’m looking for a _really_ simple AJAX tutuorial that covers the basic  
mechanics. I’m imagining something that only needs the standard Ruby  
libraries (rather than needing additional gems: Rails / Nitro / etc).  
Anyone know of such a document?

Thanks,  
Benjohn

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [January 16, 2007, 3:39pm UTC](https://www.ruby-forum.com/t/really-simple-ruby-ajax-tutorial/81958/2 "2007-01-16T15:39:06Z")

</div>

On 1/16/07, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> I’m looking for a _really_ simple AJAX tutuorial that covers the basic  
> mechanics. I’m imagining something that only needs the standard Ruby  
> libraries (rather than needing additional gems: Rails / Nitro / etc).  
> Anyone know of such a document?
> 
> Thanks,  
> Benjohn

Um, well if you want simple Ajax you really will only be using  
javascript. The server side piece doesn’t matter, it just returns  
data, so you can do that with any backend language.

There are thousands of simple ajax tutorials, but MDC usually is  
pretty good: [Ajax - Developer guides | MDN](http://developer.mozilla.org/en/docs/AJAX:Getting_Started)

- Rob

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [January 16, 2007, 3:47pm UTC](https://www.ruby-forum.com/t/really-simple-ruby-ajax-tutorial/81958/3 "2007-01-16T15:47:08Z")

</div>

> > Benjohn
> 
> Um, well if you want simple Ajax you really will only be using  
> javascript. The server side piece doesn’t matter, it just returns  
> data, so you can do that with any backend language.

I guess I’m hoping for an example of specifically how to build the  
server side in Ruby, but perhaps I’ll be able to work that out from the  
link you gave me.

> There are thousands of simple ajax tutorials, but MDC usually is  
> pretty good: [Ajax - Developer guides | MDN](http://developer.mozilla.org/en/docs/AJAX:Getting_Started)

That one does look good 🙂 Thank you.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [January 16, 2007, 3:52pm UTC](https://www.ruby-forum.com/t/really-simple-ruby-ajax-tutorial/81958/4 "2007-01-16T15:52:09Z")

</div>

> I guess I’m hoping for an example of specifically how to build the  
> server side in Ruby, but perhaps I’ll be able to work that out from the  
> link you gave me.

Yeah, any of the docs on the CGI library should be enough, check out  
the Pickaxe or the online reference. All you really need is to do a  
“Time.now” or something similar on the server so you can verify that  
your script is loading the content dynamically.

Have fun,  
Rob

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [January 17, 2007, 7:46am UTC](https://www.ruby-forum.com/t/really-simple-ruby-ajax-tutorial/81958/5 "2007-01-17T07:46:13Z")

</div>

On 16/01/07, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,

Hi there.

> I’m looking for a _really_ simple AJAX tutuorial that covers the basic  
> mechanics. I’m imagining something that only needs the standard Ruby  
> libraries (rather than needing additional gems: Rails / Nitro / etc).  
> Anyone know of such a document?

I recently found the article entitled “Build Ajax into your Web apps  
with Rails” on IBM’s DeveloperWorks. Maybe that is what you are after.  
The URL is:

[http://www-128.ibm.com/developerworks/xml/library/x-introajaxrails/?ca=dgr-lnxw97Rails-Ajax](http://www-128.ibm.com/developerworks/xml/library/x-introajaxrails/?ca=dgr-lnxw97Rails-Ajax)

– Nobby

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [January 17, 2007, 10:17pm UTC](https://www.ruby-forum.com/t/really-simple-ruby-ajax-tutorial/81958/6 "2007-01-17T22:17:38Z")

</div>

> I’m looking for a _really_ simple AJAX tutuorial that covers the basic  
> mechanics. I’m imagining something that only needs the standard Ruby  
> libraries (rather than needing additional gems: Rails / Nitro / etc).  
> Anyone know of such a document?

I think what you’re looking for not only doesn’t exist but can’t  
exist. Doing Ajax by hand in any language is guaranteed to be less  
simple than using existing libraries for it. You have to learn the ins  
and outs of browser inconsistencies in JavaScript implementations.

Additionally, Ruby has nothing to do with Ajax, Ajax is driven by  
JavaScript. If you’re looking for a simple guide to hacking Ajax apps  
by hand, that’s like a simple guide to graphing fractals by hand. It’s  
a contradiction in terms. If you want something focused on the server  
side, there’s virtually no difference from the server’s point of view  
between an Ajax app and a regular app; all the difference in an Ajax  
app is on the client side.

I think you **either** want something very simple **or** focused on  
the basic mechanics.
