Should I learn PHP or Ruby?

You may be able to get started with a very simple site in PHP, but the language quickly shows its rough edges.

The PHP language lacks a lot of consistency.  Features and core libraries are added with little regard to any overall language design, and tend to exhibit very inconsistent behaviors between each other.

The community is largely built around splicing together a myriad of code snippets, and hacking around them until you have a mostly working product.  This is great for getting a simple site up and running, but not conducive to long-term growth or maintenance of any reasonably complex web site.

If you're interested, take a look at my more detailed analysis of the shortcomings of PHP: My Beef With PHP


Ruby on Rails is a great alternative:

Ruby is a fantastic language that many people find to align well with their mental model of things.

The Ruby and RoR community are fantastic.  Best practices are constantly reinforced (and questioned, and updated!).  Services like heroku make getting started painless.

Some getting started resources:



However:

You may not want to rule out other options!  There's other Ruby frameworks out there, like Padrino.  Python web frameworks like Django (web framework) or Pyramid (web framework) are options too.  Node.js may not be quite ready for newcomers, but watch it, it'll be pretty good in a few years.


Final note: PHP may be a programming language, but it is really a very basic web framework, too.  It performs the same role as a web framework in any other language.  The terminology makes things a bit confusing.

No comments:

Post a Comment

Genuine websites to earn money.

If you are interested in PTC sites then this article is for you. I have personally tried many of the sites and found that the best thing ...