Decaflon

Welcome to Decaflon! Where the geeks hang out: Signup or Login Here
Decaflon is proudly hosted by (mt) Media Temple.  We recommend them for your web hosting needs.
Clips: Popular Clips Upcoming Clips Notes: All Notes

Great article at http://www.ohloh.net/

Despite all this crazy web2.0 buzz around ruby, PHP is more dominant than ever.

Go PHP

Mmm... php developer feel good'ism. "PHP Eats Rails for Breakfast" is quite a claim.

Let's take a look at the "New Lines of Code" graph. There are a lot more lines of PHP code being written in comparison to Rails code. Interesting. In my opinion, a Rails app is generally more concise, and will create a lot fewer lines of code in relation to a similar PHP app. So generally, I'm guessing there's a lot more lines of PHP code out there. And also I would suspect a lot more PHP is being written because PHP is installed on nearly every web server on the planet.

Now, let's look at the "Active Developers" graph. PHP took somewhat of a dive in 2005, but is now climbing again. Rails went up a bit in 2003-2004 but appears to be holding even now. I don't have any smart remarks for this graph. Other than, obviously, if your a PHP developer, you're not going to be out of a job.

Lastly, the "New Projects" graph. We see a huge spike in Rails projects. We also a smaller incline in PHP projects. Some might explain this is a sign that PHP has a lot more mature libs and this code is being reused. I can definitely see that as a possible reason. I think the high percentage growth in Rails is indicative of a good amount of growth in Rails.

I think the results of this survey is pretty obvious. The proliferation of PHP on servers, makes PHP an easy choice for a lot of web development. I think we can agree that Rails has a long way to go in this department. That is not to say that there aren't a lot of new hosting companies trying to make it as RoR hosts. Rails is young, it has a ways to go, I think that's what this article is trying to say. To say "PHP Eats Rails for Breakfast" is like comparing GM to Toyota/Honda about 10 years ago and saying that GM is selling more cars. Well, of course they are. But Toyota/Honda are future thinkers and are making cars that are fuel efficient and don't break down as often. They will go places.

First off, lines of code is a terrible measure. I can accomplish the same functionality in 1/100th the codebase in Rails because it is a framework and PHP is not. Not to mention Ruby is reknowned for one-liners that might take a dozen lines of PHP.

Secondly, I've never heard of this service. What data are we comparing against? For all I know it's an "open source community" targeted towards PHP devs. It's like asking Wordpress users their preferred language -- I bet it's PHP. For example, check out book sales: http://radar.oreilly.com/archives/2006/08/programming_language_trends_1.html That paints a whole different picture.

Thirdly, who cares? If you're busy bashing Rails, or trying to justify using PHP, you're too closed-minded to benefit from Rails, so just part ways and keep using PHP. Hell, people are still coding in Perl. Change isn't for everyone.

I'm really sick and tired of people comparing "Rails" to "PHP." Those who do don't know what the difference is. Rails is a framework based on the language "Ruby." PHP is also a language. You can compare Ruby to PHP or you can compare Rails to Cake, Symphony, or any other framework out there, but please DON'T compare apples and oranges. There's nothing to gain from comparisons like that.

I don't know if these graphs really say anything about PHP's growth. Rather, the increasing number of new lines of code seems to show that a large number of people are still coding in PHP from scratch without a framework, reinventing the wheel with every new application. This doesn't tend to happen as much with Ruby, probably because most Ruby developers are using a framework (Rails) to build their applications, cutting down on new code, so it would only make sense that new lines of code aren't rising as rapidly.

"crazy web2.0 buzz around ruby"

Yeah, because more users always equals better quality. Just look at XP/OSX..

RoR is the orange and PHP is the apple. They are both for Web development. Who cares?

Persoanlly I think PHP is a bit easier since it's more widely accepted and it doesn't have as much going on.

I'm not going to tell you to quit Rails. It's like the Windows Vista vs. Win XP argument, or Baskin Robins 31 flavors deal. Everyone will take what they want.

