• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Integrating Rails with client side technologies

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
author
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic