I want to learn web development. but i’m stuck in choosing the language (PHP or Ruby). I heard about Laravel I think it is interesting and I also heard that it is same as Rails. So I think which will be a better choice to learn Laravel or Rails framework and which has a bright future?

Thank you so much for your question.

I want to start my answer by saying that I can’t give you a definite answer, but you also shouldn’t be stuck on this. Pick one, and if you want me to pick one for you to make it easier, pick Rails. There are a lot of good resources out there for learning Ruby and Rails and, in the end, learning programming is learning programming and you need to start somewhere.

But, to give you a more detailed answer, we need to look at why you want to learn programming and I’m going to assume you want to learn it to start earning money at it. If money is truly not your goal, then go with Rails and have fun.

Most web applications running on the internet today are using PHP. Anyone who says otherwise is lying. Most of the popular content management systems that people and businesses run are in PHP (including Drupal, Joomla and WordPress) and almost every web host supports PHP where as very few support Ruby or Python without a lot of painful set up. This drives most businesses to use PHP applications rather than Ruby due to it being just plain cheaper to do (both in hosting fees and in developer fees). It’s cheaper to run a Joomla site with a bazillion plugins and buy a couple of customizations than have a custom CMS built in Rails.

Because of this, there always seems to be demand for PHP developers, especially at the low end. If you imagine the web programming market as a scale, from people wanting small tweaks to an already built website or application up to large enterprise applications that take huge teams and many months to complete, each programming language naturally fits in at different levels.

Java and .Net live at the top. Every Fortune 500 company uses one of these languages almost guaranteed in their IT department. If that’s where you plan to end up, either as a contractor or as an employee, I would recommend looking into those.

Look at big web properties like Google, Ebay, Facebook, Twitter and Amazon and they’re using Java too. But they also have a lot of systems in languages like Ruby, Python and PHP. Typically, they have their massive back-end systems in Java and C++ while the actual web application is in Ruby or PHP. citation provided

If you look at smaller start ups, you see a lot of Ruby on Rails or PHP. This is where most of the Ruby on Rails developers are that I know of.

Then you have everyday business people, blogs, businesses where their number one things isn’t IT, etc. This is mostly dominated by PHP. Like I said above, most of them just want something that works and by building on a base of feature rich, open source web applications like Drupal, Joomla or WordPress, they can save a lot of money but still get things that help them get their work done.

The key when looking at what to shoot for is to realize that the bottom of that scale has massively more jobs available than the top of that scale. It’s way harder to get a job at Google than it is to get a couple of side gigs setting up someone’s website. The pay is different, of course, but you need to move up a ladder in this business anyway and the more experience you get, the better clients you can get and the more you can charge.

If you want to have programming paying off sooner, rather than later, focus on the bottom of that scale and learn while someone pays you to help them. As I’ve said before, once you learn a language, picking up another one is a lot easier. Don’t think that this one decision is the last one you can make on this. I have a tutoring student that started off learning Java and then moved into picking up Ruby on Rails. Now he’s doing Python and loving it. Once you learn programming, the jump to a new language is easy in comparison.

Bottom line: Get started. If you think you want to make money sooner rather than later, learn PHP and Laravel. It’s a great framework and I would put it up there with Rails in how feature rich it is. Also, the PHP skills you learn along the way will transfer to some of the most used software in the internet today for businesses of all kinds. But Ruby on Rails is more fun and maybe even a little easier to pick up (although getting it set up on your computer is the definition of pain. I suggest you use Cloud9 to skip the headache while you’re learning.)

I will be continuing my tutorial on Laravel now that the holidays have wound down as well. Be sure to check that out.