Ruby vs. Rails

OK, this question came up on a local list, and I don’t have the answer.

Does Rails require Ruby?

Before I go any further I should point out that I have in fact been
banned from the Rails list, probably for loud and vituperative
criticism of the list itself, but possibly also for advocating sex
with goats. (I have since made an effort at apology, although it seems
to have been unsuccessful.) At any rate, that’s one reason why I’m
posting this question here, rather than on the Rails list.

The other reason I bring this up here, rather than on the Rails list,
is that up until the day when I was banned from that list, I had in
fact been filtering it to the trash. I generally find this to be more
a programmer’s list, with a higher average age and experience level. I
think this question, asked on that list, would yield more opinions,
but less useful answers.

Rails the software, as opposed to the list, is of course brilliant,
and it’s inspired a large number of copycat frameworks in other
languages. I used one of these copycat frameworks, Catalyst in Perl,
and found it totally unwieldy and counterintuitive. I had assumed that
tons of experience with Perl and a pretty strong understanding of
Rails would be enough to make Catalyst easy, but it wasn’t.

A friend of mine did an experimental web app in Turbogears, one of the
Python frameworks, and he said it was great. However, he’s a Python
partisan, so much so that I don’t think he’s ever even given Rails a
trial run. (Also, I’m not sure Turbogears qualifies as a copycat
framework, because it may in fact predate Rails. I’m pretty sure
Django does.)

Does anybody on this list have experience with any of the copycat
frameworks? Has your experience been detailed enough to include an
examination of the source code? If so, is it your opinion that Ruby is
a necessary component of Rails’ success? Can you point to evidence in
the form of specific design decisions in competing frameworks?

I know Rails makes use of Ruby’s flexibility in its object system, as
well as its reflection features, but how much of that is key, and how
much of that just happens to be the case? Do any of the copycat
frameworks enjoy similar productivity? If so, do the languages of
successful copycat frameworks share features with Ruby that the
languages of unsuccessful copycat frameworks lack?

Obviously, as somebody banned from one of the relevant lists to this
question, I am aware that controversy can be a bad thing, and would
like to minimize it. In particular, I know that in any programming
language community, there are going to be people who are adamant in
their preference for particular languages and/or their dislike for
other languages. Please keep in mind that the only way to hold a
reasonable conversation about this kind of question is to avoid
language wars.

Between “The Pragmatic Programmer,” which advocates frequently
learning new languages, and Bruce Tate’s “Beyond Java”, which spread
the idea that Java’s day is probably over, there’s been a lot of
interest in linguistic diversity recently in the general programming
community. A conclusive answer to the question of whether or not Rails
actually requires Ruby would go a long way to determining whether this
interest in linguistic diversity is justified, or just a fad.

(Seaside, as a Smalltalk continuation server, seems like a strong
argument in favor of the idea that languages play a powerful role in
framework design, but there are in fact continuation servers in Perl,
Ruby, and even Java as well.)

On Sun, 8 Oct 2006 04:10:50 +0900 “Giles B.” [email protected]
wrote:

OK, this question came up on a local list, and I don’t have the
answer.

Does Rails require Ruby?

Yes.

Before I go any further I should point out that I have in fact been
banned from the Rails list, probably for loud and vituperative
criticism of the list itself, but possibly also for advocating sex
with goats. (I have since made an effort at apology, although it seems
to have been unsuccessful.) At any rate, that’s one reason why I’m
posting this question here, rather than on the Rails list.

Are you trying to apologise for that by proxy? I fail to see what
difference it makes mentioning it here, other than to attract sympathy
from people who potenitally have no idea what the situation is about.
But consider yourself absolved all the same if it helps appease your
conscience.

Does anybody on this list have experience with any of the copycat
frameworks? Has your experience been detailed enough to include an
examination of the source code? If so, is it your opinion that Ruby is
a necessary component of Rails’ success? Can you point to evidence in
the form of specific design decisions in competing frameworks?

That’s the wrong way around to ask the question isn’t it? Something
like Rails could easily be implemented in other languages; the author
of it chose Ruby for his own reasons, no doubt.

– Thomas A.

Thomas A. wrote:

of it chose Ruby for his own reasons, no doubt.
No, I disagree. Most or many of the copycats are inferior to Rails
because the underlying language is less expressive (or less dynamic).

An exception might be Python, which is probably the closest to Ruby
of all the languages that have Rails clones.

Hal

Hal F. wrote:

That’s the wrong way around to ask the question isn’t it? Something
like Rails could easily be implemented in other languages; the author
of it chose Ruby for his own reasons, no doubt.

No, I disagree. Most or many of the copycats are inferior to Rails
because the underlying language is less expressive (or less dynamic).

An exception might be Python, which is probably the closest to Ruby
of all the languages that have Rails clones.

