Is Ruby the dog and PHP the dogfood?

Is PHP doomed?


Terry Chay” by Chris Shifflet

Giving my talk: “The Underpants Gnomes Strategy Guide: An e-cards case study” at ZendCon 2006

[A real pissing contest after the jump.]
The problem is that Jeremy Privett is following the PHP internals mailing list. If he bothered to look at the archives he’d know this crap is as old as time and just as publicized back then as now. There were just as many egos then as now. Heck, some of the egos are the same.

See the forest from the trees.

Do we honestly think anyone cares what people say on php internals?

Cute girl: “What do you do?”
Me: “I’m a PHP Software Architect.”
Cute girl: “What’s PHP? It sounds like a drug.”
Me: “No, it stands for PHP Hyper… nevermind. It’s a web language.”
Cute girl: *blank stare*
Me: “It’s the thing that powers more websites than any other language.”
Cute girl: *blank stare*
Me: “Umm, it powers Yahoo!”
Cute girl: “Oh!”
*dead silence*
Cute girl: “Hey, does it ‘power’ MySpace?”
Me: “No, they use dotNet.”
Cute girl: *turns the other way and starts to talk to the other guy*

Terry Chay and Caitlin Weigel

And people wonder why I’m single. 😀

It’d be very shortsighted to judge the health of PHP from the internals mailing list. (Corollary: Don’t try to pick up a girl using PHP, reality <> fantasy.)

PHP should be more like Ruby (on Rails)

“As much as I hate to say this … You guys really need to take some advice from Ruby Devs.”
—Jeremy Privett on PHP internals developers

Yes, and maybe if we work really hard at promoting ourselves we can get a developer to create a site using PHP that will reach #700 on the internet that fails so often that they’ve ruined the cuteness of cats.

Oh Rasmus, why do you engage in this “virtual crap-flinging”? Can’t you lead by example like David Heinemeier Hansson? That guy is the height of maturity and an expert scalability guy.

The PHP Sky is Falling! If PHP doesn’t get it’s act together Rails will unleash their dogs of fury.

Who let the dogs out?

“First they ignore you, then they laugh at you, then they fight you, then you win.”
—Mahatma Ghandi

OSCON 2005:

“Unless you’re Ruby.”
—Danny O’Brien, “On Evil

state diagrams

OSCON 2006 (Year of the Dog):

Out with the dog

This quote got me into a lot of trouble:

“Ruby is really good at what it does. The problem is, for what Ruby does really well, I can download WordPress. [Ruby is] really good at building those apps that have already been built before. PHP is good at finding out what the next WordPress is.”
—Terry Chay, “Interview with Terry Chay”, Pro-PHP Podcast

I was born in the Year of the Pig and it’s my year now. Out with the dog!

Revised Ruby on Rails state diagram (2007)

Here is one for you:

  1. People like me are smart and have to run extremely large scalable internet infrastructures.
  2. People like me have used Rails.
  3. People like me don’t use Rails to build extremely large scalable internet infrastructures

To the Rails developers that’s an inconsistent triad. They’ll say I’m actually dumb and I don’t “get” Rails. To me, it’s completely consistent (They’re right about me being dumb, but that’s what makes me smart):

And I’m going to tell it like it is:

Let’s have a little reality check. Yahoo! is #1 on the internet. Heck, even Tagged does way better than than #726 (#92 today, after a series of really bad site outages). And Tagged isn’t even close to the largest website written in PHP in its space (That belongs to #18, Facebook):

twitter vs. two PHP typical sites

I remember before Yahoo! adopted PHP, every small site that I could find that used PHP I was shouting from the mountaintops—“NASCAR uses PHP!”

Twitter may be at 700, but it’s a great product and it’s probably the largest Rails installation on the internet. Before that it was…what was it? Oh yeah! 😀

And how about that David Heinemeier Hansson guy? What a great guy huh?

If I were David Heinemeier Hansson, I’d be fellating Alex Payne right now for proving that Rails can scale, as long as you rip out all the stuff that makes Rails attractive in the first place. (Think of it this way: How many twitter clones are there? What was the barrier to entry? How dependent was twitter on hype? If they didn’t use Rails would have the lag time for using PHP or some other language hurt? Now isn’t that something to be proud of?)

But what does this so-called master of the PR do? Oh yeah.

Remind me, what is DHH doing lecturing al3x about scalability?

twitter vs. 37 signals

Get real.

WWRD? (What would Rasmus do?) I’ll tell you what he wouldn’t do. He wouldn’t say that his largest installation can’t scale because they don’t know PHP. He wouldn’t write a book bragging a company that has never broken into the top 1000 can purport to tell you about success.

He also wouldn’t engage in this mudslinging or “pissing contest.”

But that’s why I’m around.

If Zend puts your photo on a deck of cards, you’ve either arrived in the PHP world or are a terrorist.

I’m a PHP terrorist.

Go look me up in the archives. I’m not even the one doing the pissing there. But I piss on whom I please, and say what I want, and Rasmus has to just shake his head and take it. (Hence the irony in WWRD?—get it now?)

Marking my territory by pissing on the Rails

Alex Payne isn’t saying Rails is crap; I’m not saying Rails is crap. We’re not even saying Rails can’t scale or Ruby can’t do the web.

I can’t speak for Alex, but what I’m saying is look at the top 100 websites on the internet: about 40% of them are written in PHP and 0% of them are written in Rails. (Yes, I can (and am) using this statistic to grind you Ruby fuckers into the dust.) But to me, there is an alternate conclusion, since 60% of sites out there don’t use PHP:

“The web problem ain’t that hard.”

PHP may be the best web language out there. But it certainly isn’t the only one. It’s one approach, one that stresses configuration over convention, stupidity over smarts, practicality over elegance: it’s one ugly mother f—er that gets shit done.

I didn’t choose Ruby on Rails because I hate it (I don’t, it’s a very clever approach). I didn’t choose it because Convention over Configuration is untested and unproven in the marketplace. I didn’t choose it because I didn’t want to be the guy saying “I’m not going to hire you because you don’t ‘get’ it.” I’m not going to get the Ruby religion because when it comes to languages, I’m an atheist. I didn’t want to be the guinea pig when Rails hit a ranking of 5000, or 1500, or 700, or 500, or 300, or 100, or 40, or 15, or 1 (Yahoo! and PHP, undefeated).

But al3x did (at least to 700 anyway). And that’s why Ruby on Rails world should stop having their own circle jerk and honestly address the real problems: Less “Oh, we just need to implement connection pooling or Query Cache. And, by the way, didn’t DHH just put that kid al3x in his place, that totally r0x3rd.” and more “How can we give scalable sites alternatives to Active Record? And, by the way, maybe those people who build really large websites daily have something to teach us.”

You want me to stop laughing? Then stop picking on your own and start proving me wrong!

Me, fully quoted

August 2006 (Year of the dog):

There are those answers out there and in many ways, since they’re web companies, PHP is an easy way to build those answers. Because there are things like Ruby out there. And Ruby on Rails is extremely good at doing real simple things like building a recipe database—you can do that in six lines of Ruby.