And using number of lines is such a bad determining factor. Once it gets run and its output sent to the user, who cares?

I agree with michaelper22 and I would rather see people use languages they prefer to develop than forcing themselves to use an alternative because it's dubbed as 'better'.

Also - a sharp increase in projects started is surely because it's a new language that is being checked out by developers? I know for one I will be checking the language out in the future just to see how it feels.

Rails is neat. I run a rails app on my server, it was convenient, fit my needs. It's terribly slow compared to the dozens of php apps also running on my server, but it's not so slow that it's unusable.

I think rails is a good framework, with poor implementation. I think Ruby is a fine language, as is php. Php has the benefit of being around forever, so it's rather optimized and integrated with apache at this point.

With any framework you gain development/deployment speed at the cost of either flexibility or performance. In the case of rails I'd say the hit is taken in performance. With my php framework it's taken in flexibility. Basic apps can be made and deployed almost instantly, but the more complex/exceptional they are the more development time required.

For the forseeable future I will not be using rails for any professional deployment, but have high hopes for it's future.

... ... ... I'm terribly confused by michaelelper's comment about nothing going on with PHP. Are we saying that evolution is bad? Stagnation is good? Why aren't you developing using Perl or COBOL? Hmm... actually, you should be working with ASM since the x86 architecture's pretty stable and immune to change.

RoR's base functionality remains the same. There are new features added, and some things deprecated - but for the most part everything that you've always used remains the same from version to version.

Who cares that they're different? People comparing. You can't make a comparison of two completely different things. Much like you can't intrinsically compare the int 12 with the string 12, you can't compare a language with a framework. There's /so much more/ going on in the framework that it's absurd. Lines of code would clearly be smaller if they had compared 'Cake' with RoR.

Who the hell thinks more lines of code is /better/? "Oh, this could have been one recursive function but we decided it would be better to break it out into 60 different functions each slightly changed. Maintenance? What's that?"

jhuskission, RoR is not a language. It's a framework. Ruby's been around for a long time as has Rails. I don't think it really qualifies as 'new' after two or so years.

I have the belief that there is always a right tool for the job. Ruby on Rails has it's place as does PHP as does C as does ASM as does BASH scripting. The argument shouldn't be 'which is better' or 'which eats what for breakfast*'; it should be 'which is better /for this task/'.

* I personally don't want to run an interpreter that tries to eat my other interpreters. It's just bad manners.

Ozone42; Are you using lighttpd and fast-cgi? I've never noticed a performance problem in well written RoR apps. I mean sure, it's slower due to the framework overhead - but I've never seen it noticeably slower without a reason. Are you running the app in 'development' mode or 'production' mode? Development is markedly slower than production as it fails to cache and adds in a lot of debugging hooks.

Production, yes to fast-cgi no to lighttpd - that's not an option. I only use apache in production servers.

I realize lighttpd increase performance substantially in rails apps, but that's simply not a solution, it's a workaround for a flaw.

I was just outside and I suddenly remembered this conversation and lines like ...in Rails because it is a framework and PHP is not.

Over this debate a lot of different fruit has been mentioned. PHP has been called an orange; Ruby-on-Rails an apple but I put it to you now that neither of them are fruit at all -- they're both webdev frameworks.

When defending PHP and its inadequacies people always whinge "PHP isn't a framework!!!!1 It's a language!". The problem I have with that is PHP does a lot. PHP isn't just a syntax. It has built-in libraries for doing just about everything under the sun and most of that is focused on web technologies.

Just because it doesn't do things as well as other frameworks (read RoR or ASPNET) isn't our fault but it doesn't make PHP so special that it gets to enter into the flyweights' ring when it's a blubbering super-heavyweight.

Oranges:
Ruby is a language.
PHP is a language.

Apples:
Rails is a framework.
symfony is a framework.

