Ruby/Rails: too good to be true?

I've never touched ruby/rails before, but after visiting ruby-lang.org a
couple of days ago my interest in Ruby has exploded. This is among other
things because of the beautiful syntax and the fact that everything is
objects.

FYI: I've been using PHP for 5-6 years now, and I've built my own small
company around this language - so when looking at Ruby and Rails I'm
naturally trying to compare them to PHP.

I'm the kind of person who finds it rather hard just to "trust" that
other people made a framework that is "perfect" my projects. This is not
because I think I'm better than other developers, but simply because I
know for sure that frameworks made by others simply isn't made
especially for my project.

Therefore I have to ask: Why are so many people choosing Rails for their
web apps instead of making their own specific frameworks (as we see with
for example PHP). The percentage of websites based of PHP frameworks is
rather low - in ruby it seems that "all" websites are made with Rails (I
maybe wrong here, this is just my perception). Why is this?

Mostly, I would not call those things real "Application Frameworks". This might not be the case,
with your projects, but in my experience most of those mini-frameworks are in existance
because no one knew better. Sometimes, they are quite good, sometimes they are horrible. Your
milage may vary.
I had the possibility to work both on "frameworkless" and framework-based (Mojavi & Agavi) Sites
  in PHP and I have to state: those based on a framework are easier to handle. Consider a Framework
as a set of shared knowledge. We are all doing the same thing. So why do it twice?
If you start thinking about the way a framework like Rails or Agavi describe the web, you will
find out that most of your "problem orientated code" was useless - because there is an easy,
general way of solving your problem.

In PHP you just add for example an apache server and you're ready to
built your own web framework/projekt. Isn't the same thing possible with
ruby??

As PHP is build for web development (its default output stream sends headers, etc.) , this is easier in
PHP. (using mod_php and the like...) Ruby by itself is not a web language. It is a general purpose scripting
language like python or perl. Thus, doing specific low-level tasks is sometimes a bit more work.
But the "web" problem is solved and there are more than one solutions that you can just grab and
start using.

Another concern I've got with Ruby/Rails is performance. I can see RoR
promises easy maintainability and beautiful code, but doesn't this hurt
performance in the other end? And how is the scalability?

Performance is relative. For example, caching in Rails is really easy. So your beautiful code that took you
10 minutes to write is taking 8ms longer in execution time than a low-level unoptimized version.
You invest 2 more minutes and the page gets cached for 10 minutes and will be served as if it was
a static page. So why optimize the code?

As every other stateless Framework, Rails scales - if you run out of juice, throw another server at it. I don't
know the size of your projects, but it takes a long time before you hit a border.

On the other hand: yes, Rails solves many tasks and is thus big. So if you like Ruby but some Rails facts hold you off,
there are other web frameworks in ruby that might be worth looking into. Merb, Nitro, Ramaze, Sinatra, Camping,
just to name a few.

Now, enlighten me! :slight_smile:
Thanks in advance!

I hope I did - at least a bit ;).

-Rasmus
--

-Florian