Curiously, how does rails compare to Catalyst. I’m a long
time Perl programmer, and learned Catalyst before coming to
Ruby and Rails. Now I’m learning both Ruby and Rails. I’m
having a lot of fun, but find my lack of command of the
language to be a real issue with gaining a command of rails.

I thought Catalyst was cool, but too much of a moving
target. I’ve tended to work on a project then loose
interest for a few months. When I return the Catalyst
framework had undergone many changes.

So I’d be interested in hearing thoughts from folks that
have worked with, or at least looked at both. I’m really
digging Ruby, just have somewhat the dry sponge syndrome as
of late.

Thanks for any feedback.

Andy

Giles B. wrote:

Does anybody on this list have experience with any of the copycat
frameworks?

Starting a thread with a pejorative assertion is going to seriously
distort the responses.

Yes, Rails has motivated some to go create (for better or worse) similar
tools. But others were already in the works and evolved in parallel
with Rails. And all of them have copped ideas and techniques from
prior work.


James B.

“Discover the recipes you are using and abandon them.”

  • Brian Eno and Peter Schmidt, Oblique Strategies

Hal F. wrote:

No, I disagree. Most or many of the copycats are inferior to Rails
because the underlying language is less expressive (or less dynamic).

An exception might be Python, which is probably the closest to Ruby
of all the languages that have Rails clones.

I don’t know about other Python web app frameworks, but I don’t think
it’s fair to classify Django as a “Rails clone” or “copycat”. Django and
Rails were developed independently more or less at the same time. And
they were both abstracted from different web apps. As a consequence,
there are some things that Django does well and Rails does poorly, and
vice versa.

I’m not at all sure the concepts of “expressive” or “dynamic” are the
real reasons Ruby programmers prefer Ruby to other languages. I think
its more that Ruby was a true object-oriented programming language
from birth, rather than having objects grafted on to what was
essentially a glorified UNIX shell with lots of C libraries. Early Perl
scripts, for example, looked a lot like cleaned-up C shell or Korn shell
scripts that used “grep”, “sed”, “awk”, etc. to do the work.

Giles B. wrote:

Before I go any further I should point out that I have in fact been
banned from the Rails list, probably for loud and vituperative
criticism of the list itself, but possibly also for advocating sex
with goats. (I have since made an effort at apology, although it seems
to have been unsuccessful.) At any rate, that’s one reason why I’m
posting this question here, rather than on the Rails list.

I’m not in the general habit of feeding trolls, but in this case I think
I’ll make an exception. If you want to be treated with respect, please
refrain from discussions of bestiality on a programming language forum.
It’s inappropriate, illegal in most places, and just in general not
funny, if indeed that was your intent in claiming that you have
advocated it.

Between “The Pragmatic Programmer,” which advocates frequently
learning new languages, and Bruce Tate’s “Beyond Java”, which spread
the idea that Java’s day is probably over, there’s been a lot of
interest in linguistic diversity recently in the general programming
community. A conclusive answer to the question of whether or not Rails
actually requires Ruby would go a long way to determining whether this
interest in linguistic diversity is justified, or just a fad.

Maybe I’m old-fashioned, or just old, but I’m not at all convinced that
“linguistic diversity”, as you call it, or “too many
programming languages”, :slight_smile: as I sometimes call it,
is necessarily a “good thing”. I personally find the constant switching
of syntactic and semantic gears between my two main programming
languages, Perl and R, jarring.

Of course, I’ve been programming a long time, starting with macro
assembler and FORTRAN in a time when Lisp and APL were “new kids on the
block.” People who haven’t learned new programming languages,
especially languages semantically orthogonal to ones that they are
familiar with, should of course learn new ones. But if you want to get
paid as a programmer, treat this as a way of making yourself a better
programmer in the languages you get paid to work in, rather than as an
“opportunity” to “proselytize” your newly-learned language, however
wonderful that language might be. :slight_smile:

Andrew L. wrote:

Curiously, how does rails compare to Catalyst. I’m a long time Perl
programmer, and learned Catalyst before coming to Ruby and Rails. Now
I’m learning both Ruby and Rails. I’m having a lot of fun, but find my
lack of command of the language to be a real issue with gaining a
command of rails.

Just on the off chance nobody else speaks up, get a copy of David
Black’s book “Ruby for Rails”. It’s tailor made for that purpose.

I thought Catalyst was cool, but too much of a moving target. I’ve
tended to work on a project then loose interest for a few months. When
I return the Catalyst framework had undergone many changes.

I think you’ll find variations of this in all community-based projects.
Smaller projects are usually worse in that respect; if it’s just a small
clique of developers and users with little external feedback, they’ll
pretty much do what they want when they want.

