Opinion: Why Ruby on Rails is a game changer

Ruby adds speed and boost developer productivity

Tim Bray, director of web technologies at Sun Microsystems, say that Ruby on Rails is twice as fast to develop as Java and twice as maintainable as PHP. Gartner has predicted a fourfold increase of Ruby developers to four million by 2013.

Martin Fowler, an original signatory of the Agile Manifesto, stated when comparing Ruby on Rails, C#, Java that Ruby “offers palpable gains in productivity, allowing us to be more responsive and produce better software, more quickly for our clients”.

See: Computerworld's open source special feature
FullCodePress, a competition to build a website in 24 hours, was won by a Kiwi team using Ruby on Rails.

What is it about the environment that allows it to compete with the more established web development environments such as .Net, PHP and Java?

Ruby on Rails is an open source framework, consisting of Ruby, an object oriented programming language, and Rails, a web development framework. Think of Ruby on Rails as a full-stack framework that covers everything needed to build a web application.

Ruby on Rails emphasises two things:

Convention over configuration (CoC): this means the developer only needs to specify unconventional aspects of an application that reduces the code and also repetition. For example, if there is a class “Sale” in the model, the corresponding table in the database is called Sales by default. It is only if one deviates from this convention, such as calling the table “products sold” that the developer needs to write code regarding these names.

Don’t repeat yourself (DRY): DRY means the information is located in a single, unambiguous place. For example, using the ActiveRecord module of Rails, the developer does not need to specify database column names in class definitions. Instead, Ruby on Rails can retrieve this information from the database.

The CoC and DRY principles manifest themselves in far too many ways to discuss here. Without getting technical, in our opinion, these are some of practical benefits of Ruby on Rails:

You build (and change) stuff quicker: People are amazed at how quickly working “wireframe” prototypes can be created and how easy they are to modify. You write less code which usually means fewer bugs and it’s easier to make changes. This is fantastic for projects where clients don’t know what they want until they see it.

No constraints: Many websites are built using content management products. These are great when you are happy to live within the constraints of the product (that is, you have similar requirements to everybody else) but not so great when you want to do something unique and innovative.

When you want to create something unique, then usually the “mass” and constraints of CMS products gets in the way and using a language/framework is more effective. As Ruby on Rails makes it very easy to implement the 10 to 20 percent of features that typically actually get used in a CMS, you can often get the best of both worlds — content management plus unconstrained bespoke development.

Great Ajax support: Ajax is an integral piece of the Rails framework. In fact, “prototype” and “scriptaculous”, two leading JavaScript libraries that helped popularise Ajax, are products of the Ruby on Rails core team. This means you can create sophisticated rich user interfaces that don’t rely on plug-ins.

More maintainable: Ruby on Rails is opinionated software. That is, it assumes that there is a best way to do things, and it is designed to encourage that best way — and in some cases to discourage alternatives. In practice this helps to ensure more maintainable code and that a developer can more easily get up to speed with another developers code.

Developers love it: Our experience is that developers who move from from PHP and .Net to Ruby on Rails, love it and never want to go back.

All of the above means that Ruby on Rails really shines when you combine it with an Agile process.

Pascall is a director of 3 Months, a Wellington-based open source web and web application development company

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags open sourceruby on railsSpecial ID

Show Comments