The One-Two Punch: jQuery with Rails

Yehuda Katz (Tilde Inc)
11:35 Wednesday, 3-09-2008
General
Location: Saal Maritim B
Average rating: ***..
(3.31, 35 ratings)

What do Google, AOL, Amazon, Slashdot, Digg, and Technorati all have in common?

That they’re extremely popular websites?

Well that too. They also all use the jQuery JavaScript library.

They’re using it, and so are many Rails developers, because it helps both new and seasoned developers throw together rich-media applications in much the same way that Rails helps build server-side applications.

In recent versions, jQuery has added features that allow it to communicate directly with Rails in the same way that the built-in Prototype library does.

Because JavaScript developers spent most of their time writing DOM code, jQuery focuses on making DOM traversal and manipulation easy, having pioneered the search-by-CSS-selector technique that is now cropping up all over the JS library landscape.

What makes jQuery really shine is its plugins (of which there are literally hundreds). They integrate seamlessly into the library, providing high-level functionality like drag-and-drop and autocompletion, and low-level functionality like templating. And of course, they all leverage the core jQuery philosophy that makes the library so popular.

In fact, many new jQuery users find themselves writing simple “plugins” in the first few days they use the library.

What’s cool about jQuery

  • Fully namespaced in the jQuery global, so it works seamlessly with other libraries
  • No extension of native prototypes or DOM objects, so there’s no risk of conflict with libraries behaving irresponsibly
  • Centered around the DOM, making DOM-scripting easy
  • Focuses on pragmatic solutions to everyday problems, instead of theoretical programming
  • Small (15k gzipped)
  • Can be easily extended via plugin, including stuff like the animate function (to provide animations for properties not supported by default)

In the most recent versions of jQuery, additional features have been added specifically to help build larger, more modular applications on top of jQuery, including a custom events system and a solution to an IE memory-leak problem that has plagued all JavaScript developers.

Find out why so many new developers fall in love with jQuery!

Who’s using jQuery?

Photo of Yehuda Katz

Yehuda Katz

Tilde Inc

Yehuda Katz is a core team member on the DataMapper project, and the creator of the DO.rb project. He is a contributor to the Merb and Rubinius projects, and is a contributing author for the upcoming Manning Publications book Ruby in Practice. He recently accepted a job at EngineYard. He has been working on Ruby on Rails applications since 2005, and has just spent a year working on a very large and complex data-driven Rails app (http://procore.com).

He also does front-end web work, is a coauthor of the Manning book jQuery in Action and a core team member of the jQuery project.

News and Coverage
co-presented by Ruby Central, Inc. O'Reilly
  • Engine Yard
  • Sun Microsystems
  • Brightbox
  • ELC Technologies
  • T3N

Sponsor Opportunities

For information on exhibition and sponsorship opportunities at RailsConf Europe, contact Yvonne Romaine at yromaine@oreilly.com

Press and Media

For media-related inquiries, contact Maureen Jennings at maureen@oreilly.com.

Contact Us

View a complete list of RailsConf Europe Contacts