The Rails FAQ

Published 10 April 05 by Justin French, 13 comments

Compared to the ubiquity of PHP, how do you handle finding a web host that supports Ruby (and Rails)?

I only need one or two to recommend to my clients. Luckily I found (and was later hired by) TextDrive, the first host (that I know of) who offered Ruby on Rails in a shared hosting environment, and a supporter of the Rails project (in short, we share the profits with them).

I’m not going to turn this into a sales pitch for TextDrive, and there are other hosts out there supporting Rails in one form or another, but I don’t need 1000’s of choices – one or two decent choices is plenty for me. The reality is that Rails is growing rapidly, and hosts will have to start taking notice.

How do your clients react to the use of Ruby over more “proven” languages like Perl or PHP?

I guess I’m in the fortunate position where my clients trust, respect and value my opinion. One client simply told me “this is your decision to make, and we trust you” which was nice, but my general preferred method is to involve the client in the decision making process.

For starters, comparing PHP to Ruby is fine, but comparing PHP to Rails is just plain wrong. My main reason for recommending Rails is nothing to do with the underlying Ruby language – it’s the library of code (the framework) that you get “for free” that’s important. You can’t compare Rails to PHP, you have to compare Ruby+Rails to PHP+something – and I’ve yet to see any framework come close to Rails. So what I’m really selling to my clients is the Rails framework.

And how do I do that? Productivity.

If a client has a budget of $5000, that buys them 50 hours of my time (assuming a fictional hourly rate of $100). So the real question here is how much can I achieve in those 50 hours?. Without a doubt, the most productive tool I’ve found for web application development is Rails. I can achieve much more in an hour with Rails than I even could with a PHP-based framework (and believe me, I’ve tried all of them, and even wrote my own).

I can do more for my clients. I can implement more features from their wish list. I can spend more time on refinements, usability, design, research, user experience and testing. I can spend less time worrying about the details (security, data integrity, compatibility, etc) and more time getting things done right, and done with elegance.

There is of course a downside to early adoption. My clients probably feel a little bit of “lock in” (to both myself, as one of only a few local Rails developers and to TextDrive, as one of only a few Rails web hosts), but I stick by my clients. I’m not going anywhere, I’m not going to screw any one, and neither is TextDrive.

So far, my clients have weighed up these pros and cons, listened to my advice, and decided they’re “on Rails”. None of them have regrets or “post purchase dissidence”.

Of course, they’re not really buying a process, they’re buying a result.

I honestly can’t see myself taking on much more PHP work from now on. It just seems so wasteful, and I can produce better results (for a given budget) with Rails.

Of course Rails can’t be the best choice for everything – I still recommend Textpattern to many of my clients with smaller budgets or simple needs, and I’ll always have my PHP bag of tricks when needed.

And the downsides?

So far, not much. I think there’s a certain level of risk when you adopt pre-1.0 software, and the introduction of Routes (internal Ruby URL re-writing instead of using Apache’s mod_rewrite) in Rails 0.10 forced me to do a big rewrite and re-organisation of my first project (which was based on 0.95), but this was a small (2 hours?) price to pay, and the Rails team have very few milestones left before 1.0, so things are looking more stable every day.

Updated April 9:

How have I adapted to the object-oriented world of Ruby, instead of the procedural world of PHP

Easy. I didn’t really work in a procedural way. I hated PHP’s OOP style, so sure, everything was procedural, but I broke everything up into functions, and tried to make things as modular as possible. I basically found that Rails and Ruby was a pretty good extension of what I was already doing. I just feel like I’m being encouraged to write better code. There was a bit of confusion when it came to inheritance, but I soon understood it all and I feel quite comfortable now.

What resources can you recommend to help make the switch?

I ran through some tutorials, spent a lot of time in #rubyonrails on IRC, asked a lot of questions, bought the “Pick Axe” book, read the source code of open source projects like Hieraki & Epilog whilst “clicking along” with the actual application, read every email on the Rail mailing list, and basically just dove in head first, burying myself in the code. I taught myself PHP the exact same way.

Options

What is this?

portrait of Justin

This is the online home of Justin French, a designer & web application developer located in Melbourne, Australia. I like finding ways to make things work better. I like clarifying and simplifying. I like to understand how you understand things.

» read more

Subscribe to my feed

Follow me on Twitter

@justinfrench

More Notebook Articles

Show more notebook articles

Search