David Heinemeier Hansson, the creator of the increasingly popular Ruby on Rails Web application framework, answered a few questions about his creation earlier this week for eWEEK Senior Editor Darryl K. Taft.
What's the allure of Ruby on Rails? Why do folks love it so?
The author of Ruby, Yukihiro Matsumoto, tells us that he set out to create a language that would "make programmers happy." Rails attempts to run with that noble and profound goal and bring it to the world of Web application development. We're optimizing for humans first, compilers and the frameworks second. It's been a constant search for how we could make the development process more in tune with what makes programmers happy.
Click here to read about the outpouring of support for Ruby on Rails.
How so?
Three quick specifics: Convention over configuration. Instead of telling various parts of the technology stack five, six, seven times that you have a products table that's the data source of your product object, we've institutionalized that convention in a generalized notion: Classes are singular, tables are plural. This may sound like a trivial notion, but it has a radical impact on the amount of work that the programmer needs to do in his daily work.
We're basically taking the whole world of pain that is known as configuration and making it optional. As long as you do what most people want to do most of the time, you get a free ride. No configuration necessary. So get the 80 percent by convention, tailor the last 20 percent by hand.
Change is instant. The feedback loop between change and effect is incredibly important in programming. If the distance is too far, you tend to grow uninterested in testing your changes. You want to take bigger steps, so the penalty of compilation, deployment and restarts is paid less often. That kills productivity and motivation.
This is something we learned from PHP. The biggest lure of PHP is how quickly you can get something up there and make changes until it's right. We took that focus on "change is instant" and brought it into a world of modern software developmentbridging the Java and PHP worlds.
Full-stack framework. Programmers spend an enormous amount of time making a thousand different pieces work together. They cherry-pick a little over here, a little over there. Often times, the pieces are not exactly a good fit. So you need to add a bunch of glue, write a bunch of configuration, and basically end up wishing the left hand knew what the right hand was doing.
Rails is an ambitious attempt to provide a "full-stack framework," which means that we attack all of the problems across the model-view-control pattern. We deal with creating the templates that generate the HTML code, the controllers that direct incoming requests, and the model that makes the database come alive in objects.
In a sense, we're trying to be the Apple of Web application development. Provide and care for the complete experience. The buck stops here. Every problem is our problem. So we tend to get a lot of those small things right that fall outside of any of the major divisions.
We get all those simple, unglamorous problems solvedthe ones that won't make a good article in an academic computer science journal, but that most programmers are struggling with every day.
Read the full story on eWEEK.com: Ruby on Rails: Making Programmers Happy