Archive

Posts Tagged ‘rails’

PHP vs Ruby on Rails (RoR)

June 2nd, 2009

Well people have been asking me lately about this Ruby on Rails (RoR). I often receive questions such as “What is RoR?” or “Is it better than PHP?”. Well, Ruby on Rails is another web programming language, but is not widely compatible across all web servers, but is increasingly becoming so. Personally, I am more of an advocate to PHP, but we’ll try to get the facts straightened out.

To begin, I’m going to assume everyone knows the basics of PHP. It’s fast, efficient, integrated with the webserver, etc. But for those of you completely unfamiliar with Ruby on Rails it is made by the “Ruby Core Team” (of the Ruby Programming Language). The format of the language is similar to Python if any are familiar with that. Ruby generally runs on its own server, separate from the general webserver-to my experience anyway.

So now that we have the basics down about each let’s go over the weak points in each and strong points. We will begin with the weak points to Ruby on Rails. Since it runs on it’s own server, it makes it more difficult to readily integrate with a site: obviously. Also, for those of us who prefer the nice C/C++ style programming, you can forget it with RoR. You will definitely end up using “end” much more than you would care to admit with this language. Compatibility across servers is more or less low. Most servers do not provide the RoR service, so that is also a downfall of RoR.

Likewise, PHP also has its faults. Since the language is so widely used and installed on practically every serer on the web, it allows for more holes to be more easily and quickly found. This means more frequent updates (which could be good if it does not become a nuisance) and since it is integrated with the web server, that also means long patch times. Depending on how you have setup PHP, you may even have to recompile the webserver. Normally it doesn’t cause a great problem for most servers because the old version doesn’t remove until the new version is finished compiling, but it greatly increases server load. For webhosts, this could cause a problem because this means that they have to go down for more server maintenance time. Also, unfortunately for PHP, every time one wants to add a new feature (example add ziplink support or something) they would have to recompile PHP.

Although both have their faults, both also have very strong points. Again, we’ll begin with RoR. RoR, again, since it’s not integrated means little downtime if it needs to be updated. Also, it is similar to Perl in the respect that it can download modules quickly and easily. Ruby, growing more popular, also is easier for users who are entering programming. It definitely scores an A+ on the entry level programming language level and pretty powerful with simple code.

PHP, on the otherhand, though a little more complex has its key aspects. There is mass compatibility with PHP. As mentioned earlier, pretty much every server on the web is PHP enabled. It has become the web standard over the years. Another benefit, since most open source software is programmed in PHP, is one who knows it can make their own program modifications and customizations to most open source programs. Above all, the support over the web is great because users all over the web have a deep understanding and knowledge of the language and are willing to offer free help on forums all over the web.

So all in all, both languages have their ups and downs. Ultimately, it is your choice to decide which you would rather learn/install on your server. Peronsally, I would go with PHP simply because it’s more available and there is a greater user base to help you. If you are looking for custom projects to be made, it may also be much easier to find a programmer to do work for you if you’re looking for PHP. But if you have never looked at programming before and cannot seem to grasp the concepts of PHP, Ruby may be a good alternative to start learning how programming should look and feel.

Regards,
Dennis M.

admin Other, PHP, Software Reviews , , , ,