I was trying to find out what
phtml was... I thought it was Perl-parsed HTML, but apparently it's also a type of PHP page. Thanks to
Pete Ferrell for recommmending wikipedia.com... I always forget to look there.
Anyway... on the PHP page at wikipedia I found
a link to this interesting, but kinda funky, slide show from the Yahoo Engeering group. They considered moving from their own yScript and yRPC systems (ain't that cute!) to several different platforms including:
- Creating a next-gen in-house platform
- JSP/J2EE
- Perl
- ASP.NET and friends
- and...
- ColdFusion
Guess why they didn't choose ColdFusion for their tool of choice:
And I quote:
ColdFusion has an ugly syntax. Give me a break!! What kind of a load of crap is that?
I haven't used PHP in a long, long time... and it's still not long enough for my tastes. I know some folks love it, and some heavy-hitting projects out there are done in PHP. And hell, I do not care that Yahoo isn't done in CF... really, I don't. What annoys me is they went with something that has syntax like this:
<?php // Html safe containers
$myOutput = <<<MYHTMLSAFEOUTPUT
<?xml version="1.0"?>
<html>
<title>PHP Example</title>
<body>
<p>...all sorts goes here...</p>
</body>
</html>
MYHTMLSAFEOUTPUT;
echo $myOutput;
?>
And that's prettier than this:
<cfxml variable="htmlOut">
<?xml version="1.0"?>
<html>
<title>CF Example</title>
<body>
<p>...all sorts goes here...</p>
</body>
</html>
</cfxml>
<cfoutput>#toString(htmlOut)#</cfoutput>
If you're going to choose a platform and you don't want to use one, don't blow smoke up my <? @$$ ?> and tell me that you chose something else because of ugly syntax when you just wanted to make the PHP DevCon crowd laugh and giggle and like you a lot because you're Yahoo and you're there.
Tell us you chose PHP over CF because PHP is OSS. Tells you chose PHP over CF because Macromedia woudln't give you the price cuts you wanted. Tell us you chose PHP over CF for some legitimate reason, not for a BS reason that a 2nd grader could see through when presented with the above examples of "pretty syntax."
And for those inclined to start commenting that I shouldn't hate PHP or that Yahoo has a right to use whatever they want, don't, please. I already agree. PHP is a fine thing for people who want to use it and have legit reasons to do so. Yahoo has every right to choose whatever platform they wish for their technology of the day. I'm just aggravated about the BS line in the slide show about "ugly syntax" compared to PHP. It's bogus.
Laterz!
Comments
first off, you can template with PHP much cleaner than your example.
second of all, most of the hard work isn't presentation. i would rather write a clean PHP class for accessing my DB or my XML.
Posted By jerk / Posted At 8/2/05 4:51 PM
I'm definitely pro-CF, but your example is way old. You can do much easier mix of PHP and HTML now-a-days. I still think CF is much easier though. :)
Posted By Raymond Camden / Posted At 8/2/05 5:09 PM
That presentation is really old. I bet you can find a cf-talk (or cf-community?) thread about it.
The reality of this is that the presentation slides do not really elaborate on their decisions (I bet the actual presentation did, though).
If you have a bunch of C or Perl programmers, then PHP is probably a better syntax fit than ColdFusion. If you have a bunch of HTML folk, then CF is gonna be easier to grasp.
J
Posted By Jeff / Posted At 8/2/05 5:12 PM
Hey all...
This is all exactly not the point. I should have posted a CF snippet that did something entirely different than the PHP snippet (honestly, I'm not even sure what it IS doing). The point is not what it does or how it works.
It's what it looks like!
The point of the post wasn't what PHP does or how CF works or Yahoo!'s motivations for making their choice. It's my reaction to one line in a presentation regarding what PHP looks like vs what CF looks like.
Let's face it, CFML isn't a curly-brace language and will on some level always fight bias because of that. It may be one of the most powerful enterprise integration platforms in the world today, but it's not curly, convoluted, or hard to read... hence people will think poorly of it.
Anyway... it's important to remember the focus of the post, and I wanted to restate it: I was talking about how it LOOKS not what it DOES.
:)
Laterz!
Posted By Jared Rypka-Hauer / Posted At 8/2/05 5:28 PM
They chose php because the guy who wrote it works there, plain n' simple ;)
Posted By torgo / Posted At 8/2/05 5:50 PM
you can create tags in php. look at textpattern.
Posted By jerk / Posted At 8/2/05 6:20 PM
Show em the diff bewtween the creation and sending of a simple email contact form. CF rocks, PHP is uglier than sins kissing cousin marlopia.
Posted By poopah / Posted At 8/2/05 7:03 PM
Umm... jerk?
Somehow that feels good and rude at the same time... calling him/her Jerk. Heh...
Anyway, it's cool you can create tags in PHP. You can do the same in CF. You can do anything with PHP that you can in CF (with some substantial exceptions). That's not the point.
The point is that making a choice regarding platform because one of the languages doesn't use curly braces and a lot of colon/semi-colon characters is lame, short-sighted, and not terribly professional. The choice platform should be based on comparing platform strengths and application needs, not really even on syntax (unless, as someone else pointed out, it can be said that syntax will hold progress back).
Since the worst he could say about CF was that it had an ugly syntax, his choice not to use it was questionable, especially given the raft of cons he gave for all the other systems that were proposed.
Laterz!
Posted By Jared Rypka-Hauer / Posted At 8/2/05 8:09 PM
I'll say it again.
We probably can't discern what the real choices were against CF (or any of the other languages) were from the one-line comment in the slideshow. I suspect tht more detail was given in the presentation that encompanied the powerpoint than is actually shown in the slides.
No point in obsessing over a one-line comment in a presentation.
Posted By Jeff / Posted At 8/2/05 10:11 PM
As old as the example given in the blog post was, It's only about 10 lines of code.
Those that are pointing at it implying that it isn't a reasonable comparison, why not provide a more contemporary, 'reasonable' comparison.
I think Jared's objection is really to the truthfulness of the statement. CF doesn't have ugly syntax (unless HTML and XML also have ugly syntax). I agree it seems a silly reason to give as the basis of a technical decision.
Posted By Calvin Ward / Posted At 8/3/05 6:30 AM
@Jeff
Let me put it this way. I would not make a slide of a presentation that did not jive with what I was talking about. So in essence what I display on screen is the *core* of what I am talking about.
Considering what I just stated, it is not difficult to reason that syntax beauty was the only thing talked about by the presenter.
Yet, in the end the beauty of code is in the hands of the coder. PHP can be made readable. CFM can be made readable. Knowing this the reason given by Yahoo is very flimsy.
- Ian
Posted By Ian Sheridan / Posted At 8/10/05 2:29 PM
Nice site.
Look here:
<a href= http://xanaxtramadol.com/bate-papo/map.html >bate papo</a> [url=http://xanaxtramadol.com/bate-papo/map.html]bate papo[/url] <a href= http://buyasoma.com/dental/map.html >dental</a> [url=http://buyasoma.com/dental/map.html]dental[/url] <a href= http://buyasoma.com/eye-surgery/map.html >eye surgery</a> [url=http://buyasoma.com/eye-surgery/map.html]eye surgery[/url] <a href= http://xanaxtramadol.com/diet-weight-control/map.html >diet weight control</a> [url=http://xanaxtramadol.com/diet-weight-control/map.html]diet weight control[/url] <a href= http://buyasoma.com/impotence/map.html >impotence</a> [url=http://buyasoma.com/impotence/map.html]impotence[/url] <a href= http://xanaxtramadol.com/project-management/map.html >project management</a> [url=http://xanaxtramadol.com/project-management/map.html]project management[/url] <a href= http://xanaxtramadol.com/low-cost-car-insurance/map.html >low cost car insurance</a> [url=http://xanaxtramadol.com/low-cost-car-insurance/map.html]low cost car insurance[/url]
Posted By fel_owfoj / Posted At 10/2/09 5:45 PM
Nice site.
Look here:
<a href= http://buyasoma.com/home-equity-loan/map.html >home equity loan</a> [url=http://buyasoma.com/home-equity-loan/map.html]home equity loan[/url] <a href= http://buyasoma.com/free-credit-report/map.html >free credit report</a> [url=http://buyasoma.com/free-credit-report/map.html]free credit report[/url] <a href= http://xanaxtramadol.com/motrin/map.html >motrin</a> [url=http://xanaxtramadol.com/motrin/map.html]motrin[/url] <a href= http://xanaxtramadol.com/holdem/map.html >holdem</a> [url=http://xanaxtramadol.com/holdem/map.html]holdem[/url] <a href= http://xanaxtramadol.com/ice-cream-franchise/map.html >ice cream franchise</a> [url=http://xanaxtramadol.com/ice-cream-franchise/map.html]ice cream franchise[/url] <a href= http://buyasoma.com/on/map.html >on</a> [url=http://buyasoma.com/on/map.html]on[/url] <a href= http://buyasoma.com/loans/map.html >loans</a> [url=http://buyasoma.com/loans/map.html]loans[/url]
Posted By mgc_sqewc / Posted At 10/5/09 5:48 PM