But the thing is [Rails] is a framework so you eat the entire framework when you do that. PHP has no framework. You can choose to use a framework but it has no framework. So look at the problem. You don’t start with anything [and that] hurts you initially, but it really helps down the road because a lot of these answers are not simply: let’s build an e-store and somehow magically make money. The answers you have to construct are Web 2.0-style answers, they’re not simply reducible to selling dogfood on the web—they’re more complex answers than that. So you require a language that can navigate that complexity without forcing you to eat that framework that boxes you in and colors the lines for you to build that web database…

I know it sounds like I’m ragging on Rails, but I’m just trying to emphasize the strength of PHP. I like to say that complicated systems must always have simplistic behavior because they’re too complicated for people to understand. It is complex systems built on simple ideas that can have complex behavior. And PHP, while it doesn’t have the advantages of quick-start that Rails gives you, does have advantages in its flexibility, its pragmatism, its stupidity (if you will) that allow you to build those complex systems by stringing together a bunch of simple ideas.

If there is one thing I want the listeners to take home it’s that eCards or whatever, this is just one perspective of how I built one thing. But there is a general answer there—like Louis Pasteur saying, “Chance favors the prepared mind”—there is an opportunity in the listener’s institutions where PHP is a very powerful tool, very easy to understand, waiting for the listeners to use to build these amazing complex systems by stringing these simple things that PHP gives us.

I’m really low on my scatological count here…I’m sorry I didn’t crack enough jokes or use enough [cuss words], but I’m sure people will forgive me. They can just attend one of my talks and get their cuss quota for the year. And if not, coding these web apps themselves involves a lot of swearing—a lot of blood, sweat and swear.

Ruby is really good at what it does. The problem is that for what Ruby [on Rails] does really well, I can download Matt Mullenweig’s WordPress… It is really good at building those apps that have been solved before. PHP is good at finding out what the next WordPress is, what the next CMS is, or wiki is.

It is a very configurable, flexible language for answering those questions and it doesn’t strap you in and say, “PHP. The only way to do things.” It can’t do jack without Apache, without MySQL or another database like Oracle, or Java or C or accessing the command line to get shit done. Because of that, it’s never going to tell you that you have to do it “the PHP way” whatever the hell that means as opposed to do it the way you want to because you happen to have this nice tool whether it is imagemagick or whatever.

And that is where PHP is strong.