I think Rails is a good bit less “life at the edge of chaos” than a lot
of other open source projects. And Ruby is even more stable – I
personally think it’s more stable than Perl 6, for example.

Giles B. wrote:

I know Rails makes use of Ruby’s flexibility in its object system, as
well as its reflection features, but how much of that is key, and how
much of that just happens to be the case? Do any of the copycat
frameworks enjoy similar productivity? If so, do the languages of
successful copycat frameworks share features with Ruby that the
languages of unsuccessful copycat frameworks lack?
Try 'em all out, and see for yourself. I, for one, don’t care. That’s
not meant to be mean; I’m just lazy, and limit the things I try to
things that are easy to try and things that get recommended to me.

Between “The Pragmatic Programmer,” which advocates frequently
learning new languages, and Bruce Tate’s “Beyond Java”, which spread
the idea that Java’s day is probably over, there’s been a lot of
interest in linguistic diversity recently in the general programming
community. A conclusive answer to the question of whether or not Rails
actually requires Ruby would go a long way to determining whether this
interest in linguistic diversity is justified, or just a fad.
Of course Rails doesn’t require Ruby. It’ll also run on Puby, which just
happens to have the same language syntax and semantics as Ruby, as well
as the same standard library. There’s a Duby port in the works, but
because it requires semi-colons, they’ve got a lot of work to do.

Rails-equivalents are being made in every language. Are they “good
enough”? I dunno; I haven’t tried any of them. Is it possible to
replicate Rails in another language? Dude! Rails is not the holy grail.
It is possible to kick Rails’s ASS in another language. And someone
will, eventually. Maybe not in Java, but there are a lot of programming
languages out there, and believe it or not, Ruby’s not the only one that
supports metaprogramming. (My money’s on Io, but we’ll see.)

Oh, and as for whether “this interest in linguistic diversity is
justified, or just a fad” (clever), my vote’s on both. Ob. Alan Perlis
quote: “A language that doesn’t affect the way you think about
programming is not worth knowing.” (Hint: That quote’s not new.) At the
same time, most of the blogospherity on language diversity is driven by
Rails, and that’ll fade.

Devin

On Oct 7, 9:36 pm, Devin M. [email protected] wrote:

There’s a Duby port in the works […]

Tommy Chong voice Wow man, that’s totally far out and stuff. You
know, Duby could become, like…industry standard, man…like roll your
own Duby and stuff, you know! And…like…uhmm…uhhh…what was I
talking about just now? :wink:

Regards,
Jordan

M. Edward (Ed) Borasky wrote:

Just on the off chance nobody else speaks up, get a copy of David
Black’s book “Ruby for Rails”. It’s tailor made for that purpose.

Will do, thanks for the feedback.

M. Edward (Ed) Borasky wrote:

I don’t know about other Python web app frameworks, but I don’t think
it’s fair to classify Django as a “Rails clone” or “copycat”. Django and
Rails were developed independently more or less at the same time. And
they were both abstracted from different web apps. As a consequence,
there are some things that Django does well and Rails does poorly, and
vice versa.

I didn’t know that. I’m not a Python guy.

I’m not at all sure the concepts of “expressive” or “dynamic” are the
real reasons Ruby programmers prefer Ruby to other languages. I think
its more that Ruby was a true object-oriented programming language
from birth, rather than having objects grafted on to what was
essentially a glorified UNIX shell with lots of C libraries. Early Perl
scripts, for example, looked a lot like cleaned-up C shell or Korn shell
scripts that used “grep”, “sed”, “awk”, etc. to do the work.

Granted, the OO is a big part of it. The “expressiveness” of Ruby is
probably not separable from its OO, though the dynamism is.

Hal

“Starting a thread with a pejorative assertion is going to seriously
distort the responses.”

That is an assumption you do here.

Just by replying to the core of his question does in no way
associate your response with HIS opinion, nor is there an
imperative that a response gets distorted. It depends
on the people who reply! :slight_smile:

So please give him the fair chance to keep his own opinion,
and address his underlying question of (summarized):

frameworks, languages (and their strength/weakness), your
personal experience with them.

For me, although I personally have not jumped seriously
on the Rails train :wink: I think there are a lot of extremely
nice ideas injected in a “sidewhere fashion”, for example:

the gruff stuff/library.

Very easy, but a cool idea and it also looks extremely
cool.

These little things are what I love a lot. I am much more
fascinated by these “offspring projects” than by rails core
stuff (although some Ajax niceties are also nice, and I wonder
how far rails can go, given that other projects like rails
livecd sprung forth too…)

Devin M. wrote:

Oh, and as for whether “this interest in linguistic diversity is
justified, or just a fad” (clever), my vote’s on both. Ob. Alan Perlis
quote: “A language that doesn’t affect the way you think about
programming is not worth knowing.” (Hint: That quote’s not new.) At the
same time, most of the blogospherity on language diversity is driven by
Rails, and that’ll fade.

