Pat Eyler posted a blogging contest sometime early this month, but I've just now gotten around to really fleshing my thoughts out on the question: What can Rails learn from other frameworks?
My answer? A lot. And I think maybe it's not really even from the frameworks themselves, but from the users of said frameworks. When you use a framework or language or tool, you gain a certain level of knowledge and intimacy with it. When evaluating other frameworks, one must weigh the gains of the framework with the loss of knowledge: will I gain more features or other advantages than I will be losing knowledge and familiarity? Web frameworks are a commodity, but knowledge and time are not.
Don't mistake me: I think the Rails way is great. When I looked at my knowledge of PHP and C# and I evaluated what I was gaining when switching to Ruby and Rails, I definitely saw a better ratio of gains to losses. Others, though, do not see it that way.
Nitro on the other hand does see it that way. From their RDoc:
You can write applications in the ASP/JSP/PHP style, ie by writting server pages that are automatically translated to Ruby code by Nitro.This approach helps compensate for the change from one environment to another: your knowledge of PHP or JSP is now valuable again. You can gain the benefits of the new framework while still salvaging parts of the time and knowledge of your previous efforts.
Or, you can write MVC style applications (like Rails) by utilizing the powerfull Object publishing/Controller mechanism.
Alternatively, you can use stateful components and/or programmatic rendering: Nitro is the premium container for Wee applications.
Rails doesn't allow for much in this regard. It forces you to follow conventions; it forces you to follow MVC; it forces you to do it the Rails Way. This is great: this is what we want. Rails' practices are both agile and effective, but it's hard to be hit in the face with "The Rails Way" from the get go. I'm not saying that Rails should switch to this totally flexible setup like Nitro, but I do think it should provide, shall we say, "entrances" for this existing knowledge to make inways to the Rails world.
What's the benefit to Rails though? Why care? There are a lot of brilliant people in the PHP and Java worlds. A lot of really really smart people who could bring a lot of knowledge to the world of Rails, but if Rails doesn't provide ways for this knowledge to be used, it's sort of a moot point.
Unfortunately, I dont have any "practical" suggestions for Rails to implement, but I think this is an idea that should be brought up for discussion: offer ways for people to use their knowledge of previous frameworks in the current Rails ecosystem. Don't change the way Rails works, but provide ways to transfer knowledge.
Sorry, comments are closed for this article.