Solved

Why has Ruby On Rails gained so much ground over PHP?

Posted on 2012-03-20
4
709 Views
Last Modified: 2012-03-21
A year or two ago I remember PHP a language everyone wanted to learn and now that I'm looking around again at web languages it appears like Ruby On Rails is the hip new thing.

What does Ruby On Rails have that has caused everyone to flock over to the new technology. I thought PHP has MVC frameworks. Am I missing something?
0
Comment
Question by:Eindoofus
  • 2
4 Comments
 
LVL 24

Assisted Solution

by:johanntagle
johanntagle earned 125 total points
ID: 37747021
Obviously you will get subjective answers to such a question.  Besides enabling rapid development, I think it's because the Rails framework espouses popular methodologies like Agile, iterative and test driven development.  If you follow Rails development best practices, you already practice these methodologies.  Another would be convention over configuration - Rails has predefined conventions where to put most of your code - so you can concentrate on developing functionality vs spending time thinking how to lay out your code.  

And oh, Rails was already hip as early as 4 years ago =)
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 37747143
No, you're not missing anything.  PHP has MVC frameworks.  ROR is (much, much) more object-oriented and is, to put it bluntly, a more professional development tool.  

PHP was designed to be the easiest language to use, and as a result it has a lot (millions) of adherents who have no clue about the principles of computer science.  You can learn a little and build a web site that will "do something."  But as Alexander Pope noted, a little learning is a dangerous thing, and these novice sites will often have security holes, or will be unable to scale, or will produce incorrect output.

ROR was designed to be the best language for prototyping.  A consequence of this design is that you need to sit down and study ROR before you can start using it.  By favoring convention over configuration, it means that you have to learn and use the conventions.  To the individual who knows nothing of computer science, that is a daunting learning curve and PHP may appear to be the easier path to some kind of functionality.  

The ROR conventions are fairly well thought out; almost any site can be prototyped successfully.  But some of the early catastrophes suffered by Twitter can be laid at the feet of Ruby on Rails.  It's only a one-size-fits-all solution up to a certain scale.  Then you need bespoke programming when you want to go big.  In contrast, PHP is used for all of Digg, much of Google and Yahoo, all of Facebook, etc.

And as johanntagle correctly notes, PHP has been around for a long time (I built my first PHP web site with PHP3 in 1999), whereas ROR is a product of the new millennnium.  That alone would argue for a surge in its popularity.  An older programming language, COBOL, rose to great popularity in the latter quarter of the 20th century.  It rose to great popularity largely because it was supposed to be "self-documenting" since the variable names could be long enough to spell out human words.  Each age has its values.
0
 
LVL 20

Assisted Solution

by:virmaior
virmaior earned 125 total points
ID: 37747346
Both johanntagle and Ray note some things that are true about the rise of RoR and the weaknesses of PHP.

One thing that is worth mentioning is that the RoR prototyping does tend to scale better when written correctly but again this is because RoR makes you write better code whereas PHP merely allows you to write good code (and permits you to write junk).

A further factor to consider is that RoR is trendier than PHP right now ... but don't be fooled by trends. My father is 70 and was a COBOL programmer earlier in life. He last did COBOL programming in 2009 -- and the going rate is great because there are still tons of systems out there and non-COBOL programmers don't generally know how to do it.

I don't think PHP will disappear any time soon and as Ray points out it has some big systems using it too. It's weakness is that if I hear someone writes in PHP, I don't know whether they are a script kiddie or someone with a good grasp of the theory. When I hear someone programs in RoR, I know that the code they produce is going to be easy to work on (in general).
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 37747519
permits you to write junk
;-)  No kidding!

In general, for all the reasons virmaior notes, ROR programmers get paid more than PHP programmers.  That may produce an incentive for multilingual programmers to recommend ROR over PHP - it automatically moves a programmer into a more prestigious zone.

The only thing I might add to this discussion before I sign off is that ROR has not really "gained ground" on PHP in absolute terms.  It had a faster rate of adoption and growth in recent years.  This page is informative about the trends.  See especially the "Hall of Fame" part for an historical perspective.
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now