Re: php vs cold fusion
| From: | Jason Brooke | Date: | Tue, 31 Oct 2000 02:11:56 +0000 |
| Subject: | Re: php vs cold fusion | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22821@lists.php.net to get a copy of this message | ||
> <CFQUERY name="test_the_nutter" datasource="test">
> SELECT customer_id, first_name, last_name, tel_number
> FROM customers
> WHERE (first_name='#form.first_name#')
> </CFQUERY>
>
> <CFOUTPUT query="test_the_nutter">
> #customer_id# #first_name# #last_name#
> </CFOUTPUT>
>
> Yep - hardly difficult a 5 year old could write Coldfusion in Notepad
after
> a 5 minute demo.
>
> Anyway here is my bit:
>
> 1) Coldfusion - 10 times faster developement than ASP or PHP3/4
> That is where Coldfusion got it right - We all send mail, we all
encrypt a
> string so why re-invent
> the wheel and have to write code for this - use a tag <CFMAIL or
<CFCRYPT
> etc......
Php's mail function is practically the same to use as CF's. I don't know
about cfcrypt.
But regarding your example of a database query, and displaying the
result set above there - the very first thing I wrote when first using
Php after using cfml for a couple of years was a dbquery() function
which now makes it as simple as:
dbquery($sql, &$rs, other_optional_args...);
queryoutput($rs, 'customer_id', 'first_name', 'last_name');
It didn't take long to write those functions, in fact I don't even use
the second one because it's just too easy to type:
<?
$n = count($rs); // only with big recordsets to save counting $rs each
loop
for($i=0;$i<$n;$i++) {
?>
do html/database output here
<? } ?>
...or not escaping php and using the heredoc style syntax, depending on
the situation.
All this knowing that it's nice fast code doing this stuff for me.
So I feel that your comment about CF being 10 times faster to develop
in, is very incorrect and misleading unless you're making uncommon
generalisations, in which case you should probably say so.
> 2) Coldfusion - more stable than PHP3/4
I wonder what you mean here - this makes everyone in my company laugh -
especially my employers who completely enjoy my no longer reporting to
them that IIS/CF 'couldn't be controlled in their present state' or
found and killed by tlist/kill and required the server they were running
on, to be rebooted to function for the next few hours before needing the
same again.
In contrast, we now pump through 30+ times the traffic using the exact
hardware which used to have CF running on it, with Php instead.
Additionally, I'd never even touched Linux until keeping CF up and
running on NT and Solaris became such an incredible problem for us as
our web traffic grew. The last time I rebooted since converting the
majority of our stuff to Php, was to upgrade the kernel.
If this is because I'm not adept at configuring and maintaing CF, but
somehow fluked getting Php running nicely with a vastly increased
traffic load and increased level of complexity to our applications, then
so be it.
But I still feel your number 2) comment is very incorrect and needs
alternate opinion so that it doesn't incorrectly influence a reader of
this list.
> 3) Coldfusion costly hosting
Not to mention that a large number of the ISP's offering CF hosting
disable many of the tags including the basic file handling ones, which
renders it very crippled.
In summary, I think that if you don't mind paying the $$$ for
ColdFusion, and don't have a very high traffic load, and don't mind the
limits of it's functionality, it's good to use. I think it's easier for
the less-experienced developer to grasp and begin using too.
Having used both cfml and Php (I actually started and continued using
cfml about 3 years before I ever touched Php), as well as asp/vbscript
and perl to develop lots of websites for my company's clients, I just
prefer Php hands down because I know that I can hand it over without
worrying about it getting loaded up and crawling to a halt when lots of
visitors hit their site, and it won't take me longer to develop
something than it would with cfml. When I first started with Php, I was
of the opinion that it was slower to use. I later realised that was
because of my approach to programming, especially since cfml was the
only programming or scripting I had ever done before. Now that I've used
it for a while, I can do things at the same rate I used to with cfml.
The argument of one language versus another is a very tough one because
so many developers have different needs and priorities, not to mention
differences in their personalities and thinking patterns. That's why
it's best to make sure you state that 'these are the reasons I *feel*
that suchandsuch a language is better', otherwise you're quite likely
just misleading people who read what you write.
jason