This post originated from an RSS feed registered with Ruby Buzz
by Obie Fernandez.
Original Post: No Ruby in the Browser
Feed Title: Obie On Rails (Has It Been 9 Years Already?)
Feed URL: http://jroller.com/obie/feed/entries/rss
Feed Description: Obie Fernandez talks about life as a technologist, mostly as ramblings about software development and consulting. Nowadays it's pretty much all about Ruby and Ruby on Rails.
Paul Hammant blogs (under the influence of several Jack'n Cokes) that we need Ruby execution in the browser. I repeat "no, thanks".
I think JavaScript in the browser is mature and good enough. If you find JavaScript too constraining when trying to shoehorn rich-client functionality into a browser, that's probably a good indicator that you should move to XUL or some other rich-client alternative.
Having Ruby available as a native scripting alternative to JavaScript in the browser would be interesting, cool even, but the chances of that happening and being widely-available enough to actually use it are so remote that right now I don't even think it's worth speculating about.
Theoretically, it would be fairly simple to write a Ruby Plugin that lives in an ActiveX/XPCom object container, bringing JPI (Java Plugin) style support for Ruby in the browser. Two significant issues would make that effort rather pointless IMO. One is the distribution issue -- people don't like downloading extensions to their browsers. The wide default distribution of Flash support in browsers is the main reason that plugin dominates the marketplace. As Paul mentions in his post, I wrote a lot of JPI-based stuff at MediaOcean and we found deployment and versioning to be a nightmare on so many fronts that I probably shouldn't discuss the matter publicly.
In particular, I suspect a browser-plugin for Ruby would be a bad thing in the long run if it detracted or stole mindshare from the great Prototype/Scriptaculous integration we have in Rails.
The one thing i can't stand being without is structured exception handling (like ruby, delphi and java-without-checked-exceptions). There are a bunch of other things Javascript hasn;t really got, but thats the one I miss the most.
And so I'll only write javascript out of necessity.
The issues you highlight are a problem, but so is javascript.