×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Ajax On Rails

CmdrTaco posted more than 8 years ago | from the can-you-hack-it dept.

Programming 235

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."

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

235 comments

Pimpin with Rails (0)

Anonymous Coward | more than 8 years ago | (#12788618)

Yeah, conf I'm at right now (NFJS) the dudes are pimpin' the ride with rails. FWIW.

Kill the buzzwords (0)

Anonymous Coward | more than 8 years ago | (#12788620)

please....

Re:Kill the buzzwords (0)

Anonymous Coward | more than 8 years ago | (#12788673)

What? Do you prefer RESTful applications over Google-esque AJAX-webapps?

Don't you like 14 year old IT-girls managing their own business of "standart complaint web-pages for 15 dollars"?

Rails, great for those fed up with J2EE. (5, Interesting)

newdamage (753043) | more than 8 years ago | (#12788622)

I'm sure many developers like myself have a day job that probably involves J2EE. The first time I did the iniitial tutorials for Rails several weeks ago I was blown away. Connecting to a database is not susposed to be this easy.

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. (2, Interesting)

Uber Banker (655221) | more than 8 years ago | (#12788647)

I've not tried RoR from a development perspective (I have no need/desire to write web apps), but from a user perspective it rocks! Well done Javascript can be a nice user experience, but sites that need regular reloading rarely use it, the main exception I can think of being Gmail.

RoR, IMHO, is a major step forward to web deployed applications becomming mainstream.

Re:Rails, great for those fed up with J2EE. (1)

afd8856 (700296) | more than 8 years ago | (#12789037)

Not knowing what Rails is (ROR is mostly a server thingy, the AJAX extension is just that, an extension), doesn't it bother you that you're posting without having an idea on what you're posting?

Re:Rails, great for those fed up with J2EE. (1)

Vacindak (669486) | more than 8 years ago | (#12788652)

It also needs YARV [atdot.net] (which I believe will be the VM for Ruby 2.0) in order to be competitive. As it is, Ruby's speed (or the comparative lack thereof) is one of the biggest obstacles to corporate adoption. That and that it's hard to convince managers that the fact that only one person on their team knows Ruby isn't actually a problem.

Re:Rails, great for those fed up with J2EE. (1)

wfberg (24378) | more than 8 years ago | (#12788696)

I'm sure many developers like myself have a day job that probably involves J2EE. The first time I did the iniitial tutorials for Rails several weeks ago I was blown away. Connecting to a database is not susposed to be this easy.


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 (unless you shell out for toad). And a database should cost a thousands of dollars, require gigabytes of storage and memory, and the constant supervision of a DBA to make sure the thing doesn't explode!


Connecting to such complex high-tech databases should of course not be easy! If the database's license costs tens of thousands of dollars, there should be no objection to paying some J2EE guys to figure out how to do that within the space of a few weeks.


You all know who to thank for your job security, database geeks!

Re:Rails, great for those fed up with J2EE. (1)

Atzanteol (99067) | more than 8 years ago | (#12788748)

And since you're paying thousands of dollars for this database the command-line based client should under NO circumstances be easy to use! Do not allow command line history, or the ability to edit the line you're working on!

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. (1)

n3bulous (72591) | more than 8 years ago | (#12788873)

IIRC, readline is GPL, not LGPL, so Oracle would have to open the source of sqlplus. I know, not much worth hiding, but oracle's tools have pretty much always sucked (especially when compared with informix, god rest its soul)

Re:Rails, great for those fed up with J2EE. (3, Interesting)

Cyberax (705495) | more than 8 years ago | (#12788731)

Ruby is easier. Until you try to do something even moderately complex.

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 more powerfull and _flexible_.

Re:Rails, great for those fed up with J2EE. (5, Informative)

sucresemoule123 (462966) | more than 8 years ago | (#12788852)

RoR has caching : here [rubyonrails.com] and supports transactions : here [rubyonrails.com]

Re:Rails, great for those fed up with J2EE. (1)

Cyberax (705495) | more than 8 years ago | (#12788977)

How about distributed caching (SwarmCache, Tangasol, Memcached)? How about optimistic locking based on timestamps (it is still absent and we needed it BADLY)?

And Ruby's transaction support is very limited, for example it's impossible to detach record from a transaction, save it to session and then reattach this record to a new transaction (with concurrency control based on timestamps/verisons, of course). Hibernate (http://www.hibernate.org/ [hibernate.org] ) supports this, BTW.

Re:Rails, great for those fed up with J2EE. (4, Informative)

milesegan (134096) | more than 8 years ago | (#12789347)

Rails supports optimisting locking out of the box. Just add a lock_version column to your table and it will do the rest.

The issue is you, not the tools (-1)

Anonymous Coward | more than 8 years ago | (#12789350)

How about distributed caching

????

If its distributed, its not a cache. If you are going to the network, why not just pull up committed data from the db or local file? I think you are making up problems that only exist in your mind or fractured design.

for example it's impossible to detach record from a transaction, save it to session and then reattach this record to a new transaction

Then the data should be committed to the database in an ACID-compliant manner and be made part of the transaction itself...or can you afford to lose this data that apparently you need so badly? Once again, invented problem for your fractured design. Nice use of hoity-toity terminology though. And yes my ecommerce site has revenues in the hundreds of millions, i am not talking out of my ass,

Re:Rails, great for those fed up with J2EE. (3, Interesting)

marcello_dl (667940) | more than 8 years ago | (#12788858)

hmmmmm troll alert?

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 ;) ).

Re:Rails, great for those fed up with J2EE. (2, Interesting)

ajm (9538) | more than 8 years ago | (#12788877)

So what you're saying is that RoR is becoming more complex as it tries to handle the complex things J2EE has to handle? There is a certain irreducable amount of complexity in writing enterprise software (whatever that is). Frameworks that try to support this completely generally become more and more complex themselves until they reach J2EE levels. The vast majority of the "complicated" things in J2EE are in there because they are needed to solve real world problems. Anything that attempts to solve the same set of problems will approach the same complexity.

Re:Rails, great for those fed up with J2EE. (2, Insightful)

systems (764012) | more than 8 years ago | (#12788949)

You should probably read this paper on scripting [pacbell.net]
The moral is, no matter how complex a system build on Ruby will get, it will always be more simple to use than a system build on Java, just because Java carries the characteristics of a systems programming language while Ruby carries the characteristics of a scripting programming language.

Re:Rails, great for those fed up with J2EE. (2, Insightful)

Cyberax (705495) | more than 8 years ago | (#12789019)

Scripting is not a holy grail. The only fundamentall advantage of scripting is name-based polymorphism (i.e. dynamic dispatch), it allows you to skip extracting common interfaces in your object model. As the software grows this advantage soon becomes negligible, and may even turn to disadvantage, because you'll have to find and isolate general interfaces manually.

Re:Rails, great for those fed up with J2EE. (1)

Cyberax (705495) | more than 8 years ago | (#12789006)

Ruby is Turing complete, so it can do any thing that Java can do.

I'm just saying that Ruby in its current state can't really handle complex web-applications. I don't say anything about future RoR versions.

Active record tries to keep things simple, yes. But sometimes things just can't be simple: we've had lots of problems with cascaded deletes/updates, inverse mappings and bi-directional structures. Finally, we just used Active records like a plain SQL query engine with little additional benefit.

Re:Rails, great for those fed up with J2EE. (4, Informative)

zorander (85178) | more than 8 years ago | (#12789045)

Enterprise software is a different game. Rails is pretty all around terrible at integrating with non-rails-intended database schemas which are plentiful in any enterprise situation.

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.

Re:Rails, great for those fed up with J2EE. (3, Interesting)

abulafia (7826) | more than 8 years ago | (#12789117)

Were you trying to shoehorn rails onto an old schema?

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.

Re:Rails, great for those fed up with J2EE. (4, Interesting)

Cyberax (705495) | more than 8 years ago | (#12789212)

First, you have some misconeptions about J2EE.

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.

Re:Rails, great for those fed up with J2EE. (1)

afd8856 (700296) | more than 8 years ago | (#12789052)

Go for zope. All you're mentioning is already built (internal, or extension products):
workflow, caching, object based database, transaction, etc. I don't know if it's easier than Java, but it's easy enough for me.

Re:Rails, great for those fed up with J2EE. (2, Informative)

mixonic (186166) | more than 8 years ago | (#12789104)

> Ruby is easier.

yes

> Until you try to do something even moderately complex.

nothing is easy when it's complex

> caching

nope, its there

> transaction support

yep it's weak.

> object-relational mapping is inferior

Isn't any OR mapper slow/bloated and really just a starting point?

> RoR is nice

yes :)

> but it needs lots of polishing and some redesign.

it's not 1.0 yet

> In its present state RoR can't be compared with J2EE solutions, they are far more powerfull and _flexible_.

I don't code Java professionally, so I don't know. But Rails ain't 1.0 yet. Check back in 3 months ;-)

Re:Rails, great for those fed up with J2EE. (0)

Anonymous Coward | more than 8 years ago | (#12788847)

Slight problem... there are NO Ruby developers in the world. At least, not in any numbers that anyone gives a shit about Rails, or Ruby on Rails, or whatever cute name you zealots think up next.

Re:Rails, great for those fed up with J2EE. (1)

metamatic (202216) | more than 8 years ago | (#12789262)

If only Rails applications (and Ruby) could be compiled for the JVM and run in a J2EE application server...

I guess what I really want is a Java equivalent of Rails. Java On Crutches or something like it.

P.S. Slashdot just said:
Slashdot requires you to wait 2 minutes between each successful posting of a comment to allow everyone a fair chance at posting a comment.

It's been 3 minutes since you last successfully posted a comment

Fucktards.

Substitute for s (2, Interesting)

fa2k (881632) | more than 8 years ago | (#12788628)

Can this again help reducing bandwidth consumption in a similar, but prettier way, than html frames?

Re:Substitute for s (1)

marcello_dl (667940) | more than 8 years ago | (#12788680)

Yes, as the article points out. Ajax has also a problem in common with html frames, as it's difficult to associate content to an uri. The article covers this, too.

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)

Re:Substitute for s (1)

jbplou (732414) | more than 8 years ago | (#12788931)

I've messed around with it a little and it should signicicantly reduce bandwidth in some situations.

Re:Substitute for s (1)

curth (89959) | more than 8 years ago | (#12789103)

Not just prettier and lower bandwdith, by way more capable. Try doing what Google Maps does using iframes!

Ruby on Rails as a threat to PHP? (4, Insightful)

Sv-Manowar (772313) | more than 8 years ago | (#12788642)

Every time I see material surrounding Ruby on Rails, I'm further convinced that it could be the web application programming foundation that starts to displace PHP as developers start to look at the transition from PHP 4 to PHP 5. Getting an increased install base for ruby on rails, as is the case with php (a fairly difficult task, admittedly) would definitely help no end in increasing the framework's popularity, at least amongst those programming smaller web applications.

Re:Ruby on Rails as a threat to PHP? (0)

Anonymous Coward | more than 8 years ago | (#12788891)

I agree that Ruby is a solution to displace PHP, a low performance web framework that results in web applications that scale poorly and has very little commercial tools support for site building. However, this ancient approach of text-edited, interpreted syntax is lost in 1997. Right now with Struts and ASP.Net you can do more visually with less effort and run it on Apache/IIS with far greater scalability. This stuff is just not very useful.

Re:Ruby on Rails as a threat to PHP? (2, Interesting)

DoctoRoR (865873) | more than 8 years ago | (#12789063)

What a troll. PHP is so low performance and scales so poorly that major web sites moved to it from the Java world, and there are enterprise-focused solutions like Active Grid [activegrid.com] that are now available. It's so un-"useful" that myriad discussion boards and community portals are invariably PHP-based. New development tools and plug-in support for popular design/programming tools are popping up. Each of these web technologies has a sweet spot, but your narrow-minded viewpoint is best revealed by your aversion to "this ancient approach of text-edited, interpreted syntax." Yeah, right. Google and every other major web presence must agree with your assessment since they only use Java and .NET now.

Re:Ruby on Rails as a threat to PHP? (0)

Anonymous Coward | more than 8 years ago | (#12788908)

an increased install base ... would definitely help no end in increasing the framework's popularity

Wow, isnt that the DEFINITION of popularity? Good job spewing a bunch of words without actually saying anything. So insightful!!! I just love slashdot...

Re:Ruby on Rails as a threat to PHP? (1)

jbplou (732414) | more than 8 years ago | (#12788940)

could be the web application programming foundation that starts to displace PHP as developers start to look at the transition from PHP 4 to PHP 5

Do you mean displace PHP from its positions below JSP, ASP, and ASP.NET?

Rails book from the Pragmatic Bookshelf (5, Informative)

gavri (663286) | more than 8 years ago | (#12788651)

Get the Beta book http://pragmaticprogrammer.com/titles/rails/index. html [pragmaticprogrammer.com] If you're interested in Rails at all, this book is all you need.

Re:Rails book from the Pragmatic Bookshelf (5, Informative)

mav[LAG] (31387) | more than 8 years ago | (#12788783)

Agreed 100%. I bought it last week. Don't be fooled by its "beta" status - it's a thoroughly well written introduction to Rails that takes you through everything you need to know - including building a REAL application (a shopping cart) from start to finish.

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.

Extract from Web 2.0 chapter available there (1)

DoctoRoR (865873) | more than 8 years ago | (#12788994)

As mentioned in Curt's great article, the Agile Web Development with Rails (beta) book has a nice chapter on Ajax support. You can even get an extract of the chapter at the pragmatic programmer's site: PDF Extract of Chap 18: Web 2.0 [pragprog.com]

Figure 18.1 should make Ajax clear. The book is highly recommended, and the 2nd Beta was just released last week.

Which is the bigger irony: (3, Insightful)

smitty_one_each (243267) | more than 8 years ago | (#12788654)

Then Microsoft created XMLHttpRequest in Internet Explorer 5, which let browser-side JavaScript communicate with the web server in the background without requiring the browser to display a new web page. That made it possible to develop more fluid and responsive web applications. Mozilla soon implemented XMLHttpRequest in its browsers, as did Apple (in the Safari browser) and Opera.
XMLHttpRequest must have been one of the Web's best kept secrets. Since its debut in 1998, few sites have used it at all, and most developers, if they even knew about it, never used it. Google started to change that when it released a series of high-profile web applications with sleek new UIs powered by XMLHttpRequest.
a) Microsoft as a first-mover in a technology, or
b) Microsoft's own technology being used by Google to loosen Redmond's deathgrip on the market?

Re:Which is the bigger irony: (2, Interesting)

AKAImBatman (238306) | more than 8 years ago | (#12788698)

Then Microsoft created XMLHttpRequest in Internet Explorer 5, which let browser-side JavaScript communicate with the web server in the background without requiring the browser to display a new web page.

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 overhead of an XML parse. AFAIK, Google doesn't use the XMLHttpRequest for any of their applications.

Re:Which is the bigger irony: (1)

pe1chl (90186) | more than 8 years ago | (#12788717)

You did not yet know about Google Suggest?
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: (1)

timeOday (582209) | more than 8 years ago | (#12788775)

A remote database query every time you stop typing momentarily? I think that's the most gratuitous waste of computing power I've ever seen.... I like it :)

Re:Which is the bigger irony: (1)

pe1chl (90186) | more than 8 years ago | (#12788811)

Mozilla/Thunderbird has it as well: while you type mail addresses, it searches your address books. When you have one or more LDAP address books defined, it hits them while you type your address, offering autocomplete the same way Google Suggest does.

Re:Which is the bigger irony: (0)

Anonymous Coward | more than 8 years ago | (#12789342)

You did not yet know about Google Suggest? That't a pity...

Thanks for not leaving the condescension out of your suggestion!

Re:Which is the bigger irony: (3, Informative)

Buzzard2501 (834714) | more than 8 years ago | (#12788732)

AFAIK, Google doesn't use the XMLHttpRequest for any of their applications.

Google Suggest uses XMLHttpRequest, while Google Maps uses a iframe

Re:Which is the bigger irony: (1, Informative)

Anonymous Coward | more than 8 years ago | (#12788782)

AFAIK, Google doesn't use the XMLHttpRequest for any of their applications.

Well, you don't know very much, do you?

http://maps.google.com/mapfiles/maps.keyhole.6.saf ari.js
// Copyright 2005 Google function Oa(){} Oa.create=function(){if(typeof ActiveXObject!="undefined"){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}if(t ypeof XMLHttpRequest!="undefined"){return new XMLHttpRequest()}return null} ;function Aa(){}
http://www.scss.com.au/family/andrew/opera/gmail/
When Google introduced Gmail on 2004-04-01, they did not initially support Opera. The main sticking point was Opera's lack of XMLHttpRequest support.

Re:Which is the bigger irony: (1)

jbplou (732414) | more than 8 years ago | (#12788966)

Microsoft's own technology being used by Google to loosen Redmond's deathgrip on the market? How exactly as Google effected Microsofts market? Last time I checked most desktops are Windows and Windows Servers are gaining market share. The MSN search engine never as large a market share as Yahoo or Google so they never had a "deathgrip" on that market. Plus its what GMAIL, Google Maps, and Google Complete that use AJAX. GMAIL uses it some but I don't think people use GMAIL for the interface they use it for the space. Google complete is in beta and will be more important for attaching yahoo then microsoft. Google Maps doesn't even really compete with any core Microsoft component.

Re:Which is the bigger irony: (1)

smitty_one_each (243267) | more than 8 years ago | (#12789068)

How exactly as Google effected Microsofts market?
While not Ajax-specific, an example is the increase of storage on Hotmail to 250Mb.

Dont Forget Zope (3, Insightful)

salimfadhley (565599) | more than 8 years ago | (#12788666)

Of course Rails isnt the only completely F/OSS web application framework; Rails is best when you want to put relational data online: It's edge is it's simplicity.

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 (1, Informative)

Anonymous Coward | more than 8 years ago | (#12788741)

It's also an extremely heavy-weight platform, especially if all you're looking to do is simple web applications. In addition, running it alongside Apache is a bit of a resource hog.

I'm not saying it's bad, but Rails and Zope are two completely different things. Comparing CGI to something that has its own built-in relational database, FTP server, et. al. doesn't make much sense.

Re:Dont Forget Zope (2, Interesting)

Ranger (1783) | more than 8 years ago | (#12788874)

If you can get your head around Aqusition[sic], the ZODB and Product Deveopment[sic] then Zope is a super-fast development platform.

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 impression was correct. It does have a steep learning curve (Zope not Python), but it is very powerful and reasonably fast. I'm not crazy about ZODB. I'll keep Zope put it behing Apache and connect to MySQL when I redesign the site. Also I'll throw Plone [plone.org] on top.

What does this have to do with Ruby and Rails? Not much. The user base of Plone/Zope/Python (8) is much smaller than the PHP (5)/MySQL crowd. The Ruby (23 [tiobe.com] ) on Rails is even smaller than the Plone crowd.

Re:Dont Forget Zope (0)

Anonymous Coward | more than 8 years ago | (#12789171)

So you were hired to work on a team because they felt that you were well versed in Python and Zope, but you intend to waste their time and money rebuilding it in something else you like?

it's an illusion alright (4, Funny)

udderly (890305) | more than 8 years ago | (#12788668)

From the article:The most visually impressive of these is Google Maps, which gives you the illusion of being able to drag around an infinitely sizable map in its little map window.

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 (4, Funny)

MyLongNickName (822545) | more than 8 years ago | (#12788832)

All the other countries don't really exist. You see, Oceana needs to have enemies in order to keep the people focused, and subservient to the government. It is all part of the plan.... ... oh shit... its the Ministry of Love. See you in a few years...

AJAX meme (3, Informative)

broward (416376) | more than 8 years ago | (#12788681)

The rise in AJAX is almost solely due to the recent AdaptivePath article. I'm not sure it's a major trend.

http://www.realmeme.com/miner/technology/ajaxDejan ews.png [realmeme.com]

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/hibernate vsrubyDejanews.png [realmeme.com]

Re:AJAX meme (3, Informative)

shashark (836922) | more than 8 years ago | (#12788776)

From http://en.wikipedia.org/wiki/AJAX [wikipedia.org]

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] .

Re:AJAX meme (1)

duffbeer703 (177751) | more than 8 years ago | (#12788880)

AJAX is just a catchy name cooked up by a few guys and embraced by O'Reilly, who no doubt are in the works with about 2 dozen books on the topic.

ASP.NET (0)

Anonymous Coward | more than 8 years ago | (#12788687)

how is this better than ASP.NET?

Re:ASP.NET (1)

Queuetue (156269) | more than 8 years ago | (#12788725)

In just about every way you could possibly imagine.

Re:ASP.NET (0)

Anonymous Coward | more than 8 years ago | (#12788813)

seriously - i'm making the decision soon. any actual, concrete reasons you can give me?

Re:ASP.NET (0)

Anonymous Coward | more than 8 years ago | (#12789003)

Seriously, RoR is way better. Better productivity (management will see results faster), encouraging good practices (unit testing, design patterns), developers having fun developing, etc, etc. Just try it.

Of course, it has also downsides. Ruby isn't exactly speed demon (don't run your production servers in CGI mode), your management may have objections, that random programmer from the street doesn't know Ruby (it is not Java/C#) or, if you are NBM shop, that it is not made by Microsoft.

Re:ASP.NET (2, Funny)

Anonymous Coward | more than 8 years ago | (#12788728)

How is eating feces not better than ASP.NET?

Re:ASP.NET (1)

jbplou (732414) | more than 8 years ago | (#12788990)

Its not better than ASP.NET in any way except for the fact you can put it on servers that have free OS's. ASP.NET is considerably more feature full and as better caching and performance features. Now that said AJAX can be used with any web platform, so if you want to use AJAX you can still do it with ASP.NET. If you are making a large scale site or a corporate inter/intranet site you really have two choices ASP.NET and J2EE. Either one is a vast improvement over Ruby/PHP/Perl is both performance and features.

Well, let's see here. (0, Flamebait)

Anonymous Coward | more than 8 years ago | (#12788693)

the "Traditional Web App" is still running, but the "Ajax Web App" is down.

This tells me everything I need to know about this amazing technology :-P

Re:Well, let's see here. (0)

Anonymous Coward | more than 8 years ago | (#12788969)

Application error (Apache)

Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html

Rails changes the whole Web development game (3, Interesting)

Peter Cooper (660482) | more than 8 years ago | (#12788784)

Most of this product comparison site [godefy.com] was developed in Ruby on Rails within the last two months, and it already does more than Froogle, has more search features, etc.

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.

Rails Game & Geocomments using google maps (1)

Jesse_132 (830242) | more than 8 years ago | (#12788887)

Speaking of the Web Development Game -

On Railsday (a 24 hour ruby on rails competition), myself and a couple of pals built a "Ajax" powered game on top of google maps. I'm not going to put a live link to it. (each client does xmlhttprequests to the server for status ASAP, and I don't want my poor server to die)

See Britt's write up [lukewarmtapioca.com] and my (Jesse's) write up [overstimulate.com] , Rails Day SVN source for all the projects [railsday.com] .

Then using that I was able to build Geo-comments [overstimulate.com] into my rails based blog with a couple hours work... When leaving a comment, you leaving your zip code, and then the geo-comments view using embedded google maps to show who has said what

Re:Rails changes the whole Web development game (0)

Anonymous Coward | more than 8 years ago | (#12789152)

Nice ad. Except that, well, all those sites look pretty sucky.

Every Rails app I've seen looks exactly the same as every other Rails app I've seen. And they're usually extremely simple, seemingly "cool" concepts that are *as* trivial to implement in PHP/Python/Whatever as in Rails.

And yes, I've developed Rails apps. And no, it's not a magical framework that cures all. And it's getting way too much fucking hype for what it is.

Oh, there's also this little issue with Ruby being painfully slow, and having about 10x lower performance than PHP.

Morons.

Re:Rails changes the whole Web development game (1)

Peter Cooper (660482) | more than 8 years ago | (#12789203)

If you were logged in I'd give you mod points for having pointlessly trolled with every single sentence of your post, Anonymous. Thanks!

Re:Rails changes the whole Web development game (0)

Anonymous Coward | more than 8 years ago | (#12789337)

Sucky! NOT

I just took Peter's snippets code and put it on my own site Matlab Snippets [xtargets.com] two days ago and I reckon it rocks!

Brad

AJAX, not Rails (0)

Anonymous Coward | more than 8 years ago | (#12788806)

I love Rails as much as the next guy, I'm using it for every new project. But this thread is about ***AJAX*** in Rails, is it not?

Does anyone have experience yet with *AJAX* in Rails? I'm about to play around with it right now. Can anyone please comment on THIS ARTICLE instead of babbling around the point?

Thank you.

Re:AJAX, not Rails (0)

Anonymous Coward | more than 8 years ago | (#12788833)

BTW: Thank you in advance for modding me up. ;-)

Re:AJAX, not Rails (0)

Anonymous Coward | more than 8 years ago | (#12788970)

To hell with slashdot. I'm not going to read or post anymore. You people are like a bunch of yammering girls. No respect I tell ya. No respect.

Wow.. (1)

LilGuy (150110) | more than 8 years ago | (#12788818)

First thing this title reminded me of was Cheech & Chong's Up In Smoke. That chick does a couple rails of ajax that Chong was cuttin up for fun. I was surprised no one else posted about it.

Will that be 5 or 10 years experience? (4, Funny)

GoofyBoy (44399) | more than 8 years ago | (#12788835)

Time to add Ajax and Rails on my resume!

(To all potential employeers: I kid!)

Ruby? (1)

Cthefuture (665326) | more than 8 years ago | (#12788837)

Has the performance of Ruby gotten much better since the early days?

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 for performance later" crap. When will programmers learn that doesn't actually work? You need a good design that includes tuning for performance early on.

Now I know Ruby on Rails has been shown to be faster than J2EE and similar but that's just a small part of what Ruby can do. Everywhere else it doesn't seem to perform as good. Sorta like Java. Good for server-side web stuff (mostly due to the nice API's really) but suck-ass at everything else.

Re:Ruby? (1)

mini me (132455) | more than 8 years ago | (#12788916)

I also have been using it from the early days and found it quite fast back then.

Now it is really slow if you use it in CGI mode (because it has to load the entire framework every time), but it's fine as long as you use FastCGI.

No, its still slow. (1)

Some Random Username (873177) | more than 8 years ago | (#12789034)

Matz is well aware of the speed problems, and unlike ruby zealots is at least willing to admit that its a problem, and plans to make ruby2's performance competitive with perl and python.

Re:Ruby? (1)

metamatic (202216) | more than 8 years ago | (#12789236)

Ruby's still about half the speed of Perl.

Whether that's a good tradeoff for faster development and less maintenance time is, of course, a matter of opinion.

Application error (Apache) (0)

Anonymous Coward | more than 8 years ago | (#12788863)

Try the examples ... http://blog.curthibbs.us/articles/2005/01/01/ajax- on-rails [curthibbs.us]

It looks like Ruby is not primetime, I get this error ...

Application error (Apache)

Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html

Re:Application error (Apache) (1)

curth (89959) | more than 8 years ago | (#12789133)

It looks like the ISP's entire server is down, not just this particular web app.

Get the book (3, Informative)

Ridgelift (228977) | more than 8 years ago | (#12788865)

I first heard of Ruby on Rails here on Slashdot [slashdot.org] . Although Rails is dead simple once you get it, getting to the "ah ha" point is a bit of a steep climb.

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.

Rails of Ajax (0)

Anonymous Coward | more than 8 years ago | (#12788888)

That one girl in that Cheech & Chong movie snorted a rail of ajax thinking it was coke..

That was funny.

Suspicious until... (1)

Anonymous Cowdog (154277) | more than 8 years ago | (#12788921)

It's best to be suspicious of this framework until it has a nicely integrated mechanism for graceful degradation of the user experience in clients that don't support Javascript.

I used to think, like the tadalist folks, if you aren't willing to upgrade your browser, screw you. But that was before my mobile web client began being an ever-more-important part of my systems for managing my personal data on the web. Most mobile devices just don't support Javascript, and even if you find one that does, it isn't that quick or easy to switch devices, with many such devices being cell phones that have contracts. These days if a site doesn't support plain HTML, it's as if it doesn't work at all, unless you are tied to a desktop.

There certainly are AJAX apps out there that do gracefully degrade the UI on HTML-only clients. But the rails stuff I've seen so far are not among those.

Re:Suspicious until... (0)

Anonymous Coward | more than 8 years ago | (#12789305)

So, when you write your fancy AJAX code, write it to degrade gracefully.

Or, since Rails is an open source project, why not contribute such a feature back into the code?

Rails is nice ... (0)

blankslate (748549) | more than 8 years ago | (#12788962)

heaps nice.

You can bend the rails pretty violently if you need to as well, which is what makes the inbuilt 'sensible defaults' a useful starting point rather than an ultimate obstacle.

And the rails source code is written in Ruby, so you can a) read it, and b) fit enough of it on your screen to grok what's going on.

Go buy the book.

Article's examples dont work (1)

rubato (883366) | more than 8 years ago | (#12788984)

The article has two links intended to allow the reader to compare a traditional web app to Ajax.

In Firefox 1.04, the 'traditional web app' link doesn't work: the form for posting comments doesn't appear. (It does work in IE).

The Ajax link throws up an error message:

Application error (Apache)

Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html

Not all that impressive!

JavaScript libraries comparison (1)

subtropolis (748348) | more than 8 years ago | (#12788987)

Would anyone care to post their experiences with any of the libraries - DWR [getahead.ltd.uk] , Prototype [conio.net] , Sajax [modernmethod.com] , and Ajax.NET [schwarz-interactive.de] (i'm not interested in this one at all, but to be fair...) - mentioned in TFA?

Re:JavaScript libraries comparison (1)

33degrees (683256) | more than 8 years ago | (#12789288)

I used Sajax on a recent project; it was easy to use (only a single php file to include) and worked flawlessly. The only complaint I would make is that it uses neither PHP's nor Javascript's object oriented features, although that could probably be easily hacked together.

browser versions (1)

serano (544693) | more than 8 years ago | (#12789110)

Can anyone who has experience with this comment on how well this works with various browser versions, older and newer?
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...