# Which JS/Ajax library to use with RoR

**URL:** <https://www.ruby-forum.com/t/which-js-ajax-library-to-use-with-ror/61484>\
**Category:** Rails\
**Created:** [May 24, 2006, 12:12pm UTC](https://www.ruby-forum.com/t/which-js-ajax-library-to-use-with-ror/61484 "2006-05-24T12:12:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![splattael](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@splattael](https://www.ruby-forum.com/u/splattael)\
**Post date:** [May 24, 2006, 12:12pm UTC](https://www.ruby-forum.com/t/which-js-ajax-library-to-use-with-ror/61484/1 "2006-05-24T12:12:12Z")

</div>

Hello,

I am beginning to soak myself into JS/Ajax stuff and I am quite confused  
because of the myriad of AJAX books/frameworks - Its even worse than RoR  
in this sense (i.e. in the case of RoR, half of the people are writing  
books on it, and i believe this value is even higher with AJAX 😉 Of  
course this is not a bad thing, but if a newbie has to choose something  
it can be really hard.  
So my questions:

1. Which book should i buy on AJAX, preferably with as much Ruby/Rails  
examples/orientation as possible. Is the pragmatic book on Ajax OK?
2. Which framework should i use? Prototype seems logical to me because  
also [script.aculo.us](http://script.aculo.us) is using it. Is it OK or do you recommend to use  
something else?

Basically i need the JS/Ajax knowledge to do the following thing from  
Rails:

1. A DB has a lots of rows
2. I want to trigger a code (e.g. by clicking a button) which does  
something with these records. The process is very time consuming, so i  
will use an AJAX request to run it in the background
3. Update the page from where the action was triggered say every 10  
seconds with the partial results

Can you point me to a tutorial which does something like this? Probably  
this is quite basic and i could find something myself, but i would like  
to hear your opinion on the framework etc.

Thx,  
Peter

---

<div class="post-metadata">

**Author:** ![splattael](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@splattael](https://www.ruby-forum.com/u/splattael)\
**Post date:** [May 24, 2006, 2:41pm UTC](https://www.ruby-forum.com/t/which-js-ajax-library-to-use-with-ror/61484/2 "2006-05-24T14:41:54Z")

</div>

I think Rails uses Prototype and [script.aculo.us](http://script.aculo.us)…  
I think the helpers and RJS tenplates do most the writing for you?

---

<div class="post-metadata">

**Author:** ![splattael](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@splattael](https://www.ruby-forum.com/u/splattael)\
**Post date:** [May 24, 2006, 8:10pm UTC](https://www.ruby-forum.com/t/which-js-ajax-library-to-use-with-ror/61484/3 "2006-05-24T20:10:20Z")

</div>

JSON in JavaScript: [http://www.json.org/js.html](http://www.json.org/js.html)

JSON in Ruby: [http://rubyforge.org/snippet/detail.php?type=snippet&id=29](http://rubyforge.org/snippet/detail.php?type=snippet&id=29)
