Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Warm Up to ColdFusion

Macromedia's ColdFusion technology isn't new, but since the release of the MX version, there's been a new surge of interest. This is a great time to learn the basics of the CF environment. This simple guide will get you started with CFML, form-building, databases, and a sample application you can build in no time flat.


advertisement
oldFusion is a relatively simple, tag-based, programming language used mainly for Internet applications such as shopping carts and email systems. ColdFusion software runs on the server that hosts a Web site, processing the ColdFusion sections of documents that may, and often do, contain regular HTML code as well. If that is confusing, read on. It will come to you.

Why ColdFusion?
ColdFusion is a powerful programming language and it is a wonderful gateway for users who have little experience in programming. VBScript, JavaScript and PHP have syntax that can be intimidating to the beginning programmer. Take a look at the ASP and ColdFusion comparison below:



ASP Code: <% set conn = Server.CreateObject("ADODB.Connection") conn.open "contacts" conn.Execute("DELETE FROM contacts WHERE id="+ id); conn.close %>

ColdFusion: <CFQUERY name="qdelete_user" datasource="contacts"> DELETE FROM contacts WHERE id = #id# </cfquery>

Both of these examples delete a user from the "users" table in a "contacts" database where the value in the id column matches a number sent from a form. The CFML is both easier for beginners to read and there is less of it. ColdFusion applications can be developed very quickly and are easy to troubleshoot and fix. The error messages sent by ColdFusion when the code doesn't work tend to be specific, which helps reduce development time.

How ColdFusion Works
When you visit a Web site that uses ColdFusion, you may notice a .CFM extension in the address, such as www.wordevelopment.com/BOOYA.CFM. The "BOOYA.CFM" file contains code (ColdFusion Markup Language, or CFML) that resides and runs on a Web server. The output from the CFM file is usually HTML, which the server returns to the users Web browser. Even though you may see the .CFM extension in the address of a Web site when you visit it, no CFML is sent to your browser; instead, the .CFM extension says to the server Yo server, get ColdFusion over here to take a look at this. The server won't process CFML in a file with an .HTM extension unless you have configured your server to do so. If you are new to ColdFusion, remember to save your files with a .CFM extension as you test the examples on the next few pages.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date