While PHP may be an extensively featured language (to a fault in some cases), that doesn't make it a framework. And if it *is* a framework, what exactly does that make symfony or CakePHP?

If you're saying that PHP has enough features that it should be put into a adversarial competition with Rails (at which it fails), then what happens if you compare Ruby and PHP?

To stretch the analogy capacity of this thread to its limit, California is a state.

However, it has a large economy, takes up quite a bit of geography, arguably has its own culture, etc. In fact, in most of those regards, it actually competes with countries elsewhere in the world. It's bigger than many countries, has a higher GDP, more people, etc. However, if I started comparing Germany and California and asking "which is better?", most rational people would rightly end up suppressing the urge to smack me.

Rails is a Model-View-Controller framework built on the Ruby programming language for building web applications according to that architecture.

symfony is a Model-View-Controller framework built on the PHP programming language for building web applications according to that architecture.

Just because you may think that California is big enough that it *should* be considered a country doesn't make it so.

Now, all of that said, I really hate the words "better" and "best". "Better" is a weird artifact of some overly dramatic need to frame everything as a 2-sided issue.

People love to find a fence and argue with whomever is on the other side of it. Me? I'd rather sit on the porch and drink iced tea instead. From the porch you can see the patchwork quilt of fenced in areas, all filled with people arguing with each other. Some areas are filled with green grass, others filled with trees, others have a lake or a stream.

One's not better than another on some sort of objective scale. If you're thirsty or looking for fish, one of the areas with water is probably pretty good for you. If you've got a horse that is hungry, one of the meadows will probably work for you. If you've got a good book, you'll probably prefer to sit under a tree in one of the wooded sections.

The problem usually comes when the thirsty person finishes drinking and notices the person with the horse heading to a different section and decides to convince them of the wonders of the stream.

Gotta go. The analogy quota's been exceeded and I'm about to get a ticket.

what exactly does that make symfony or CakePHP?

A framework based on a framework. They do exist elsewhere, you know.

what happens if you compare Ruby and PHP?

The universe implodes from a rip in the time-space continuum. It's not pretty.

You can only compare likenesses. Syntax, code performance, etc. When you compare PHP and Rails you can compare web performance, database access, method structures and process hooking.

When you compare different MVC frameworks, you can talk about how they differ and how one might be better than another.

Things don't need to be in just one box. The term "PHP" represents the language and the framework. RoR and Ruby have their own names. We're different people but we wouldn't compare ourselves based on a different metric.

if I started comparing Germany and California and asking "which is better?"

This is a problem with the method of question, not the classification. You could easily compare each based on their respective matching powers just as you can rank them based on something that might be good in one but is missing from the other -- but this is very individual, as you say.

I don't take issue with people trying to compare the two. People need to know what's best for them so they can make decisions. Why can't you compare PHP against Rails when you know what you would need from them? If they wanted a comparison between PHP-base frameworks like CakePHP and symfony they should specify that.

But my beef is with people that try and use the apples and oranges argument when PHP is just another apple in this comparison. We're comparing them based on their ability to perform in for webdev.

Gotta go. The analogy quota's been exceeded and I'm about to get a ticket.

/me gives jwynia a ticket

The first chart in that article was measured by amount of new lines of code written. While the chart, at a quick glance, makes you believe PHP is the winner, it just means more lines of PHP were written. Anyone who has worked with or seen RoR knows that the amount of coding needed compared to PHP, in most cases, is minuscule.

I don't think the research was meant to label one better than the other, just to disclose the trends of programmers using each. They are both separate languages who can do many things, and its more of a matter of choice. In fact like Jwynia said Rails isn't even a language per-se, its a Framework.

To compare the two in terms of best and worst just isn't right, its all just a matter of opinion.

Please Login To Leave A Comment

Decaflon Sponsors Get in touch if you want in.

Hot Notes (View all »)

 

Decaflon is part of the Chawlk Network of sites.

9 Great Places To Visit, Hang Out, & Meet New People

What's new and interesting at other Chawlk Network sites: