PHP Eats Rails for Breakfast

Avatar

Robin Luckey

over 3 years ago

This thread is for discussion of the article PHP Eats Rails for Breakfast


Avatar

Adam Kennedy

over 3 years ago

The reason for the huge increase in PHP is that PHP projects like Content Management Systems go through huge social upheavals and fork into seperate projects on a regular basis.

For example, take this one

http://next.ohloh.net/projects/14

NOBODY writes 1.4 million lines of PHP on their own in one year.

Either your PHP "lines of code" scanner is whacked and can't handle projects like that (i.e. it is including HTML or something) or you are essentially massively amplifying the line count as large PHP projects fork.

Joomla! is a nother example. Millions of "lines of code" in one year? It's just not possible unless you are forking other projects outright.


Avatar

pulse1014

over 3 years ago

1st of all comparing PHP to Rails or Django is stupid. PHP is a language not a framework (Cake would have been more appropriate). 2nd given flame war invite nature of the article, quantity does not always indicate better quality. That's like saying Windows is the best because most people use it, or Java kicks PHP's ass because a lot more developers use Java than PHP.

There's nothing wrong with posting an article about usage trends, but it's not good to make very generalized inflamatory opinions on things that you are not very familiar with (which I concluded based on your two previous mistakes).


Avatar

slam

over 3 years ago

As long as we don't tag every line of code with an author & license comment we will never have a chance to produce serious stats here. Every coder is grabing code from others and is using it his one code - sometimes just part of a short line, sometimes thousands of lines. And - as already mentioed - forks start with an existing code base others (or the same people!) created.

Open source code tends by design to mix and merge and split, and that is one of it's biggest advatages over other development models as it ensures much more flexibility and faster development. However, for bigger forked projects we could try to deduct the code taken from other still existing projects.

Greetings, Chris


Avatar

bballantine

over 3 years ago

I'm not an advocate for one particular framework or another. Frameworks are tools and you should always try to objectively choose the best tool for a job. Notwithstanding all of that, I think lines of code are a useless way to compare something like PHP and Rails. Unlike an earlier poster, I think PHP can be considered a framework--the mysql stuff is baked right in, for example--but it just doesn't do things as efficiently (in terms of lines of code) as Ruby on Rails because PHP is just more verbose than Ruby. Also, PHP alone doesn't do ORM a la ActiveRecord. At one point an assertion is made that "the rise in new code as a consequence of maturing code bases." One could counter that a maturing code base should require less and less new lines of code.

My quick analysis is the reason that there are so many more lines of PHP code than lines of Rails et al code has more to do with PHP, the language, the platform, and its history, than its popularity. Moreover, you see an increase in lines of PHP code as old sites (written in PHP when that was the only choice), scramble to add new functionality (AJAX, of course) that is baked right into some of the more modern frameworks--your other graphs support this analysis.


Avatar

xandross

over 3 years ago

I think the author (or even the website) is trying to invite more people to sign up to this website so they can "boast" they have a strong "user-base". You know, a'la web 2.0 so they can start putting advertisements or trying to get buy by some big corporate site. Out of 5 comments, only 1 guy has 6 posts, the rest only have 1. That shows they're capturing the interest of others to come to their website and join.

This is a poor research. Ohloh.com, you won't get the publicity you deserve (and a quality community) if you do things like this. The best thing you can do is to fire your marketing or PR people (or whomever decided to take this route).

I agree with adamk, this stats is very whacked, it doesn't say whether it counts long comments, forking, and the nature of the language used. Mambo and Joomla are based on the same code but the author counted them as a separate projects thus adding the number of projects and lines of codes to the total average.

Did you guys just take STATS 101 at local college? Make some correlation, make some prediction, more graphs for pete sake. You don't make a conclusion without showing correlation.


Avatar

shopping cart software

over 3 years ago

A few things:

  1. Think about all the PHP apps already in existance today, compared to rails apps. That can also explain the diffrence in the graphs.
  2. Also, realize that the amount of code written in Ruby on Rails is often significantly less, which is part of the atraction of Rails.
  3. In response to previous comments, there are PHP frameworks very comparable in nature to Ruby's. Buscuit detracts too much, and Symphony is great, but on PHP on Trax, or we should say PHP on Rails (http://phpontrax.com) is the only one I know of (and Akelos maybe) that are true ROR clones...

Just my 1 cent the (http://veracart.com) shopping cart software guy


Avatar

viyyer

over 3 years ago

interesting you have not talked about typo3 ...

it seems to have more manyears of development into it.


Avatar

jedhurt

over 3 years ago

Recommended Reading: http://en.wikipedia.org/wiki/Argumentum_ad_populum


Avatar

Martin Langhoff

over 3 years ago

I work a lot on PHP and Perl projects -- and you have me pretty well profiled ;-) and I have nothing for or against either.

But I think your metrics are wrong.

Most Perl projects are published mostly packaged in library-centric ways in CPAN. Whole CMSs are published this way, and what you do is add a few mod_perl config options to your apache config. So CPAN is where the action is for Perl code. Unfortunately, as CPAN doesn't have a centralised SCM, it's very hard to track. I cannot see any evidence of ohloh tracking CPAN at all.

In the case of PHP, most of the work is happening in environments like SourceForge that are easier for ohloh to track. This is because there is almost no code in PEAR (perhaps because the PEAR repo is much newer, the tools greener and the approach rather elitist). So the level of libification is lower and people just copy code around a lot more. In that sense, the approach is less sophisticated.

Perhaps PHP still has more dynamic -- I don't know. But your stats don't include the main repo where Perl code is being developed/published, so there is no way to tell.

regards

martin


Avatar

ywarnier

about 1 year ago

Is Java so low in the stats that it doesn't even appear? Just wondering... What is the proportion of other languages in these charts? (C, C++, Java, whatever...) Statistics are never easily interpreted and I think most of us know it, but it's always nice to have some at hand, so I consider the article a good thing overall. Is there a way to access global statistics like this on a dynamic page?


Avatar

Robin Luckey

about 1 year ago

ywarnier,

I think you might be interested in the languages comparison page.


Avatar

Forest Bond

3 months ago

Comparing lines of code may not be very valuable, because some languages are just plain more verbose than others (in this case, I think it's fair to say that PHP tends to be more verbose than either Python or Ruby).


Avatar

Robin Luckey

3 months ago

@forest: Agreed. For most of our own internal data wrangling, we look at the number of commits rather than the number of lines of code. The number of commits tends to better represent the amount of work invested in a project.

That's why we go to the trouble of processing the source control history, and we don't accept tarballs for processing.