Slashdot Mirror


Ruby on Rails 0.13 Out Today with AJAX Superpowers

Robert J. Berger writes "The Ruby on Rails team announced that "After the longest gap between releases since Rails was made public and after more than 225 fixes and new features, the final major release before the 1.0 milestone has arrived." This is a major update to what is to many developers consider the new tool for developing sophisticated interactive database driven web applications. It integrates backend Model/View/Controller object-oriented model with AJAX based clients so that the developer can focus on the app and not on the details of basic mechanisms. You really can do much more with much less coding. The new release adds a completely rewritten visual effects engine, drag-and-drop capability including sortable lists, and autocompleting text fields to Rails. All building on top of an upgraded version of Prototype, the javascript foundation for Ajax in Rails ... Check out the very cool demos at script.aculo.us."

5 of 79 comments (clear)

  1. This is actually really damned good by byolinux · · Score: 2, Interesting

    Those demos have really got me interested in seeing what I can do with this.

    Imagine a web enabled version of Delicious Library with this. Fuck, that's cool.

  2. This is fantastic stuff! by Per+Wigren · · Score: 4, Interesting

    I've been playing with Rails since september and I've run edge rails (subversion trunk) for about a month while developing my soon-to-be-released rewrite of my site that uses a lot of this Ajax stuff in a user friendly way.

    Users can sort the pictures in their galleries by dragging them to the position they want and doubleclick them to hide them (it then becomes 50% transparent). The user always get immediate feedback without reloading the page thanks to Ajax. For translators the site is inline editable. Just doubleclick on a textfield or alt+click on a string to edit it inline. Click "save" and it's changed. Admin stuff is always available but hidden by default in drawers that you can slide in when you need them so you can be logged in as an admin an change any setting, delete posts etc without needing to go to a separate admin page or have a cluttered interface. You don't even have to reload the page in most cases...

    All this stuff is damn easy to implement thanks to the wonders of Ruby on Rails and the Prototype framework.

    --
    My other account has a 3-digit UID.
    1. Re:This is fantastic stuff! by Per+Wigren · · Score: 3, Interesting

      I'm in the middle of rewriting that part but here is the logic:

      Make sure textfields are inside a <div class="editable" id="text_id"> and wrap strings in <span class="editable" id="string_id"> where text_id/string_id is the id of the text/string in the database.

      Create a Javascript behaviour that finds all nodes that has class "editable". Prototype comes with the function getElementsByClassName().
      On each div, add a ondblclick event that:
      * creates a textarea node and put it inside the div.
      * hide the old content
      * set value of the textarea to the text content
      * add a submit button that has onclick = "new Ajax(foo);" where foo is the parameters for your ajax call and set it to update the current editable div (so the textarea will be overwritten)
      * the action for the Ajax call should return the output of the saved text.

      do the same for strings but use a input type="text" instead.

      --
      My other account has a 3-digit UID.
  3. Semi-OT: Catalyst is the Perl equivalent by egghat · · Score: 1, Interesting

    Check it out, it's based on Maypole, but now forked off and is under heavy and fast development.

    There's a short introductory article on perl.com. I quote one paragraph from this article, that gives a good overview on Catalyst:

    Catalyst is a new MVC framework for Perl. It is currently under rapid development, but the core API is now stable, and a growing number of projects use it. Catalyst borrows from other frameworks, such as Ruby on Rails and Apache Struts, but its main goal is to be a flexible, powerful, and fast framework for developing any type of web project in Perl. [...]

    It's semi-OT cause it supports AJAX and uses Prototype as its Javascript library.

    Bye egghat.

    --
    -- "As a human being I claim the right to be widely inconsistent", John Peel
  4. Re:Impressive, but... by Fweeky · · Score: 3, Interesting

    "Ruby is pretty slow at the moment"

    Actually, Ruby's quite speedy. It's not the fastest of dynamic languages, but it's certainly on par with PHP/Python in most areas that count. Where it's not, well, that's where the incredibly easy C extension stuff comes in.