Ruby on Rails Sunday, November 21, 2010

On Nov 21, 2010, at 2:02 PM, Donald R. wrote:

> Alright I understand that your using ruby for the base of a web
> development application but is the same thing or are there differences
> in the language to allow the user to do web development in an easier
> manner that is geared specifically towards web development.

Ruby is a flexible language, in that you can open foundation classes
and add new abilities to existing things, like maybe a String gets a
new method, for example. Rails uses this concept in places to give
native Ruby constructs new web-centric powers.

As far as I understand, Rails couldn't exist as it does without the
metaprogramming madness possible using the Ruby language, so it's
pretty much a chicken-or-egg problem. DHH (the original author of
Rails) is often quoted as saying that he couldn't have written Rails
without Ruby. He started out to write it in PHP, and abandoned that
when it quickly became too hard to get where he wanted to go.

PHP 5.3, which wasn't around when he did this little experiment,
begins to introduce some better reflection and metaprogramming hooks
(the equivalent of method_missing might be the new __call() function
in PHP5) but even those are seriously limited by the fact that your
classes are frozen at the time they are subclassed from their parents,
and cannot be opened again without installing some very cutting-edge
extensions to the language. These extensions in turn need to be
compiled into the PHP on your server, so you basically eliminate 99%
of all hosting providers when you say that.

There's more, and I'm hardly the expert to explain it all to you, but
if DHH says it, then it must be true!

Walter

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment