There are times I actually look at the amount of _code_ I’m writing per hour when developing a Rails application and feel guilty. Why? In general I write far less code per hour with Ruby on Rails than I ever did with PHP, Python, Java, ASP; but I know I’m not being less productive.
Sure, every so often I pop over to [api.rubyonrails.com][api] for reference, but no more than I ever visited the php.net function list. And I **know** I’m not having to consult the books as much as with Java, Python or Regular Expressions (took me a while, those did)
So what’s leading to this odd result?
I observed my process while working on a client application last night, and discovered that I only spend 20% of my time actually coding, and that 20% often works correctly the first or second try. (When it doesn’t, I’ve made a silly error, such as calling the wrong object from `collection_select` that takes me a few minutes to spot.)
I spend the other 80% of my time thinking, puzzling, pondering, figuring out the optimal way to solve the problem before me.
That’s the way programming should be: I should be able to dedicate most of my time solving the problems that matter to the client, not to solving the problem of _how to accomplish those solutions_ in a particular language.
Until [Django][dj], a good web application framework didn’t exist in Python. About the time I discovered Ruby on Rails, I’d been searching for a Python framework that took care of the details for me; as I said above, I wanted to spend my time solving the problems that matter, not reinventing the wheel. But everything I tried back then took way more setup time than I wanted to invest. Most of the existing frameworks required that I spend an inordinate amount of time just getting a development server running so I could get down to business. Sure, that’s a one-time deal, but when it came to Rails, I could type
script/server
and be done with it. I don’t have to configure apache, manage a pool of CGI servers, configure mod_python, etc…
I’m willing to put in plenty of effort building a production server, but here’s a tip to aspiring framework authors out there… if you want people to dive right in, don’t require them to bring a diving board and platform.
And I’ve singled out Python here - I actually really enjoy Python for anything other than web development - and I intend to keep an eye open on Django and other developments. I’ll use PHP here and there for the tiny little stuff, but the point is this:
> If I have to develop a significant web application in a language other than Ruby, I’ll be looking for frameworks that get me started developing solutions immediately.
[api]: http://api.rubyonrails.com/
[dj]: http://www.djangoproject.com/
2 Comments
Why not try out TurboGears(http://www.turbogears.org) ? It’s a Python-based framework like Django but glues together “best-of-breed” components like CherryPy, SQLObject etc. rather than reinventing the wheel. As with Rails it gives you all the tools you need to get started quickly, for example a web server and Toolbox webapp for configuring your data model, i18n settings, etc.
TurboGears is under very heavy development at the moment but they are working towards a stable 0.9 release in the very near future. I have heard there will be a book out this year. It’s probably worth a look given your requirements.
I intend to revisit both Django and Turbogears, once my current workload slows down a little. I’ve got my hands full with Rails development right now
Post a Comment