Saturday, August 18, 2007

PHP vs. RoR or Python

First: size matters.

As I understand it, and correct me if I am wrong, PHP was designed for relatively small, simple web applications and as such is reflected in its small, simple core.

Ruby, and RoR, as well as Python are true 3GL languages with applications across web and non-web domains.

Then there are frameworks, but that is another post.

Second: productivity

Related to size, how fast do you want something functional? Sure, as fast as possible, but at what cost and risk level? You can have your cake, but it's awfully darn expensive cake!

Third: runtime performance and scalability
I link these two, though you can have a fast application that doesn't scale and a slow application that scales huge. Both might be useful for some niche purposes, but for my world, most applications fall between the 2.

Feel free to chime in...my gut feel is that PHP suffices for projects that are 1) rather small, where small let's assume is less than 500 FPs, 2) rather static, where static doesn't mean like static HTML, but rather, a single purpose app that will undergo changes, but not be more than 1 or 2 things.... I DO expect lots of small tweaks, and in fact, that's why I'd pick PHP over Java since it's light and simple to change/hack 3) mostly UI, not much back end analytics or algorithmic code, and 4) interconnected to other web services and sites.

Oh sure, Java folks will beat me up, but I've earned my rank in Java and seen what it is good for and not, and still use it today. So let's not go there.

Your comments, data, facts, figures, observations are most welcome.

2 comments:

Paddy3118 said...

PHP: Language for the web domain.
Python: Gen. purpose programming language.
RoR: Web framework in Ruby.
Ruby: Gen. purpose prog. Language
with RoR as main tool.

What are you trying to compare?

Robert A. Ficcaglia said...

Specifically for a web application - not just a site, but with logic and various tiers of features. Still, nothing so complex as to be a large team effort. I think I mentioned before, anything less than 500 FP in size - so figure about 5-6 person months in effort. If it were a simple static web site, sure, PHP hands down. If it were a very large, complex app - RoR or maybe even Java. The devil is always in the grey areas. Not too small, but not that big. That's the real world though!