130 thoughts on “Is Ruby the dog and PHP the dogfood?

  1. I would be much, much, much more likely to use Rails if it wasn’t such a masturbatory, self-congratulating, arrogant community. This is the kind of shit that I’m talking about:

    I have a lot of trouble using tech developed by people I find even semi-abhorrent.

    Any blog post that starts with the word “beholding” better be about a near death experience or that time you did peyote with your cousin. It better not be about some goddamn tech conference you were at:

    Beauty and significance and the search for Truth in Coding is all very wonderful, but if you can’t take the piss and have a sense of humor and irony about this programming shit, you should hang it the fuck up. You’re not curing cancer, dude, and you’re not making it *easier* to cure cancer, either.

    “It’s fun and feels good to think of yourself as a world changer. But every time I hear the phrase, I think about those street corners and back alleys, and I feel a little cheap.”
    — Chad Fowler,

  2. Ever notice the biggest dicks on hazing rituals in schools are the ones who weren’t hazed when it was their turn (their mom died or something)? It’s like they can’t empathize and have some big insecurity going on and have to lash out or something. (Is it a coincidence that the union of Mac fanatics and Ruby developers is Mac fanatics?)

    I think the attitude comes from the fact that Ruby went from “They Ignore” to “You Win.”

    Case in point:
    “Ruby on Rails is the One True Language and DHH is its only Son and Savior.” Yeah, that sounds about right.

    “PHP is the One True Language and Rasmus is its only Son and Savior.” Say that without ROTFLMAO.

    Oh yeah, and to any of you who disagree, “I have just two words for you…”

    (Thanks, Ed and others…)

  3. Rails is a golden hammer, it’s opinionated software. That’s why it’s good for blogs and online shops, just as every ROR tutorial tells you. It won’t necessarily fail when you try to run a real application with rails, but all shiny ROR feauters become more or less useless at that point, as you stated.

  4. @Davey: Never noticed. I guess DHH is more practical than I give him credit for. 🙂

    @Aaron: I quoted all the good parts. 🙂

  5. This would have made a great bookend to this article:

    (Yeah, you’d have thought it’d be my slide, but it’s actually the creator of Ruby on Rails and the two words he has for me.)

  6. Can we stop confusing “Ruby” and “Rails”, please? They are not the same thing.

    Compare Ruby and PHP all you want – but don’t pretend Rails and PHP are the same thing. Terry says:

    [Rails] is a framework so you eat the entire framework when you do that. PHP has no framework.

    Well, bingo. That’s because PHP is a langauge, just like Ruby. If you want to compare frameworks, feel free to pick your favourite out of symfony, Cake, CodeIgniter, Seagull, whatever, and then compare it to Rails. Right now, you’re comparing apples and oranges, and it makes relatively little sense to do so.

    (Also, if we do get to an apples and apples stage, please do so accurately – I’m not sure where Maarten’s “all the features in ROR are only good for blogs or online shops” comes from… ActiveRecord is slow when you have pagerequests like Twitter does… but so would anything be! Even caching the hell out of it, they’re doing a lot of requests. A lot. The pages on Yahoo that handle that sort of traffic are custom-written, one-offs, which work around the standard conventions they have just to keep up with traffic. Don’t go around saying the “features are useless” for anything other than “blogs or online shops”, because it honestly smacks of someone who’s never a) used Rails in anger, b) done anything other than Rails tutorials and c) not even read the documentation to appreciate what features might not be scaling so well. You’re not going to get anywhere in this discussion when you can’t get facts straight).

  7. LOL, you mean the WordPress, clone of MovableType, or I miss something? What will be next? Another clone.

  8. @paks: Yes WordPress, the fork of b2 which was a competitor of MoveableType and the more popular open source package for blogging (though SixApart is doing better than Automattic in the blog services space right now). MoveableType is a clone of Userland Frontier which was written Delphi for all I know. Where is Ruby?

    Wikimedia which powers Wikipedia is written in PHP is a clone of WikiWikiWeb which was definitely not written in PHP. One could also point out digg was written in PHP but is a clone of Slashdot which was written in Perl. Oh and there is chora which is a clone of ViewCVS written in Perl. And how many of us use Trac for issue tracking—it’s written in Python. If you use CVS, then it’s probably CVSTrac which is written in C.

    Oh and then there are the libraries like SimpleXML which is a clone of simplexml from Perl. And ADODB which is a clone of ADO which is written in C++. PDO which is a clone of perl’s DBI. GD which was a library written in C that was forked and merged into PHP. Memcache which was written by a Perl guy in C, but now maintained mostly by PHP shops like SmugMug and FaceBook. And PHP itself mostly runs on Apache written in C and mostly populated by Java developers.

    What was your point?

    That’s right. You have none. 😉

  9. @tom: Who is being ambiguous here? When someone says “I installed Linux.” do they mean the kernel or the entire software stack that comes with a typical distribution?

    When Thoughtworks writes “Desperately seeking Ruby talent” do you think they mean pure Ruby developers or Rails developers? When JavaOne talks about Ruby do they mean Ruby or Rails? When people compare Ruby to PHP do they mean to compare Ruby on Rails to PHP as a development platform or do they mean to compare Ruby the scripting language to PHP CLI?

    How many websites out there are built using symfony or PHPCake? In fact when people push those for highly scalable websites, I apply the same arguments against them. Maybe you think my article is therefore a tirade against general web frameworks. Fine, read it that way. I’m not going to fight anyone there because my point has always been when you pick up one end, you pick up the other—programming patterns have consequences; and so do web languages.

    Don’t purport to say that I’m being ambiguous when for all intents and purposes, Ruby on the web is Ruby on Rails. You’re going to have to accept that there is a defacto definition of Ruby for web development and it is Rails. (Aside: I often use the same confounding between Java and J2EE. It doesn’t apply nearly as much there, but Java developers don’t seem to call me out on that.)

    Rails is successful in the Ruby world because it stresses the same cleanliness and code philosophy as Ruby itself. If that idea was truly portable to the PHP, Perl, or Python world then things like symfony or cake would be far more successful than they are. Are are you going to have the mistaken belief that Ruby somehow has a monopoly on good programming talent? Because your world certainly acts that way and I find it both humorous and littered with hubris. Would you like to compare Ruby as a web development language to PHP as a web development language? Bring it on! Because at the end of the day, the web’s top 100, top 1000, even top 10,000 statistic is going to be ugly for you.

    As for what Maarten said, it was a generalization. You know the best way to make him shut up? Prove him wrong. Because if more people building websites out there listened to Maarten (and built their website from a blog or forum engine instead of building their own), they’d be better off.

    Right now there are 700 websites out there written in languages like Perl, Python, PHP, Java, dotNet and C that prove your statements about Twitter wrong. You might say, “Well they don’t use ActiveRecord. Or, if they do, they had to deal with the same scaling problems because if you understand the nuances ActiveRecord can be federated.” to which I say, “Umm, yes, that’s sort of the point of my article.” I think the whole thing is amusing. When I see all these sites trying to use Ruby to build the next MySpace, or Digg, or whatever. I’m going to shake my head. MySpace had a clever “out” for ColdFusion. What do Rails developers have?

    We have hundreds of machines at our colocation, but we certainly don’t simply say, “Oh we’ll throw more hardware at it.” When you scale up, so do the returns on figuring out on how to save money as well as the costs when you make a bad architectural decision.

    And before you think that I’m just lobbing bombs from my top-100 position (I am), realize that I have currently only one thing written on my wipeboard right now: It’s a list of website times of all the major social networks, and Tagged is the slowest by a large margin. (Even Friendster? Say it ain’t so.)

    But you see? The difference here is that this is a price (in performance) I pay when I inherit a two+ year old PHP 4 ad hoc development system. PHP encourages that sort of thing and it’s part of the terrain of developing in PHP. At least my site doesn’t go down on a daily basis like Twitter.

    Site uptime and site scalability are two consequences of Ruby on Rails development. That can be overcome, but if you’re trying to convince me that it’s simply a hardware issue or that I don’t “get” Rails, I’ll just stand on the sidelines, laughing.

  10. I agree, PHP is great, but you have to be really smart to remember 3000+ core functions, totally inconsistent function names, and writing non object-oriented nonsense like $x = some_function(‘x’, ‘y’, $x) .. some of us just need something simple and logical.

  11. @Peter: I could say that this is what IDEs and is for. That with PHP5 there is oo extensions that work, and that even in PHP4 you had resources and the resource ID is usually first.

    But instead I’ll say that I agree, because all the above talks around the reality that your point is completely valid. That’s a consequence of using PHP. See this.

  12. “I agree, PHP is great, but you have to be really smart to remember 3000+ core functions, totally inconsistent function names, and writing non object-oriented nonsense like $x = some_function(’x’, ‘y’, $x) .. some of us just need something simple and logical.”

    Absolutely, which is why you use *frameworks* — of which PHP (and Perl, and Python, etc.) has many — and/or strong dev tools, of which PHP has many (and more than most other dynamic languages).

    I’d also argue that in general language simplicity, PHP is much simpler than Ruby (or Perl, or Python). That’s an advantage and a disadvantage depending on the context.

  13. “LOL, you mean the WordPress, clone of MovableType, or I miss something? What will be next? Another clone.”

    *cough* Ruby cloned Smalltalk *cough*

  14. “Can we stop confusing “Ruby” and “Rails”, please? They are not the same thing.”

    Yes, but, the context of Terry’s post was the comparison of Rails and PHP being done by self-important Rails folks and hand-wringing PHP folks. For example:

    And despite all the “right tool for the job” stuff they try to slip in post-video, the simple fact that they named their site “RailsEnvy” tells me otherwise.

  15. Link from LeoLife.

    I think that touches a sore point with me. My problem is that Rails is often over-advocated to the detriment of many people. I’m not necessarily saying that in those cases they should use PHP instead, I’m saying they should go to sourceforge.

  16. Terry: “When JavaOne talks about Ruby do they mean Ruby or Rails?”

    Actually they mostly mean Ruby, not RoR. You see there’s this crazy idea floating around the Java world that Java is not always the easiest thing to use to solve every problem. Most people who think this, also think that so-called “scripting” languages are usually the best solutions to those kind of problems that Java is not well suited for. This seemingly illogical train of thought has led to a scripting language fetish in Java: .

    Apparently some of these Java wackos have infiltrated Sun and convinced the mothership that the best of these scripting languages is Ruby. Thus Sun “bought” the JRuby (Ruby interpreter implemented in Java) development team.

    It’s not just Sun either. The “Spring JAR” includes support for JRuby, allowing you to write an interface in Java and its implementation in Ruby. That’s obviously useful, right?

    BTW, some of these same scripting language subversives have also found an audience at Microsoft. MS wants to support both Python and Ruby as .NET scripting languages. That’s one of the big appeals of Microsoft’s Flex alternative Silverlight. You can write client side code in Python or Ruby (or C# or VB.NET.)

  17. Dear Mr. Chay,
    Your piece was provocative on two levels.

    In a good sense, it pointed out that there are limitations to Rails development, particularly if scaling is/may be a problem. To suggest otherwise would be foolish and you also underscore the fact that PHP can be a valuable tool for building dynamic web applications.

    You also point out that frameworks come at a price. And that this is true regardless of what framework you choose. Point well taken.

    But given those caveats, frameworks may really help many developers. The amount of work that can be done far exceeds the programming capacity at most places I’ve worked. Frameworks that allow you to attack problems rather than plumbing are immensely useful. Personally, I really enjoy working with Rails and as an internal developer for a university, rails can handle any capacity the university community can throw at it. The real issue is handling limited resources. In the case of Yahoo and the other top sites that use PHP, the scarcity is a combo of bandwidth/computing power. PHP can be extremely fast. In many cases the scarcity is programmers and Rails/Symfony/Django can be quite adept at helping in that regard. The point is, and you alluded to it, is that one tool does not fix all problems. It is a valuable point that many in the Rails community would do well to understand.

    On the other side of the provocative nature of your article, the tone you set came across as caustic, an I believe it can undercut the validity of points you try to make. I am new to your blog, so I must confess to not being up on the nuances of your writing and tone, but I wonder who your audience is. If its PHP folk, they probably don’t need alot of convincing. If its Rails folk, most sober Ruby/Rails folks will pass you by, and the Fanboys will get their pants in a knot. If its the Java/.Net crowd, they’ll likely take away that there are hot heads in the PHP and Ruby community, and since Ruby is closer to Java/.Net as a language, I might as well look at it (or Python) instead.

    I guess my point is that while you make valid points about the limitations of Rails and the hubris of segments of the community, the tone came across as caustic and defensive, without acknowledging the strengths, which can serve to diminish your points.

  18. @Michael: Good point about Ruby. However I’ll bet that there is more PHP apps using Java out there than Ruby. (Almost half our code base at Tagged is Java.)

    Microsoft also is toying with supporting PHP in CLR (dotNET) in addition to working closely (paying) Zend to improve IIS support in PHP, so I think Microsoft isn’t particular on what they want to adopt and destroy. That’s their modus operandi.

    If they can get OSS developers using Silverlight instead of SWF, then more power to them.

    They won’t.

  19. “BTW, some of these same scripting language subversives have also found an audience at Microsoft. MS wants to support both Python and Ruby as .NET scripting languages. That’s one of the big appeals of Microsoft’s Flex alternative Silverlight. You can write client side code in Python or Ruby (or C# or VB.NET.)”

    At his php|tek 07 talk, Joe Stagner from MS also mentioned PHP in the .NET scripting langs and client-side Silverlight scripting. I’m not sure any particular language support is set in stone, though, except the usual MS candidates. I’d personally love to do it in Python, or anything other than JavaScript, really. 8)

  20. “BTW, some of these same scripting language subversives have also found an audience at Microsoft. MS wants to support both Python and Ruby as .NET scripting languages. That’s one of the big appeals of Microsoft’s Flex alternative Silverlight. You can write client side code in Python or Ruby (or C# or VB.NET.)”

    At his php|tek 07 talk, Joe Stagner from MS also mentioned PHP in the .NET scripting langs and client-side Silverlight scripting. I’m not sure any particular language support is set in stone, though, except the usual MS candidates. I’d personally love to do it in Python, or anything other than JavaScript, really. 8)

    MS has been working quite closely with Zend on getting PHP and IIS to play nicely with one another, as Terry mentioned.

  21. @tychay via linked article in this post: “There are way too many PHP Frameworks out there. Sure PHP-Nuke/PostNuke/XOOPS are great for making a website if you don’t know PHP or have design sense, but knowing any PHP is worse than useless—the more PHP you know, the more offensive they become.”

    I’m glad someone finally said it.

    Something that really bothers me is how many frameworks came out immediately after RoR for PHP that just tried to clone RoR, even down to passing arguments as ruby :symbols. Wtf? I don’t see how that helps PHP at all, or even produces a productive framework.

    Would be nicer if these framework developers would focus more on enabling a developer to take advantage of PHP’s strengths instead of just trying to copy the next cool idea.

    Having just finished the symfony book, I find that framework somewhat rediculous in just how much non-php you are creating. YAML is cool, but really whats so hard about PHP? The framework just has to eventually compile all that f-ing yaml bs into PHP anyways? Is it because it might be slightly easier to read that is the real advantage, or is it because RoR used YAML? Probably the latter.

    Ilia Alshanestky just recently released some pdfs from recent talks, and I find it sad that many of his speed improvement tips going directly against many of the core ideas of how some of these new frameworks function (ref of using magic functions like __call). Whats the point of shooting yourself in the foot?

    I think people have a hard time getting behind any kind of framework for PHP because of the reasons mentioned above. No one has bothered to make anything that directly takes advantage of PHP, unless you consider Rasmus’ no-framework framework:

  22. One of the best long posts I’ve read in a long time. I usually don’t read such long posts all the way through, which is somewhat interesting since I usually write long boring posts. This one isn’t anything like that.

  23. “Ilia Alshanestky just recently released some pdfs from recent talks, and I find it sad that many of his speed improvement tips going directly against many of the core ideas of how some of these new frameworks function (ref of using magic functions like __call). Whats the point of shooting yourself in the foot?”

    Very often, what makes for a useful, convenient framework is also what makes it show. Things like __call make the developer’s tasks much simpler, at the cost of some performance. That’s a typical tradeoff, and one that is often beneficial. It’s unlikely your site will require great performance, and if it does, there are a number of options that don’t require ditching your framework entirely. Now if you’re running Tagged, things might be a little different, but that’s really, really (seriously) unlikely.

    You repeatedly talk about “taking advantage of PHP,” but things like __call *are* PHP features. What’s interesting with PHP is that an OOP/abstraction-heavy approach is very doable, but *not required*… and there are even some OOP-oriented frameworks that have very good out-of-the-box performance, like CodeIgniter. Many, many PHP frameworks are quite unlike Symfony, and you’re doing yourself a disservice if you dismiss everything outright.

  24. But, I should say, kenrick has a good point about way too many people trying to make a Rails clone in PHP, I suppose to prove that PHP is “just as good.” You actually *can’t* do some fundamental Rails stuff in PHP, because Ruby can do a number of things PHP doesn’t support. I *am* glad that RoR made people more aware of the power of good frameworks, but some folks went overboard.

  25. Great points.

    My counter is just that general frameworks navigate a very dangerous space between Scylla (build-from-scratch ad-hoc frameworks that are highly optimized for their problem space) and a Charybdis (download an application from sourceforge that is mappable onto the problem space).

    Seen another way, WordPress is a framework for blogs and problems mappable to blogs. Sure it’s an ugly framework that is poorly coded (I won’t defend that), but it’s a framework nonetheless.

    I linked this before, but read this again. Then realize that this guy’s business is built on Ruby on Rails. The thing he didn’t mention is we both think that Ruby on Rails has a lot of potential, we’re just trying to figure out where. When the hype levels off, the market will figure Ruby’s place. Personally, my bet is it’s somewhere with Rails applied to certain types of websites.

    I don’t deny that generalized frameworks can be highly productive and are very attractive to good developers. And I welcome to be proven wrong in my statement that they have a narrow application (so far dotNet, J2EE, and Ruby on Rails are contenders).

    I heard a podcast five months ago about this guy who created a bunch of websites originally in ASP.NET and later in Rails called docly, numly, etc. Part of me was very frustrated (I actually crashed my car), because the scale of their problem was laughable—it was basically a tiny website with 3 or four features which were themselves websites. But, the other part of me thought it made sense: if you are going to build a website for each feature, Ruby on Rails was the ideal framework to start up and would be a tremendous timesaver down the road.

    But I wonder, how much of that was self-selection?

    As for the tone being caustic. Yes, I come off that way. I actually mean to just have some polite ribbing at my fellow developers and a little attempt to push their zealotry button, and I expect them to respond in kind (the I’m PHP,I’m Ruby Get A Mac clone ads are a funny example). I’d apologize for the caustic parts but really it’s hard to hold me to a gold standard when I’m a self-described PHP terrorist and the person I’m railing against (pardon to pun) has a whole slide with the words “Fuck You” on it directed at people just like me.

    If Rasmus had my tone, you might have a point. But he doesn’t. In fact, I haven’t even seen Zeev or Andi get that worked up either. It’s really a tiny vocal minority who do, and nobody outside of internals really has a clue what’s going on there. It’s really irrelevant. PHP developers barely can take Rasmus seriously—we always joke about which talk he’s going to recycle this conference, or where do you think the term Rasmussed comes from? Do you think we really care about soap opera that occurs on internals?

    Do you think that anyone using Tagged cares that when I get a really difficult problem with the site I start cussing?

    Personally, I don’t think so. Just as I don’t care much that Twitter is written in Ruby on Rails except that it means that it’s down most of the time. 😉 😀

  26. @kenrick: I agree completely. I feel a good framework reflects the design philosophy of the language itself. CPAN and TIMTOWTDI; Ruby on Rails and convention over configuration; Cocoa and design patterns over inheritance; J2EE and (okay the jury is still out on that one :-D)

    On the other hand nobody is holding a gun to my head saying I gots to use Cake or Symfony or whatever.

    So I welcome the Cake and Symfony people to prove me wrong. They’ve actually got a lot further along that I would have thought to tell you the truth.

  27. Another key point is that the top N% of PHP Developers use a framework, or homebrew tools to develop an application that can scale fairly easy.

    The great thing about PHP is people can dive in and build web apps fairly easy (I’d LOVE To see someone teach themselves RoR without knowing little programming).

    That’s also a bad thing because we get a lot of spaghetti code. CakePHP, Symphony, and the other “large” frameworks attempt to solve many of the worlds problems. But what happens when you only need 3 of them solved? Performance is killed.

    I play with Codeigniter a lot (and use it when clients request full ownership of code – agreeing to the CI license). There are things it does that I like and hate, but it’s easy to get up and running and lets me do a lot of stuff my own way.

  28. Mr. Chay,
    Thanks for the response.
    Point taken about the tone, everyone has a style.

    I think we’re more in agreement than not on points. There can be Ruby-PHP love. One of the things that interest me about JRuby is the convergence of languages and tools. If you don’t like one or don’t have a tool/idiom in one, switch to the other. Not likely this’ll happen in PHP anytime soon, but I’d be interested to hear your perspective on that alignment. I know Java’s a good deal faster than Ruby, and I came from a Java/Oracle shop so I’m pretty comfortable with it, but as I mentioned, my background was where the scarcity was the programming time, not speed of app, so I’d be interested to hear your thoughts.

    Again, I agree about the attitude of some is a concern in the Rails community. On the one hand, its annoying to hear a bunch of kids act like they know it all because they know alot about one thing, but on the other hand, I knew it all when I was 22 too.

  29. A problem with Rails is that it isn’t the language that doesn’t make it scale—PHP is actually one of the slowest languages in terms of performance—it’s the design.

    On the other hand…

    MySpace built their site in ColdFusion. At around 15 million users they used a tool that rewrote their ColdFusion as C#. My first thought was, “wow, they managed to scale CF to 15 million users?” My second thought was, “That’s brilliant.”

    As for running Ruby on PHP a la JRuby, that’s probably pointless. First the philosophies are quite different and second both languages are very slow. I think there are a lot of good ideas in Ruby worth stealing and I’d not be averse to binding my PHP code to future successful Ruby projects. I hope the Ruby people feel the same, but the general attitude among some prominent members of their community is one of cocky myopia and excommunication of the rest.

    As for PHP in other environments. It’s not like people don’t want to run PHP on Java or PHP on CLR or PHP on Parrot. In fact there is a pretty popular active project getting PHP to run on Java. I think that there are two differences that make it more difficult than it would seem.

    The first is that PHP is more than the core language, when we mean PHP we mean it and the satellite of extensions and practices we do in it. Many of those extensions are essential but don’t play nice normally (they can’t be threaded, etc.). Compatibility is a big chore and some of the side effects of the language are poorly documented.

    The second is philosophically PHP is about gluing other things together. It is rare that an application needs performance on its web tier: it does, however, need scalability. PHP trades off the former for the latter. When PHP hits a performance penalty, the way to handle this is to push it outside PHP to another layer in an application or language that solves that problem already. Many other languages and approaches advocate copying good ideas. PHP tries to steal.

    I’m not saying it’s impossible, I’m saying it’s extremely difficult.

  30. @Ed Finkler – yeah the magic methods are a part of PHP, but I think my point should have been that while they are a part of PHP core, the inherit fact that they have to do guessing (lookups et al) just like __autoload and even include for that matter (unless you use full paths) is gonna make everything a little bit slower. On small sites that doesnt make a big difference I don’t think, but if try to make a large site, you start to feel that hit faster. I think you agree with that.

    I see frameworks as a whole crippling developers more these days then helping them, especially where the barrier to entry is that ‘you don’t even have to know {ruby}’ you know? There is a whole book on Ruby For Rails, just because so many fools picked up Rails before learning Ruby and are now fucked because they don’t know why their app does x/y/z because DHH didnt make an ActiveRecord method called take_head_out_of_ass(:self).

    People should know the language before the framework would be my argument. Hiding things from developers is not necessarily a good thing (even if it seems convenient at one point in time).

  31. I really really didn’t get the point of this post.

    Was this RoR bashing?
    Was this PHP praising?
    What the hell was this?

    Was the bash-microsoft-and-dot-net party changed to bash-ror, and I got an outdated invitation or something?

    Don’t you have anything better to do? Don’t you consider yourself a smart fella that is using that language Yahoo is using and writes scalable websites everyday? If you do consider yourself such a person … how do you have time to write such mustarbatory blog posts that contribute nothing about nothing to nothing?

    Really, if you will provide with an explanation to these questions – the that is probably only proof that you really like to waste yours and others valuable time.


    – web programmer

  32. Not all cute girls are blank starers, I promise. The flip side is though, that if I don’t know exactly what someone is talking about, they are in for 200 + questions because I’m not about to walk away without getting smarter 😉

  33. @Gabrielle: What a nice way of politely pointing out the soft gender bigotry in my post.

    Pray you never meet me, though. You won’t get a chance to walk away because I can’t shut up! (You probably won’t leave learning anything except that I’m a pretty hilarious PHP developer.)

    If you could share an experience where you got the same blank stare when geeking out with some guy, then that would be both fitting and proper. Most of the blank stares I give a pretty girl are… well…

  34. Just as a minor historical nit to pick: Movable Type was not a clone of Radio Userland, unless you’re making a claim about Userland inventing the concept of the weblog. (Dave Winer may think so, but I remain slightly dubious.) Radio was implemented in a very different way from, well, nearly everything that came after it: it ran entirely on your PC and pushed static files out to your web site. And, as an even less relevant footnote, Radio was written in Userland’s proprietary “Frontier” scripting language. (Delphi was an interesting guess, though!)

    As to, oh, the actual topic of the post, I’ve never really grokked language/framework partisanship beyond “this is what makes sense to me.” I make a living doing PHP programming (currently using the Cake framework, no less), but really like what I’ve seen of Rails. DHH’s “Rails will take over the world and you’re idiots if you don’t see it” histrionics can be exasperating, but the “Rails is all hype and you’re idiots if you don’t see it” responses tend to be just as histrionic and ill-informed.

    Rails is awfully young, has a lot of work to do (just like other platforms that came before it did), and anyone making predictions about massive success or massive failure at this point is blowing smoke. It’s gotten more attention faster than any other framework, and I think that’s a large part of what’s pissing people off about it: it’s just not fair that something so new, untested, and with a lot of glaringly obvious growing pains ahead of it has gotten so many people so excited so quickly!

  35. You are talking too much about what have been done with PHP. You forget since when PHP was out and when Rails got out, and how much attention it got… and continue to get (RoR) 🙂

    I started coding PHP since 1999 and I switched to Rails for few month. I have my personally reasons for that, and I think everyone else have too. So this discussion about what has been build with what, cannot go anywhere.

    Most people switch from PHP to Rails, don’t forget that – as I see the topics on Ruby Forum 🙂

  36. I can talk about WTF I want because it’s my blog and I blog about PHP, not Rails. Rails is just my gimp for the purposes of this article.

    Indeed, some people switched from PHP to Rails because… they failed at PHP. Surprisingly PHP’s powering a significant percentage of top websites show that a lot of other programmers didn’t seem to have that problem.

    I’d harsh on you more, but I didn’t understand half of what you wrote.

  37. @Watts: I think we agree on both extremes. Though personally, I’m not pissed off, I’m amused.

    Ruby hitched their cart to the Web 2.0 bandwagon and then claimed that they were the ones pulling it.


  38. tychay, you should relax..

    It’s your blog and you can talk about you want, but you are not getting anywhere.

    I wouldn’t say “some people switched from php to rails”, I would say “many people switched from to rails”.

    as I wrote earlier everyone have their own reasons why they switched, so no need to talk about PHP advantage or whatever.

  39. Terry,

    PHP has matured, Rails is maturing…. one day, Rails will be like PHP. You may see PHP dominating now but can you say that it will be the case 2 years from now.

    Scaling is not language dependent.. its art…. its web architecture. Give that someone PHP, that doesn’t necessarily mean he can build some thing that scales well…. same thing, Rails can also be scaled well if the craftsman is well-skilled. As to why Twitter had problem scaling, ask Dr Nic… He has the answer… Alex doesn’t..


  40. So terry .. this is all in the spirit of getting more amazon associates fee for selling more Rails books through your Amazon ads below right…. lol ….

  41. @Khang Toh:
    I have no doubt that Ruby will mature. I think the pace is highly exaggerated and that as a community their ego is closing themselves off to good ideas from outside Ruby.

    Ruby on Rails will never be like PHP. That’s like saying J2EE will be like PHP.

    A lot of Ruby developers come from the Java world. They don’t realize that it isn’t the language that failed them, it was their attitude that did.

    Scaling IS language dependent in the sense that some languages attract developers who add features that don’t scale well. That is a difference between Ruby and PHP. Rails needs a “skilled craftsman” willing to rip out and redo everything Rails put into Ruby to keep an uptime of a day. PHP just needs a person just smart enough to find out the scalability solutions that have already been discovered, implemented, and banked on to keep an uptime of years excluding code pushes.

    Does PHP give you 5 9’s? Nope. Are there other languages that can be just as good or better for some web problems? Yes.
    Does PHP have best practices that ensure scalability to the largest sites on the internet? Yes. Does Ruby? Nope.

    Reality check: all sites of decent sizes build on social networking and virality have hit the issue of database federation affecting scalability. With few exceptions they’ve all dealt with it and moved on to other scalability issues. The fact that Twitter still hasn’t solved this is, in 2007, laughable. If this was 2004, they’d have an excuse, but it’s not.

    And, yes, I’d be willing to put down $100 and a case of beer that PHP will have more marketshare in the top 100 than Rails. Care to take me up on that bet? Oh, unfair because companies like Yahoo! and Facebook aren’t going to die anytime soon? How about we take the top 100 from Seth Goodin’s Web 2.0 list next year and bet again for the year after? That should be fair because in the last year Ruby and PHP books have sold at an equal clip and “Ruby is the language for Web 2.0” while PHP isn’t.

    Thanks for playing. Next!

    @LovePHP: That’s a win-win. Peeps get their Ruby books and I get discounts on my next lens purchase. 🙂

  42. Shame on the fudding…

    That’s all this article really is, sadly.

    – The ROR framework has loads of advantages over PHP.
    – PHP has 2 advantages over ROR: It scales properly and it’s a proven solution.

    PHP didn’t scale well in the beginning and was hell to setup.
    PHP was unproven in the beginning, and everyone who didn’t “get” LAMP was ragging on it.

    This is exacly what Terry is doing here.

    Saying “PHP is in all the top sites” is not an argument… ROR is new.
    Was PHP in all the top sites when it was first gaining momentum? Of course not.

    Within a couple of years, ROR will be finely-tuned and scale as well if not better than PHP. The ROR community is growing too fast, and ROR developers love it too much for this not too happen – once you go ROR you don’t go back.

    And at that point PHP, unless it adapted, will be fully deprecated.

    Framework-less coding is dead. Developing without convention is dead. Practicality over elegance is dead.

    And that’s the reality… would be wiser to indeed “get it” than be left behind in a few years… (kinda like record companies and the whole mp3 revolution…)

  43. @Icyhot: Let’s agree to disagree. You prefer fear; I prefer humor. You prefer to talk theory; I prefer to use facts. You imagine the future; I live the reality. 😀

    But you certainly must have an overly developed sense of Ruby on Rail’s importance if you think that I fear it. I actually wish RoR all the luck in proving me wrong. They’ll need it.

    Please write more about how PHP is dead and how people like me don’t “get it” about bloated architectural frameworks. Cheer when DHH tells me, “Fuck You!”

    Prove the whole point of my article.

  44. @tychay: Please point to the part in my post where I say “PHP is dead”.

    There is no point to prove in your article.

    You are comparing a language that’s been in use for 10+ years now to a framework that is just starting to make it’s mark. Apples and oranges within two different time periods.

    Soon enough ROR will scale properly – what will be your argument then?
    What possible advantage could you have coding with a framework-less system and a language that wasn’t conceived as object-oriented from the ground up to create the next generations of applications

    Frameworks are bloated?
    Yes, they do indeed add overhead.
    That’s their cost.

    But with a framework you save on development time & costs and maintenance time.

    Same applies to convention and elegance.
    Unmanageable code is of no use to anyone but the original developer himself. By stressing convention and elegance, anyone can take over the development of any project. Any project can build over another project with simplicity. Every project becomes easy to maintain.

    PHP was the king.
    Coding without a framework was never a good idea.
    Something better has come along.

    Let’s just leave it time to develop properly.

    No reason to pout.

  45. Well, the first point is that the result of this FUD actually is just a bunch of PHP developers clapping their hands, but nobody in RoR community really cared about this trolling, in fact it’s too low level 😉
    And where’s that piece about Paul Graham and Joel Spolsky ? Deleted ? Because really – I was laughing my ass off …
    Anyway, can I ask you a few questions ?
    1) Where was PHP 2 years after the release of the first stable interpreter ? Nowhere ? (dude, if you can compare a language to a framework I can ask what I want, we both know we’re going nowhere here, but honestly with a post like this one where do you want to go ? (Slashdot I would say :p)
    2) If PHP is such a beautiful tool (Rails-lang, the language DHH and the others used to build RoR, is very limited unfortunately – we could use Ruby instead, but what the hell … unfortunately in Rails you *can’t* write pure “Rails-lang” modules, you have to stick with MVC :D) why there are so many Rails clones written in PHP ? I remember 2 but I’ve never been really interested in this.

    5 stars out of 5, incredibly entertaining 🙂

  46. You know, J2EE and ASP have been around for as almost as long as PHP, both have better engineers working on them than Ruby does. Both have scalability problems that PHP lacks. The combined marketshare of both is still less than PHP.

    See as an architect for successful internet company whose built many successful products in PHP, I live in the reality of the serious deficiencies of my language du jour, and I never cover it up. Nor do I ever feel that PHP and Ruby is an either-or proposition nor that PHP doesn’t have stuff to learn from Ruby. Nearly every good thing in PHP has come from outside PHP.

    In software, I’m practical instead of religious. Which is why they pay me insane bucks. On the other hand, that big chip on your shoulder is going to be the undoing of the Rails world.

    Rails is going to dominate PHP in two year? Keep smoking the CRACK PIPE. Must be some good shit there.

    Answer to ngw’s questions:
    1) Two years after PHP/fi or Zend Core 1? Two years after former there was the latter and it was the the dirty little secret of many successful startups. Two years after the latter, it was the dominant language for internet development and installed on nearly every ISP.

    Also, if you’re talking Ruby for web development then you mean Rails. The Java world has more than J2EE, but not so for the Ruby world. As many others have pointed out, The Rails framework and Ruby for Web are synonymous. I find it an amusing dodge that whenever Rails people can, they talk about “Ruby” and then when they’re being attacked they go for the “We’re not Ruby, we’re a framework.” What sort of psychology goes into that? I mean the Java developers never try this defense when I talk about J2EE.

    Hilarious shit.

    2) I say many times that PHP is as ugly as a ball of nails. And the rest of your gibberish sounds like I’m arguing with a fan of Smarty Template System. 😀

    As for my take on Rails-like frameworks in PHP. My take is well documented on this blog and I have an even a stricter take on frameworks in general.

    You may disagree with me. You may think I’m wrong. You are certainly entitled to think that I’m offensive and abrasive.

    But I’m not a hypocrite.

    Ruby peeps, keep the comments coming! Oh yeah, and tell me the supplier of your chronic. Must be some good shit.

  47. @tychay

    Do yourself a favor tychay, reread this entire page, (when not in a “I’m the king of the world” mood) and perhaps you’ll realize how obtuse you come off. You sound exactly like all the microsoft fudders that were speaking out againt Linux. You also seem to enjoy being a troll on your blog…

    But like I said, don’t take my word for it, reread your page.

    Good luck to you, I’ve wasted enough time on this.

  48. @Icyhot: I reread the post and comments and now what I realize what an asshole I sound like when I defend Mac from the “Microsoft FUDders”…

    I sound just like you. 😀

    The only differences are: I talk facts not innuendo; I’m willing to back my statement with $100 and a case of beer (plus there is the public humiliation I’d receive for having to eat my words); my information is listed publicly.

    I’m passionate. I’m an asshole. I certainly don’t take it personally.

    As for me “trolling on my own blog.” Thanks for reminding me that this is my own blog. I have always encouraged people to respond to me on their own blogs where I have been happy to link them! (I even go in and manually link if I find out about it and don’t get a trackback.)

    If you read the commented links (which you haven’t), you’d find that some of these trackbacks generate thoughtful discussion, others point out errors in my article. Almost all of them have added to the conversation.

    But very few responses engage in ad hominems.

    I wonder why?

    My guess: $100 and a case a beer… too risky?

  49. 1) Basically you say that 2 years after the release of PHP it was the “secret of many startups”, exactly what Rails is now. The distinction between a *language* and a *framework* makes sense for every script kiddie, if it doesn’t for you it’s your problem. If the problem is that PHP isn’t a general purpose language but useful only on the web, it’s still your problem, Ruby isn’t.
    2) So what’s your point ? What is all this shit about being “flexible and powerful” ? Dude, I was doing Ruby *years* before Rails, you must be on crack to think that Ruby isn’t – it’s a pure OO language, PHP not even close, it has *strong* metaprogramming features, does PHP have metaprogramming at all ? – just to name a few, I think the fact that *PHP doesn’t have namespaces* . When Rails is too strict you write a module in Ruby, and that’s all.

    Oh, one last thing, you say that if everyone is using the same technology for solving the same problem it means that that technology is the best for the domain. So in 2000 you were an ASP3 developer correct ?
    ahahahah, enough fun, I always lose interest to trolls 😉

  50. I should mention Terry’s accomplishments. If you have done more, please speak up.

    1. Saved Qixo from death (with PHP and aggressive scraping).
    2. Saved My Casa Network from death (with PHP, SOAP).
    3. Saved Plaxo from death (through e-cards).

    What do these have in common? If you said only PHP, you are wrong. They were built using non-framework, scalable architectures. He could have built them in Ruby, and it would be better than work of a Ruby developer. Why? It’s a point of view that’s different. It’s not just PHP.

    If you are smart, you could learn something from Terry.


  51. Holy crap Terry! I thought I was the only one out here. Seriously! I’ve been getting so sick and tired of all the framework whoring dimensia causing tribal zeal in PHP anymore that I was seriously considering getting out of IT alltogether.

    I mean c’mon! You know it’s bad when you tell it like it concerning the overhead of things like ActiveRecord or other ORM’s only to become a pariah! Is it just me or are we seeing the drawbacks of these things now? I told a freind of mine back in Januarary (or however you spell it) that the problem with these completely managed frameworks (RonR, Cake) is that they have a much lower performance ceiling.

    Oh hey……, uh…. didn’t Alex Payne say something like that?

    >>Running on Rails has forced us to deal with scaling issues –
    issues that any growing site eventually contends with – far sooner

  52. I just found interesting survey result from Apache Friend (XAMPP creator).
    since XAMPP is a tools for a web developer, so I can say this could be a reflection about current web developer opinion about their prefered languange/framework.


    PS: watching 2 RoR ‘funniest home video’, I see nothing funny but RoR arrogancy (which I thought it just rumours) and a bad marketing strategy, really….

  53. I can’t see why it’d be horribly embarrassing (:

    It was just that your way of arguing is surprisingly consistent between here and IRL. I find the degree to which people invest themselves in web frameworks and CMSes pretty ridiculous, be it RoR, WordPress, Drupal, etc., but I never really feel the need to turn to a vitriolic-but-hilarious pissing contest…

  54. Great rant. If there is one thing where you go offbase it is the argumentum ad populum of saying that PHP is best because so many sites use it. Otherwise, spot on.

  55. @l.thomas: I said it “may be” the best. The argument ad populum was in order to imply it is certainly a safe bet because the problems you might run into in a highly scalable site have already known best practice solutions in the PHP world. But, point taken. 😉

  56. The problem with statistics about what software stacks the top sites on the internet run is that it takes a while for sites to be built, and longer for them to become popular. If Yahoo wanted to rebuild their site in Ruby On Rails, they wouldn’t be done tomorrow. It took them many years to get where they are today, and it would take many years for them to get there again in Rails. What will be interesting is to note what stacks the top sites are running 10 years from now. Rails has been around in a production usable form for less than two years. How many of the top 100 sites are less than two years old? You can write a successful, scalable, fast site in a variety of languages on a variety of platforms, PHP definitely included. However, ease of writing that site and maintainability are important factors too, at which Rails excels. It’ll be some time before we can decisively say whether the development community has has chosen PHP or Rails as de facto, and at that point there will probably be another newcomer anyway. For now, buzz and the choices today’s upstarts are making is a pretty good bellwether of what’s to come.

  57. Interesting, really interesting…
    I started programming in php and it was awsome for me, it helped me a lot to build all kind o’ pages I needed for that moment (3 yrs ago). I really felt in love with PHP, but when you become a mature programmer you need something else, that “something else” I can describe it with one word : “Framework”, yes a framework! because you don’t have time to waste, because all your projects has been scheduled and you need to finish them in the time you said you will.

    Then I discovered Rails, i really don’t like Ruby (I prefere the php sintax), but I have to admit that Rails is an excellent framework…. You can do a lot o’ things with that framework, It’s not perfect but is good enough for me..

    I just long for a framework like that for php.. I hope some day we (php community) will have something as good as Rails..

    ps: is “akelos” good enough?

  58. Just to carry terrys point further about scalability of frameworks, simply think about the db backend:
    If you just analyze the SQL being generated by a framework with a SQL optimizer (lets take ORACLE and one of these incredibly smart chained HABTM relationships for a start) you see that most of these frameworks generate immensely slow queries causing most models having way too many joins, too few indexing operations, insane comparisons and where clauses, etc. The results of these queries are then pumped into deeply nested arrays and it gets even worse , when the framework writes the data back.
    If you think about this situation it becomes obvious that most of these frameworks cannot scale well, because they behave like program generators for SQL on complex data models. BUT SQL is not ASSEMBLER, its a 4GL language, so you cannot compile some procedural code into efficient SQL if you have a complex data model underneath. So the framework cannot scale IN PRINCIPLE unless you generate smarter SQL by using your own brain (which means, disabling the ORM part of your framework). Would anyone nowadays try to write or even think of a program generator, which creates scalable php or ruby code? This is nuts, but doesnt stop people from believing in the magical scalability powers of frameworks.

  59. i love php and i hate this type of talk (its seems the swan’s song). why you keep hurting my lang?

    big deal about 40%: cobol still efficiently runs more than half of the banking industry. wow: cobol rocks!!! am swaping today.

    now, seriously: ruby is a powerful, very elegant and compact lang and all the devs community should be thankful to dhh and ror for lighting the path ahead for new apps.

    php frameworks *must* (and are) embrace ror’s standards or 3rd step will be “then you end”. and yes, sometimes u dont need a framework at all (where php thrives). its not possible to have a full rails-like framework with php.

    anyway, i dont agree but its always a pleasure to read such a good rant and impossible not to reply 😀

  60. PHP – a programming language created in 1995 using concepts that were state-of-the-art in 1965.

    It’s the same argument we’ve heard before: from “Real Programmers program in Assembler” to “Real Programmers program in C.”

    The problem is that “real programmers” create buggy, undocumented, unmaintainable code – and then go on to other projects and leave the mess for someone else.

    Today, software development has to balance performance, scalability, development costs, maintenance, lifecycle – and hardware requirements and capability. The days of the rogue coder have to end if we are ever going to get past the current situation where 1/2 of all software projects fail.

    Ruby and Rails may not be the answer, but if PHP is, then you are asking the wrong questions.

  61. @John Kantor: Who’s the “rogue coder”? Looks to me, it’s not happening on sites like Yahoo, Facebook, WordPress, Wikipedia, Flickr, and other high profile PHP sites.

    No, PHP developers are not leaving a mess for someone else, you are referring to J2EE developers and other consultans who code sites based on frameworks and false promises. Oh yes, and you are referring to Rails developers if you are talking about Twitter.

    When it comes to “balancing performance, scalability, development costs, maintenance, and lifecycle — hardware requirements and capability” for large scale consumer facing websites, bagging on PHP is attacking the only proven solution that has had to survive all the talk, from people such as yourself denigrating it.

    That’s the problem: all talk, no show. About 40% of the internet disagrees with your observation, but please don’t allow something so subtle as the facts hit your ass on the way out of this blog.

  62. I thought that I could give you a point of view from someone who isn’t a programer but wants to know if they should have a site made with ruby on rails or php.

    I have been reading all the posts from my google query “ruby on rails vs php”. Which is the question I am asking is it better to use ruby on rails or php so I don’t care that some clown wants to point out that ones a framework and ones a language thats not an answer to the question.

    From a business point of view I want to know, which one is better to use for the user, cheaper in the long run and most versatile on the web. I don’t care how easy it is for you to program, I care that it works properly.

    From all that I have gathered it seems that the rails community is far behind the php community. For starters ruby sites noticeably load slower than most php sites, the hosting is more limited, bigger sites use php. Twitter seems like it does one aspect of Facebook(what are you doing right now?), where face book does so much more. And if Twitter crashed it really does’nt look good for Ror does it. Excuses are like @$*holes everyone has one. Php has Drupal and WordPress, where the cms choices for Ror are not as popular and popularity pays the bills.

    Ror is also more costly to run even if it’s cheaper to make but if it has to be rewritten then where does that leave you. In the future ruby on rails may be the leader in the industry but it will need to put in its time like php but for now php is what I would use.

    Thankyou for all your insight into this subject matter.

  63. Is this guy on drugs? He talks about PHP and Ruby has individuals …

    “PHP is really good at finding what then next big thing is …”

    The main point is that PHP is cheap. Yes, it is a cheap alternative to anything. From infrastructure to the price of people. That is excellent for startups.

    Ruby, is a new tech. The culture suffers from academic snobism and is not very good at arguing the language from pure economics.

    I don’t understand all this bitchy feeling from both camps. Both are usefull

  64. Hi Terry,
    I was at your talk last night at the PHP meetup. Great talk, had to go right after.

    I’m bootstrapping a startup that helps people mentor each other and share their wisdom. The service has great commercial potential as well.

    I’m looking for an expert software engineer who has the desire to co-found a company. Do you know any one that I could have a discussion with?

    If not, perhaps you might be able to guide me on how I might go about finding one.

    Much thanks,
    Raj Raman

  65. PHP can not scale unless you consider Facebook needing 1 server per 200 users scaling.

    PHP is responsible for the majority of the web exploits.

    PHP is responsible for 99.999999% of the crappy websites.

    PHP makes it very easy to do the wrong thing and constantly gets in your way if you want to do things properly.

    WordPress, one of the alleged PHP successes is a mess of spaghetti PHP.

    PHP: by amateurs, for amateurs.

  66. People do wrong things all the time. You know sometimes they go to jail, sometimes they don't. Right? So who should we blame? If you blame lazy developers for exploits in web that would be right, but no you blame the PHP itself. Doing wrong things is up to you. It has nothing to do with PHP.

    How could you call yourself web architect without making a single architectural decision? If you want to build something – get yourself a hammer and build it. RoR is not the hammer, it's the decision itself. PHP may have 3000 "crappy" functions that you can't remember. But it doesn't force you to do anything with them. Rails does. That's the problem. So go ahead and do your javascript with rails stuff, only because that will solve your problem. No matter how.

  67. "People do wrong things all the time. You know sometimes they go to jail, sometimes they don't. Right? So who should we blame? If you blame lazy developers for exploits in web that would be right, but no you blame the PHP itself. Doing wrong things is up to you. It has nothing to do with PHP. "

    That is wrong because the PHP interpreter and libraries are full of security holes.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.