Wow … Alan Perlis … that takes me back to the infancy of programming
languages. We’re talking Algol 58 and its implementations, such as
MAD, JOVIAL and NELIAC. We’re talking machines with word sizes a
multiple of three because it’s easier to do octal arithmetic in your
head than hexadecimal arithmetic.

We’re talking 026 keypunches, character sets with six-bit characters,
and machines that didn’t even know what the time of day was. Did people
really use this stuff to run large businesses and design nuclear weapons
and space vehicles? :slight_smile:

And language diversity – even if you don’t count all the macro
assemblers, there was FORTRAN, COBOL, RPG, various dialects of Algol,
Lisp, COMIT, SNOBOL and quite a few others. So what was “worth knowing?”
Well, of course, FORTRAN for science and COBOL for business. Macro
assembler for optimization. Algol if you worked for or with Burroughs or
with European programmers.

But only two languages would “change the way you think about
programming.” One was Lisp, and the other was APL. Since then, only two
more have come along that changed the way I think about programming –
Forth and Smalltalk.

Does anybody on this list have experience with any of the copycat
frameworks?

Starting a thread with a pejorative assertion is going to seriously
distort the responses.

Yes, Rails has motivated some to go create (for better or worse) similar
tools. But others were already in the works and evolved in parallel
with Rails. And all of them have copped ideas and techniques from
prior work.

well, that’s a good point. many similar frameworks aren’t actually
copycats, and tarring them with that brush is definitely pejorative.
my bad.

framework design, but there are in fact continuation servers in Perl,
Ruby, and even Java as well.)

Well, yes. There’s nothing about Rails that mean it can’t be done in
Python (Django), or Java/Groovy (Grails). However, because of Ruby’s
flexibility, it’s just more likely that such things will appear in
Ruby first. They’ll then be hacked into a Java straitjacket at some
later time.

Martin

I don’t know about other Python web app frameworks, but I don’t think
it’s fair to classify Django as a “Rails clone” or “copycat”. Django and
Rails were developed independently more or less at the same time. And
they were both abstracted from different web apps. As a consequence,
there are some things that Django does well and Rails does poorly, and
vice versa.

Can you elaborate on that? Your statement about the history of Django
is absolutely accurate, I should have phrased the question
differently. For what particular sort of problems would you recommend
Django over Rails?

I’m not in the general habit of feeding trolls, but in this case I think
I’ll make an exception. If you want to be treated with respect, please
refrain from discussions of bestiality on a programming language forum.
It’s inappropriate, illegal in most places, and just in general not
funny, if indeed that was your intent in claiming that you have
advocated it.

I have certainly learnt this lesson.

especially languages semantically orthogonal to ones that they are
familiar with, should of course learn new ones. But if you want to get
paid as a programmer, treat this as a way of making yourself a better
programmer in the languages you get paid to work in, rather than as an
“opportunity” to “proselytize” your newly-learned language, however
wonderful that language might be. :slight_smile:

Weirdly enough the only other place I’ve heard of R is the same place
this question comes from. Anyway – I’m also wondering if this is such
a great thing, or just a sort of balkanization.

Does Rails require Ruby?

Yes.

why?

But consider yourself absolved all the same if it helps appease your
conscience.

well, thank you. but no, I’m not trying to apologize per se, I just
want to avoid any out-of-nowhere attacks from hostile Rails listers,
and explain one of my reasons for posting this here rather than there.
but thank you all the same.

Does anybody on this list have experience with any of the copycat
frameworks? Has your experience been detailed enough to include an
examination of the source code? If so, is it your opinion that Ruby is
a necessary component of Rails’ success? Can you point to evidence in
the form of specific design decisions in competing frameworks?

That’s the wrong way around to ask the question isn’t it? Something
like Rails could easily be implemented in other languages; the author
of it chose Ruby for his own reasons, no doubt.

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.

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.

these kinds of questions, do we somehow bridge Beautiful Soup and
Rails, do we use Django or Turbogears for the Python intergration,
these are practical questions.

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.

Giles B. wrote:

Django over Rails?

Well, I would favor Rails for applications like BaseCamp and Django for
applications like running a newspaper web site. :slight_smile:

But seriously, folks, I don’t know enough about Django to be able to
prefer it for anything – I’m too far down the Ruby/Rails path and I
know zero Python. There was a whole conference last year comparing the
two frameworks, and the whole enchilada is on the web somewhere. I think
the conclusion was that they were both good, that Django could learn
from Rails and Rails could learn from Django, and that Rails would
always be in Ruby and Django would always be in Python. Google for
“Snakes and Rubies”.