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."
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.
Join the Free Software Foundation
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.
wow... I really want to try this... I love the idea of ruby on rails, but all of this client side code is nuts.
Of all the samples, only the shoping cart works at all on Firefox1.04 on solaris. Everything else just does nothing and renders horribly. Even the shoping cart demo fails to render things properly, even when it works.
sigh...
I really really really want to like this... but how is relying on the client to run code properly sane, with all the different clients out there?
Ce n'est pas une signature automatique.
Because Ruby on Rails is the "bleeding edge" half baked trendy geek masturbation language / platform de jour. Sort of like tapas and sushi, except sushi is now passé (unless you eat it off the belly of a super midel).
"Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
Great. AJAX shopping carts. Will no one learn from the usability problems people found using Flash for such things?
AJAX is great... for applications where the state is not particularly important (i.e., enough to be bookmarked). A product catalog and shopping cart is not one of this type.
I'm pretty sure Rails can't address the issue of client-server communication. It just can't be done with current browser technology. The only way browsers communicate with servers is through HTTP requests. This means that, even if you only want to send a single word, you need a full HTTP request, and you will get a response, which the browser will try to display or otherwise process.
Sending data from the server to the client is completely impossible, unless you somehow keep your request from completing, which most browsers don't like.
Something as simple as an IRC client is impossible to write for web browsers, because of these limitations. Probably the closest you can get is a form for submitting new messages, and a reloading page that displays the last few messages. This means a new connection, HTTP request, and response (which will give you the same form you just submitted) for every message you send. For the refreshes, you have a trade-off between update speed and wasted resources. Everything about it is hopelessly inefficient.
Rails is not going to be able to fix these issues. It's just inherent in the way browsers work. All it can do is make the generation of content on the server sied easier. At that, it does a very good job. My only concern is performance; Ruby is pretty slow at the moment, and I'm not sure if I would develop a dynamic site with a great number of visitors with it. I'm guessing it wouldn't be a problem, but I'd measure it first.
Please correct me if I got my facts wrong.
"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.