cool tech graphics

What's in a framework, experiences from Rails and Drupal

Filed under:

I've now been working professionally in Drupal for a year and have learned a lot about it; I have some patches into contrib but I've not really done much with core other than some simpletests I was too shy to commit at Drupalcon and some comments trying to help people out on d.o. Prior to my stint as Drupal programmer I was a hardcore Ruby on Rails developer for about 4 years. Over the last two years in particular I've learned a lot about frameworks and I'd like to share an observation about which framework feels right to me for which situations and why.

Administrators vs End-users

At the heart of my observation is this question: Who is putting content into your database and what percentage of the database are they creating? I think it's fair to assume that there is a database but for those that are in the NoSQL camp and might be using multiple types of database lets just all agree to talk about some mythical database which content comes from.

  • At least 80% of my client's content comes primarily from their staff members and is consumed by the faceless masses on the Internet
  • At least 80% of my client's content comes primarily from logged in users via uploads, comments, content creation, etc.

Nobody is going to argue that making the admin interface of a website easy to use is critical for the first case. If you have people spending their entire days working on the back side of your website it had better be something awesome or they're all going to stalk you and break your flowers just below the point where they can regrow. Unacceptable of course. Similarly, when it comes right down to it, for me of course, creating a slick admin interface to something like would be completely pointless. Probably someone uses it, but the interface needs to be sitting in the front for the users.

As it turns out, this seems to be a great dividing line between Ruby on Rails and Drupal in my mind. I believe that Drupal has one of the greatest admin interfaces of any CMS. Failing that, I don't think that I'll get many complaints if I say that it is easy to cajole the Drupal admin into a super usable state if you know what you're doing (or you just used Drupal 7 to begin with). Drupal manages content exceedingly well, but it is extremely hard to build applications like todo lists in the thing. I'm taking todo lists because they're an easy concept that doesn't really require an admin at all.

Ruby on Rails on the other hand, does not come with an admin interface because it is not something that every web application needs. There are some marvelous backend builders for Rails, but it's not the core competency. Same thing for Sinatra and many of the other Ruby frameworks. What they excel at is being versatile, they excel at doing things that just can't really be done by the web engines we already understand (Content management and blogging in particular).

What's crucial to understand here is that for the average website for your average client that just wants to get online, we've probably already built an engine that will make them happy. Drupal in particular of course, but Wordpress and Joomla are also excellent at doing the things that everyone else is already doing. A CMS can be done very profitably in Rails, I've done it, but it probably would have been much more profitable had I learned Wordpress or Drupal back in the day.

Conclusion / Summary

My point, summarized to one sentence is thus: Do your clients want to be on the Internet, or do your clients want to create some chunk of the Internet. If they want to create awesome content and reap the rewards of it, Drupal is probably your framework of choice. If they want to do something that really doesn't fit into something that every other website is doing, Ruby on Rails is probably your framework of choice.

The hardest question though, is what do you do when it's not really so clear cut? When your client wants half of the site to be essentially a perfect candidate for a CMS, but the other half to be a crazy interactive, totally innovative thing? Do you try to use both? Do you strap it all together with Ajax? Or do you try to build the CMS in Ruby and lose out on that time? I don't know that answer, but I hope that I've made you think about your clients and their projects in a slightly different way.

Date posted: August 31, 2010


I totally agree.

When it comes to frameworks, I think Ruby On Rails takes it about as far as it can go. With active record and the ability to do meta programming in Ruby you've a really efficient toolset. CMSs (like Drupal) take it a step further.

I enjoyed reading your post and I think you've come up with a good heuristic for choosing between Rails and Drupal. I have also migrated from Rails to Drupal but I still follow the Ruby community closely. I much prefer Ruby over Php as a language but there is nothing like Drupal or Wordpress on that platform. That is too bad because the majority of developers are NOT building web apps - they're building web sites, sometimes with backend integration.

Recently I have started using Django and I really enjoy it. Django is a powerful ORM-backed MVC webframefork just like Rails but it adds a great admin interface that will cover most use cases when making content-driven websites. Like Drupal, it has a good plugin architecture so hopefully we'll see the project take off.

I wish Php would be replaced by something more powerful soon.

Awesome, I'll have to play with it some more. Thanks for the mentoin Matti

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <cpp>, <java>, <php>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Metal Toad is an Advanced AWS Consulting Partner. Learn more about our AWS Managed Services

Have questions?