B
Ben Bleything
why?
I think the problem is that your question is a little too specific.
Rails (capital R, the Ruby on Rails Framework) does require Ruby...
because that's what it's written in and blah blah blah.
I think your real question, though, was "Is Ruby the only language in
which a framework like Rails can be written?" I'm inclined to say that
the answer to that question is no.
Obviously, it's never going to be the same if it's not written in Ruby.
Ruby's expressiveness and readability are huge assets to Rails. But I
feel that a lot of the success of Rails boils down to the simple fact
that it makes it easy to do complex things, and it's "fun" to do so.
That can be built in any language.
put it another way, it appears to me, without having done in-depth
analysis on the numerous frameworks out there, that the best are
probably Rails and Seaside. Ruby and Smalltalk are similar languages,
so it's possible that, if Rails and Seaside really are the best, the
similarities in these languages could be significant and could be part
of the reason these frameworks succeed. but that leads to a question,
do the language differences lead to substantially different design
decisions? because if the similarities in the languages are part of
the frameworks' success, then evidence should exist within the source
code, and in particular, the similarities in the languages should
probably have resulted in similar design decisions which are elegant
in Ruby and Seaside but less so elsewhere.
There's an extended rant hiding behind this, but I'll keep it simple:
"best" is almost always a relative term. What's best for you and the
problems you need to solve may be the worst for someone else. What's
best for a Java programmer is probably a Java framework.
Setting aside all of the arguments we usually hear about Java, I don't
see any reason why a framework couldn't be built that would deliver the
same ease and fun factor of Rails in a Java environment. Sure, it'd
take more code, and sure, it'd be Java code, but there's nothing magical
about Ruby that enables Rails to do things.
I'm sure someone will correct me if I'm wrong, but I don't think there
are any problems in the web application development world that can't be
solved in any language you choose.
but the possibility also exists that just saying "this and that are
the best" is superficial and misses the point, and the real point is
you choose particular tools for particular problems. for example, I
worked with a Rails guy recently who didn't want to use Beautiful Soup
(a Python screenscraper) because Python seemed too different from
Ruby. I disagreed, but it was his call. we benchmarked Rubyful Soup,
the Ruby port, but it was ten times slower than the Python version. so
he found a different Ruby screenscraper that was equivalent in terms
of performance with Beautiful Soup but less elegant in its use,
because it allowed him to stay within Ruby.
I should read the entire quote before I respond. This is basically what
I said above!
you might choose Django over Rails for a particular class of tasks. if
you re-implemented Django in Ruby, which parts of it would be
different upon translation, and would it still be preferable for the
same class of tasks? if you've ever read works in a foreign language
you know that certain literary nuances have a very difficult time
surviving translation.
Though I take your point, I don't think comparing a translation of
programming languages to a translation of human languages is quite the
same thing. You would lose language-specific idioms, but that wouldn't
be an issue.
A translation (for instance, Django -> Rjango), benefits primarily Ruby
programmers who hear cool things about Django and want to give it a
shot. In all likelihood they don't know Python, or they'd be using
Django already. It wouldn't be the same, but it would be good enough.
Ben