** Coldfusion Thread - Codes , Help, APIs,

Whats your Language of Choice?


  • Total voters
    14
Status
Not open for further replies.

digga121

ajaxking
Jul 25, 2008
745
6
0
socialsnipe.com
I'll be posting some usefull code in this thread for anyone who is looking into coldfusion. This thread can be used for a recource on anything Cold Fusion Related. I'll start by posting very basic stuff. Check back, I'll try and add some posts daily, so if you got questions and comments, post back. I'll be adding some cool stuff eventually like google api integration, image resizing, and jquery integration with coldfusion ..so lets start basic !

Code 1.0 - Re-Usable Sendmail Function.

First up, is a general send mail form. People were always coming up to me, telling me they needed a form set up, and I got sick of having to type out every variable in the action statement, so all I did here was create a loop, that looped through all the form fields, and displayed there name, fallowed by the evaluation of the field. At the end , I simply re-located back to a thank you page. All the validation is handled on the previous html, with Javascript, and remember ,you cant have spaces or dashes in the form field names, when naming them, because it will cause an error, if you have a way around this, please share. There is a few ways, like replacing every _ with a space. Anyway, heres the first code of the thread !!

sendmail.cfm
Code Notes:
Name form fields what you want to display before what is evaluated. Put this as your action="" on your normal html form.

Code:
<cfoutput>
 <CFMAIL SERVER="yourserver" FROM="#form.email#" TO=[EMAIL="email@theemail.com"]email@theemail.com[/EMAIL] SUBJECT="Contact Form From Website!" type="html">
 
 <CFLOOP INDEX="TheField" list="#Form.FieldNames#">
 <cfif NOT #TheField# is "SUBMIT">#TheField# - #Evaluate(TheField)#<br /></cfif>
 </CFLOOP>
 
 </CFMAIL>
 
</cfoutput>
<cflocation template="/thankyou.cfm">
 


I'm fairly sure Enigma was being sarcastic.

How dare you even mention ColdFusion in the same sentence as .NET.
 
Im fairly sure I was being sarcastic right back at him.

How dare you say how dare you.

.net php COLDFUSION.

Don't hate on a language unless you know anything about it at all.

WTF is so much better about .NET ...I know all languages, I prefer ColdFusion, if you don't , stay out of the post.
 
No Ruby on Rails option?
I don't know anything about it but thought that was something a lot of people used.

Maybe not...
 
Yes, I know all the languages you speak of. But like most developers, I'm not living in 1998.

ColdFusion's downfall is the complete lack of separation between logic and presentation. Then there is the licensing fees for servers and developers, poor OOP support, and no precompiling resulting in overall poorer performance.

I mean, seriously... look at that code you posted. It's a clusterfuck of a "language".

.NET or PHP (with a framework) will run circles around ColdFusion all day long.
 
ROTFL at this comment ".NET or PHP (with a framework) will run circles around ColdFusion all day long."

Familiarize yourself with Cold Fusion 8.0 , Cold Fusion Components, and then come back and comment
 
IMHO, nothing beats PHP when it comes to FAST and EASY building of web scripts or applications. And that's why I'll never even look at anything else.
 
PHP: PussyHourdingPenis

CF: ChubbyFucker

Now you have all the info you need to decide which is best...
 
Lol, this guy is a little insecure about is chosen language.

Oh, and thanks for the neg rep douchebag.
 
Everyone has there opinion on different languages, thats the way things will always be, I mean, look at the arguments between PHP programmers that use OO and frameworks like Cake, etc. and RoR developers... Its never ending, much like the argument here will/could be...

I must say though, in my opinion, ColdFusion sucks dick, the majority of developers I know seem to share that general sentiment as well - that includes a developer that worked for CNET...

In short... People have opinions, but OP, learn a language that someone actually gives a shit about...

Edit: Also, last I checked and I may be naive on the subject, I was under the impression that ActionScript is more of a language in a language, in a sense that you cant just start using ActionScript on a web page but rather in a Flash or Flex application...
 
PHP is better supported by webhosts, more used across the internet and based on C/Perl so you can pick it up quick. Not to mention all the example code.

I don't care if coldfusion has version 8.0 that came out in 2008. If nobody uses it, (and they don't) what good is it?

Doesn't look like less code either. Heres the mail script in PHP with less lines.
<?
foreach($_POST as $var) {
$message += " ".$var;
}
mail($_POST['from'],$_POST['to'],$_POST['subject'],$message);
?>

If you argue performance you shouldn't use either. If you want a webapp to scale you build it in java.
 
one of the biggest\most successful forums here in australia was hand coded with coldfusion... cant be all that bad.

chain_reaction_ver1.jpg
 
Cool, some CF supporters ..I'll be postin some more code when I geta chance ...

Not to sound gay, but myspace is coded in CF. One major difference between CF and PHP

MS SQL > MYSQL.
 
Not to sound gay, but myspace is coded in CF. One major difference between CF and PHP

MS SQL > MYSQL.

PHP can be used with mssql as well, and tons of other database types.

Also, saying that mssql is greater than mysql is just another opinion.
 
okay, well add 1 million records into a msql table with CF , and also a mysql datasource with PHP, then run performance reports on both. I will guarentee you CF will be faster, and THATS not an opinion.
 
Status
Not open for further replies.