CSC/ECE 517 Summer 2008/wiki2 1 mf

From Expertiza_Wiki
Revision as of 02:12, 24 June 2008 by Mdfrisch (talk | contribs) (→‎PHP)
Jump to navigation Jump to search

Ruby vs PHP

While Ruby is fast growing in popularity, there are still more PHP Web applications communicating with MySQL dataases. Compare Rails with support for Web applications in PHP. Which are the advantages of each for the developer? For the finished application?

Advantages for the developer

Ruby on Rails

  • Rails is easy to develop - With so many common features built in and a very logical language set Ruby on Rails is one of the easiest languages to pick up out of the blue and rapidly develop.
  • Ruby code is nice and concise - Many operations that take multiple instructions in PHP can be done with one in Ruby. Best example: iteration.
  • The framework takes care of a lot of the thinking for you - Model handles database interaction, check. Controller handles processing of input stimulus, check. View provides the interface, check. It is incredibly plainly set forth how to build a Rails web application.
  • Ruby is the epitome of OO - Everything in Ruby is an object, everything. Ruby was specifically built around this principle.

PHP

  • Availability of code snippets, assistance, and documentation - PHP is a much more popular and widely used language than Ruby on Rails. With that comes the huge advantage of a large developer base: near limitless help and support for a problem that some else has much more than likely already experienced.
  • More control - with PHP you are not stuck trying to make your application fit a framework. You can make you application do what you want however you want to do it. If you are good at what you are doing you can still have beautiful code without a strict framework trying to get you to design/develop properly.
  • PHP looks familiar - Know C, C++, or Java? The syntax is very familiar in PHP which makes the switch very easy. Know *nix commands? A lot of them are functions in PHP that do what you'd think that they do. This makes ramp-up time in PHP very quick for an already seasoned programmer and/or *nix user.

Advantages for the finished application

Ruby on Rails

  • Rails is easy to maintain - Sharing quite the same reason as being easy to develop, Rails is very readable and easy to pick up. You can eyeball code and know what it does. The framework also aids in this because you know exactly where to look for the functionality that you need to add to or revise.

PHP

  • PHP Scales

References