On May 14, 3:47 am, surf [email protected] wrote:
I am curious as to why or why not other MVC approaches in PHP or
other languages might advance alongside of Rails ? Perhaps this is
because Rails is as much a framework as a language or platform and the
same thing could be done conceptually in other ways.
It’s all about the Ruby. Rails beauty is a direct result of embracing
Ruby’s dynamic nature. A select few other languages could create
reasonable Rails clones (Python, Smalltalk, Lisp), but I think that
would be a mistake. A good framework should be optimized for the
language it is created in. Python has Django, Smalltalk has Seaside.
These are great frameworks because they have a strong vision and
understanding of the core language behind them. They don’t try to
copy something else.
I think PHP frameworks will have a hard time keeping up because the
language itself is so primitive when it comes to OOP. A language like
Java is better suited to creating a great framework, but there you run
into a culture clash. Java is very protective of the programmer,
which feels needlessly restrictive to a rubyist. The Java programmer
prefers to receive as many errors as possible at compile-time, and is
content to let an IDE manage the boilerplate. The rubyist prefers
more freedom and less typing, and is willing to debug more cryptic
errors as an expense. I think it’s pretty clear that neither approach
is superior, but people tend to have a preference. I, for one, have
no interest in the explicit precision of the Java way, though I can
see its benefit in certain applications.
I Also find it a curious phenomenon why very intelligent developers I
have known and met will say derogatory things about Rails without
knowing much about it. Has anyone had similiar experiences ?
Most likely they are reacting to the hype engine of the Rails
community. But just as hype is a bad reason to pick a technology,
it’s just as bad a reason to shun it. Most Rails critiques from Java
guys feel like they made a cursory examination of the technology just
to confirm their prejudices. Rails has its warts, to be sure, but its
an incredible code base. A lot of critics seized on the Twitter
scalability issues as confirmation that Rails doesn’t scale. But a)
they’re already doing 17,000 requests per second and b) they haven’t
hit a brick wall, they just need to scale to multiple databases.
That’s a significant challenge, but the fact that it doesn’t have a
readymade solution in Rails is more of an indication of the rarity of
an app that does 17,000 requests/second than any fundamental
limitation in Rails.
I think a lot of it stems from what Yuri says. If you are invested in
J2EE and Rails comes around doing a lot of the same stuff at a
fraction of the development time, that is a real threat. It’s only
natural to be defensive. Certainly there are many many things that
J2EE does that Rails does not that can be clung to as a sort of self-
validation, but it’s not a sign of a good programmer to search for a
litmus test they can use to dismiss new technologies.