Slashdot Log In
Ajax On Rails
Posted by
CmdrTaco
on Sat Jun 11, 2005 08:26 AM
from the can-you-hack-it dept.
from the can-you-hack-it dept.
mu-sly writes "Ajax and Rails - probably two of the biggest buzzwords in web development at the moment. In this article over at ONLamp, Curt Hibbs introduces the incredibly powerful Ajax support that is part of the Ruby on Rails web application framework. It's a great read, and serves as a gentle introduction to the cool stuff you can accomplish with ease using the Ajax features of Rails."
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Rails, great for those fed up with J2EE. (Score:5, Interesting)
Even when using newer frameworks like Spring, Tapestry and Hibernate (I hate you so much Struts) Rails still manages to be easier.
I highly suggest any developers looking for a change of pace at least give Ruby on Rails a few hours of your evening. While it's not nearly as comprehensive as Java, it's gaining libraries and functionality by leaps and bounds.
And just so I don't get labeled as a Rails fanboy/Java basher: Rails is not perfect, I still would recommend using J2EE for large corporate projects. It's just a much more mature solution with less unknowns. I think Rails needs another year at least before people are ready to really give it a shot in the corporate environment.
Re:Rails, great for those fed up with J2EE. (Score:3, Interesting)
RoR, IMHO, is a major step forward to web deployed applications becomming mainstream.
Re:Rails, great for those fed up with J2EE. (Score:2)
Damn right! Databases all ought to be like Oracle, where even typing in a query is a hellish quest involving obscure replacements for DNS (tnsnames), client software that's incompatible when even a minor versionnumber changes, convoluted connectstrings and non-gui client tools (un
Re:Rails, great for those fed up with J2EE. (Score:2)
Seriously, I don't know how Oracle gets away with sqlplus... Would it be *that* hard to add readline support?
Re:Rails, great for those fed up with J2EE. (Score:2)
Re:Rails, great for those fed up with J2EE. (Score:3, Interesting)
Our company recently tried to do a web-project (workflow management application for a publishing house) based RoR. It was a spectacular failure - LOTS of things are mostly absent from RoR: caching and transaction support, object-relational mapping is inferior (yes, ActiveRecord is NOT enough), etc.
RoR is nice, but it needs lots of polishing and some redesign. In its present state RoR can't be compared with J2EE solutions, they are far m
Re:Rails, great for those fed up with J2EE. (Score:5, Informative)
Parent
Re:Rails, great for those fed up with J2EE. (Score:4, Informative)
Parent
What are you talking about? (Score:3, Informative)
Re:Rails, great for those fed up with J2EE. (Score:4, Interesting)
Ruby can't do complex things java can??? You meant rails, probably, and such confusion of terms is not a good sign.
Have you checked out the latest rails versions' API? I see transaction support and caching of db data and cgi actions too.
As for the 'inferior' object relational mapping: indeed Active record tries to keep things simple: I'm grateful for it. Rails developers got too far sometimes, as you see if you have a column named 'type' in your tables
But, that's not being inferior, it's being different. If your app requires convolute mappings, either extend active record to suit your needs or do without it (possibly dropping rails altogether and wasting precious ram with a JVM
Parent
Re:Rails, great for those fed up with J2EE. (Score:3, Interesting)
Re:Rails, great for those fed up with J2EE. (Score:3, Insightful)
Advantages of dynamic languages (Score:3, Insightful)
Re:Rails, great for those fed up with J2EE. (Score:5, Informative)
I'm going to overlook the fact that a flexible caching mechanism has been in place since pre-snowdevil (maybe february) and transaction support was added at some point before the last time I worked with rails (late april). Keep in mind that it's still pre-1.0 and beta and not yet feature-complete. Criticizing it for a lack of features it supports, though, is in poor taste.
Furthermore, almost all rails development at this point has been executed using very small (5 people) core teams. J2EE supports large scale development because it was designed for it. Rails was designed to let a relatively small number of people write an agile application using the set of paradigms which rails was built on. Coming at it from an "I use java in the enterprise and couldn't plug rails in its place tomorrow" is a little bit unfair, because in the same sense, I couldn't just drop J2EE onto my own desktop and start developing with it tomorrow. (Not to mention that my boss would not even begin to authorize such an expenditure for one developer on one product).
I see rails more as a contender to PHP than to J2EE. J2EE and rails are not really comparable in the same market. Sure, rails beats the crap out of J2EE when you've got 1-3 developers on the project, and inversely, when there's more than 10, J2EE has a clear advantage. Coming from java, you're likely to miss many of the benefits of metaprogramming in rails. Even coming from python (a somewhat similar language to ruby), I was a bit startled at some of the techniques being used.
Your project might have failed, but I'm not sure it was completely rails that caused it. AR is very easily extensible (in a matter of hours, usually) to do all sorts of more enterprise-java-like things. Ruby's dynamic messaging and open classes makes that a much simpler affair than it would be in java. Why didn't you extend it to meet your needs? Also, how did you miss the fact that caching and transactions have been there for a while? Were you trying to shoehorn rails onto an old schema? Did you have prior ruby programming experience or were you learning as you went? Did you have prior experience in a dynamically typed language writing an app of similar complexity? Nothing is going to make the solution of a hard problem easy. Some things can make it more pleasant, if used correctly.
Parent
Re:Rails, great for those fed up with J2EE. (Score:4, Interesting)
This, I think, is the crux.
My company has a library, too, that makes certain assumptions about the DB. We're really wicked-fast when using it, when building an app from the gound up. It has hooks for overriding some assumptions, so we can shoe-horn it in to some other projects. But if the DB is hopeless, the game is over, and we have to do things like everyone else.
And nearly every company out there has a hopelessly messy DB, that can't be refactored because of X, where X is legacy apps, no money, management resistance, [...]
Hell, even Hibernate/middlegen has a problem related to this: all it takes is one clueless app developer that scorns DB constraints, and you have a Situation that can cost 10s of K to fix.
Rails is neat (I'm a pretty big perl bigot, and I like it), but it isn't designed for integration. Folks playing around with it should recognize that up front, so that they don't try to do the wrong thing with it.
Parent
Re:Rails, great for those fed up with J2EE. (Score:5, Interesting)
True, you can't just drop J2EE on your desktop because there's no such _thing_ as J2EE. J2EE is a set of standards (which contains just about everything).
The only things you need to start developing J2EE applications are: Tomcat (http://jakarta.apache.org/tomcat/index.html [apache.org]), optionally a web-framework (like http://jakarta.apache.org/tapestry/index.html [apache.org]) and you can start developing tomorrow (if you know Java of course) and a decent IDE (http://www.eclipse.org/ [eclipse.org]). It will cost you about $0.
Java has some metaprogramming featues starting from version 1.5. Right now we're writing application in C++ and Python, so I don't miss metaprogramming features
RoR is extensible, but some features are just very hard to implement: maintaning persistent object identity, complex mappings support, distributed caching and long-running transactions with optimistic locking.
We had previous expirience in dynamic languages (Python, Perl, PHP). This project was a sort of expirement - we wanted to see what can be done with RoR.
Parent
Re:Rails, great for those fed up with J2EE. (Score:3, Insightful)
You forgot the "learn J2EE" part, which is going to be a task at least a magnitude more complex than learning Java itself.
Re:Rails, great for those fed up with J2EE. (Score:3, Insightful)
Rails itself could be put on top of any persistence layer. Instiki uses Madeliene instead of AR and it works fine. It just comes, o
No, you hold the hype for 3 months. (Score:5, Insightful)
Parent
Substitute for s (Score:2, Interesting)
Re:Substitute for s (Score:2)
BTW I recommend giving rails a try, it's really a well thought out environment for your web apps. The site linked in my sig is a quick and dirty powerdns + lighttpd + rails experiment on a debian UML host (still on 2.4)
Ruby on Rails as a threat to PHP? (Score:5, Insightful)
Re:Ruby on Rails as a threat to PHP? (Score:3, Interesting)
Re:Ruby on Rails as a threat to PHP? (Score:3, Funny)
Rails book from the Pragmatic Bookshelf (Score:4, Informative)
Re:Rails book from the Pragmatic Bookshelf (Score:5, Informative)
I also bought Programming Ruby by the same author because I want to do more with Ruby than just Rails, but this isn't necessary for those who just need Rails - all Ruby constructs and idioms are cross-referenced with an included introduction to the language.
Parent
Which is the bigger irony: (Score:4, Insightful)
b) Microsoft's own technology being used by Google to loosen Redmond's deathgrip on the market?
Re:Which is the bigger irony: (Score:3, Interesting)
This isn't quite correct. IFrame and hidden IFrame communication was invented before that. The catch is that browsers weren't stable enough or compatible enough to make use of these channels.
XMLHttpRequest does more or less the same thing as an IFrame (via an ActiveX contarol), except that it adds the over
Re:Which is the bigger irony: (Score:2)
That't a pity...
Go try it at http://www.google.com/webhp?complete=1&hl=en [google.com]
Re:Which is the bigger irony: (Score:2)
Re:Which is the bigger irony: (Score:2)
Re:Which is the bigger irony: (Score:3, Informative)
Google Suggest uses XMLHttpRequest, while Google Maps uses a iframe
Dont Forget Zope (Score:4, Insightful)
On the other hand remember Zope - If you can get your head around Aqusition, the ZODB and Product Deveopment then Zope is a super-fast development platform.
Re:Dont Forget Zope (Score:3, Interesting)
I recenty became the web administrator at a small university and the college I work for uses Zope. I knew a little Zope and Python beforehand and it helped me get the job. I was all hot and heavy to switch them to a PHP/MySQL solution, though my first love is Perl. Doing stuff in PHP was fast. As I studied Zope and Python more and more I came to realize that my initial impre
it's an illusion alright (Score:4, Funny)
It's illusory alright, when I start at the US and scroll due west the first thing that I come to is the UK. Where'd all the other countries go?
Re:it's an illusion alright (Score:5, Funny)
Parent
And the funny thing is... (Score:2, Insightful)
AJAX meme (Score:3, Informative)
http://www.realmeme.com/miner/technology/ajaxDeja
However, Ruby on Rails is clearly rising,
moving steadily upward for over a year. Thanks to a reader for bringing this to my attention.
http://www.realmeme.com/miner/technology/hibernat
Re:AJAX meme (Score:4, Informative)
There have been some critics of the term AJAX, claiming that the Adaptive Path [wikipedia.org] consultancy who created it [com.com] are using it as a marketing vehicle (and as a meme [wikipedia.org]) for previously used techniques [25hoursaday.com]
It has been pointed out that the AJAX technologies did not have a common name before, and that some welcome a unifying term for the process. However it is also reported that the Google engineers who have created the most prominent applications using this technique consider their technologies as 'Javascript'
AJAX is not a new approach of building software. From a higher perspective the presentation layer is like a form and a programming layer behind handling the events, commonly known in programming terms as MVC [wikipedia.org]. This kind of programming is very well known in older programming environments like Delphi, MFC, Visual Basic, Oracle ADF, and Windows Forms, just to name a few. Applications using this model of programming have been around for years: Microsoft Outlook Web Access using WebDAV and the Web based ERP system P2plus using web services directly from the browser. However, because there are no standards available for the communication model behind previous implementations, all use proprietary extensions.
A new aspect to AJAX is that there are now multiple browsers that can be used to realize this type of application, as opposed to earlier technologies which were frequently limited only to Microsoft's [wikipedia.org] Internet Explorer [wikipedia.org].
Parent
Re:AJAX meme (Score:2)
Rails changes the whole Web development game (Score:4, Interesting)
I've also developed a large marketing system for the restaurant industry in Rails which lets restauranteurs develop e-cards, e-gifts, and send them to their customers on certain days.. or certain days away from their birthdays, etc.. and that will be going fully live soon.
My 10,000 user strong RSS Digest [bigbold.com] will be making the leap to Rails soon (July 1st) and this is a system driving over half a million uses a day.
I developed a del.icio.us-style tagged Code Snippets [bigbold.com] site in Rails within two days! It's had further refinements since then, but less than two weeks after launch, it was getting thousands of pageviews a day and hundreds of visitors a day from Google.
I was ready to give up development work 6 months ago, and now it's the most fun and profitable work out there for me. Ruby on Rails deserves the attention it's getting. You can put together your ideas in a fraction of the time you'd have ever imagined.
Wow.. (Score:2)
Will that be 5 or 10 years experience? (Score:5, Funny)
(To all potential employeers: I kid!)
Ruby? (Score:2)
I started using Ruby a long time ago, back when no one knew about it. I liked it because it was like a better Perl (better OO support but with Perl syntax). However, I quickly tired of its lackluster performance. I mean it was a lot slower than even Perl or Python. I eventually moved on hoping to return when Rudy had matured and performance was kicking. Last time I checked the performance was the same as always. So much for the "tune
Get the book (Score:4, Informative)
If you want to learn Ajax in Rails, the best thing I've read has been Dave Thomas' new book "Agile Web Development with Ruby on Rails" [pragmaticprogrammer.com]. The author of Ruby on Rails itself, David Heinemeier Hansson, is also a co-author. Great book, absolutely fantastic web development framework.
ASP.Net 2.0 (Score:3, Informative)
http://www.developer.com/net/asp/article.php/3506
Re:ASP.NET (Score:2)
Re:ASP.NET (Score:2, Funny)
Re:ASP.NET (Score:3, Insightful)
You don't understand one of the most important necessary preconditions for a larger web app in corporations - someone to approve it.
J2EE and ASP.NET have rich organizations that they can loan you to take key decision makers (CFOs) out to lunch to help approve expensive J2EE projects.
Compared to the Oracle sales guy flying my previous CFO out to some g
Re:Q: Can you mix PHP and RoR? (Score:3)
Hope that helps.
(This comes from someone who runs XMMS on a Mac