This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Integrating Rails with client side technologies

 
jayan muralidharan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've new to ruby and rails. This could be an absurd question. Still, let me ask. How easy is it to integrate javascript toolkits like scriptaculous, dojo, mochikit with rails?

[Edit to provide a meaningful topic - Dave]
[ January 29, 2007: Message edited by: David O'Meara ]
 
Vivek S. kumar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well a lot of features and functionality is provided for the integrations with rails. you can pick up resources from net and can do a start.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jayan muralidharan:
I've new to ruby and rails. This could be an absurd question. Still, let me ask. How easy is it to integrate javascript toolkits like scriptaculous, dojo, mochikit with rails?

At least Dojo is a pure JavaScript frameworks (as opposed to JavaScript plus a server-side backend in Java/PHP/etc.), which makes "integrating" it a matter of including the appropriate <script src="..."/> tag in your HTML template--and then using the library.

Scriptaculous and Prototype are, by the way, included in the Rails distribution itself so no need to explicitly integrate them...
 
Justin Gehtland
author
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As the previous poster pointed out, Prototype and Script.aculo.us are distributed as part of Rails. In addition, Rails itself has helpers to make them easier to integrate. If you wanted to create a hyperlink which, when clicked, executes an Ajax call instead of redirecting the user, you can simply do this in your view:



There are Rails helpers for most of the Prototype and Script.aculo.us features.

Other pure JavaScript toolkits, like Rico, Mochikit, Dojo, jQuery, etc., are easily inluded into your projects, but there are not built-in helpers libraries for them. However, helpers are not hard to write, and I wouldn't be surprised to see that people have already distributed some helpers for some other toolkits. If you are comfortable writing JavaScript directly, though, just include the libraries into your app and have at it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic