Is PHP or Ruby on Rails better?

Posted by: DJ Burdick on: May 26, 2009

12172793211671

OK, so this post really has nothing to do with php or RoR or anything specific about any language…

Language debates will never end; they’re like the religious debates of the technical world; some people take fiercely loyal sides, while others claim to be language agnostic.

I’m not attempting to break down the features of each language here. What is important is to pick the best language/framework and I think it’s relatively easy if you put a little time in.

The important thing to note, is that every language is different and that there are better and worse languages. Period. We don’t need empirical evidence to prove this; the mere fact that languages are different means that one is “better” than another.

Say Cosmo (the coolest new language) is just 10% more productive than Costanza (the old stand by language).  Now imagine you’re working on a project for 1.5 years and it ends up being 50,000 lines of code – 5,000 extra lines (or several extra iterations of features) ends up being a decent win for what is probably an imperceptible difference in the start.

The problem with this example, is that programming productivity is never going to be a linear curve; as a project gets bigger and less agile, differences become more and more apparent with less efficient technologies; and so that 10% gain initially may end up being closer to 100% or more.

The point is, it is always worth the time and effort of choosing (and learning) the best language for the job.

Developers:

It is easy for developers to get stuck using the same tool sets they’re used to, and to be less objective about viewing a language based purely on productiviety. Take some time to learn some of the other languages and frameworks before you start with your same old bag of tools. You should always be looking at new ways of being more efficient, and that includes something as core as the language you use to build things.

Rails guys tend to get heat for acting holier than thou; mac guys tend to have this stigma as well; don’t let this turn you off. There’s usually a reason why people act cultish about their tools.

Regardless, I recommend playing with different frameworks and languages to get a first hand idea of how development in each will be. Make sure the scope of the language will cover what you want to build; then build the most simple application you can think of in each language/framework and see how “easy” each one is. This doesn’t need to be a technical analysis of each feature set; start building and the better toolset will just feel better and faster to you.

I know this sounds like a lot of extra effort, but it will pay off big time down the road when you are cruising along with the best language and toolsets, and your competitors are using something just a bit slower.

Non-Developers:

Non-developers tend to become overwhelmed with the choice of platform and language; and honestly they should not be making this choice as it will probably be on a whim, based on some marketing material or blog post ;) they just read; or it will be based on a developer they know who could be biased towards inferior tools.

If you aren’t the one who’s going to be coding, then find someone who understands the startup landscape and who also codes. It’s important that they understnad that productivity is paramount when deciding on a language.

Here are the potential problems with asking some developers what the best language for a project is:

a) The good ones will be able to pick up any language, so they may say they’re language agnostic, and therefore just recommend what they’ve currently been working in.

b) Others will be passionate about a language because of the tool sets and skills they’ve developed, and will be reluctant to recommend any other language (their language has become their religion).

c) Others won’t look at the bigger picture of getting things done as quickly as possible; it is VERY easy to over complicate a system.

Big Win:

There are small and big wins in the startup world; having the best technology foundation is a big win.  One of the cornerstones to any startup’s success is how quickly the team can iterate on new cycles of the product; this is the number one reason for it being important to pick the right foundation on which to build.

Answer:

So what is the answer to the post title? Find someone who understand technology and productivity very well and have them choose. If it’s a web application I’d have them start by looking at RoR, Django and the Zend framework for PHP.

So which would I pick? Until Cosmo gets built, I’d go with RoR right now, but I haven’t used Django yet, and before I start any new project I want to give that a pretty good test drive.

So if languages are our religions: be somewhat fickle and open minded to the new messiah; if you don’t convert, at least you’ll have more knowledge and faith in your current beliefs.

Note: The post title is not comparing apples to apples; comparing cakephp to ruby on rails would be better etc.

2 Responses to "Is PHP or Ruby on Rails better?"

There’s usually a reason why people act cultish about their tools.

I’ve found that more often than not it’s because the people acting cultish haven’t tried anything else, or gave up on other options before learning those other options in enough detail to be productive with them. Or tried another tool four years ago and hated it and hasn’t looked back to see if the other tool has made gains.

That’s not to say that you should constantly be switching toolsets, but hearing outdated slander against tool X when the person talking hasn’t used it, or used it 10 years ago, is annoying. And it’s what gives the ‘cultish’ fanboys a bad name.

Yep, there’s some good points about RoR, and about Macs. There’s also a lot of things that can be improved. The ‘cultish’ attitudes tend to ignore those and just slam other technologies, often without good (or even informed) reason.

Hey Michael, I definitely agree with you, and didn’t mean to say you should follow people who are “cultish” about their tools – just that there may be merits in what they are saying. The main point I was trying to make is: don’t become part of the cult or ignore these tools because of the cult; try them on your own to see if they are valuable for you.

Leave a Reply