Developer tools

 

 

At the heart of every ColdFusion application is the ColdFusion Server. This has an open, extensible architecture that integrates easily with existing systems, as well as built-in application and infrastructure services. This product supports ColdFusion Markup Language (CFML), a server-side scripting language that is easy to learn and cleanly integrates with all popular Web languages and technologies. It works with multi-tier architectures through COM, COBRA and EJB integration. It can also be easily extended and thousands of third-party components are available. 


Licence: Multiple-user evaluation (30-day trial) or single-user version (unlimited time, single IP only). After the 30-day Enterprise evaluation expires, it will revert to single IP mode.
Online:
http://www.macromedia.com/software/coldfusion/
Operating system: Windows NT/2000, Linux, UNIX
Requires: Windows: Pentium, 256M RAM, 350M hard disk space, Windows NT 4.0 SP4; Linux: Pentium, 256M RAM, 350M hard disk space, Red Hat Linux 6.2, 7.0 (Personal or Professional), SuSE Linux 7.0 (Personal or Professional), Cobalt Qube, RaQ 3, 4, XTR

Install instructions: See the ColdFusion 5 Tips below

 

Download:


     
Windows  

 

 

Linux




 



 

1.   New installer
2.   Write your own functions
3.   New database drivers
4.   Query of queries
5.   Graphing data
6.   Partial page output 
7.   Use Administrator help
8.   Customise logs 
9.   Server reports
10. Upgrade Studio help
11. CFDump 
12. Generate Crystal reports

1. New installer

ColdFusion 5 uses a single installer for all versions. When you purchase a license, you can upgrade the evaluation version to ColdFusion Professional or ColdFusion Enterprise simply by entering the serial number into the ColdFusion Administrator. You donÆt need to reinstall.


2. Write your own functions

One of the best new features in ColdFusion 5 is the ability to write your own functions. You can write functions in CFScript and then call them from anywhere in your page. You use functions that youÆve written in exactly the same way as regular ColdFusion functions.

The following code example shows a simple function being defined and used (note: text in italics is explanation not code):

<cfscript>
This custom function returns "TRUE" if a number is odd and "FALSE" if it is even.
function odd(i) {

           
if (i mod 2)
                      
return true;
           
else
                       
return false;
}
</cfscript>

<!--- Pick a random number between 1 and 10 --->
<cfset x = randrange(1,10)>
 

<!--- Use the custom function "odd" to check if X is odd or even --->
<cfif odd(x)>

           
X is odd
<cfelse>

           
X is even
</cfif>
 

3. New database drivers

ColdFusion 5 includes new ODBC drivers from Merant. These æwire-protocolÆ drivers offer a more direct and efficient connection to several types of databases.  

To locate the new drivers:  

  • Open the ColdFusion Administrator in a browser
  • Click on ODBC Data Sources from the menu on the left
  • Check the list of available Merant drivers from the select control


4. Query of queries

ColdFusion 5 allows you to write SQL queries against query result set variables. This allows you to easily integrate information from multiple data sources and increase query performance by querying result sets in memory.

The following code example shows how to combine the results of queries from two separate data sources:

<!--- Regular query 1 gets information about Employees --->
<CFQUERY NAME="qEmployees" DATASOURCE="CompanyInfo">
SELECT * FROM Employee
</CFQUERY> 

<!--- Regular query 2 gets information about Partners --->
<CFQUERY NAME="qPartners" DATASOURCE="PartnerInfo">
SELECT * FROM Partners
</CFQUERY> 

<!-- Combine queries of employees and partners using query of queries --->
<CFQUERY name="qEmpDep" dbtype="query">
SELECT * FROM qEmployees
UNION
SELECT * FROM qPartners
</CFQUERY>


5. Graphing data  

ColdFusion 5 includes a special version of Macromedia Generator that can produce a range of dynamic graphs. Graphs can be produced from queries, by specifying particular values or a combination of both.  

You can create the following types of graphs:  

  • Bar
  • Horizontal bar
  • Line
  • Area (a line graph with the area below the line filled in)
  • Pie  

The following code example will generate a simple graph from a query:  

<cfgraph type="bar"
query="DataTable"
valueColumn="AvgByDept"
itemColumn="Dept_Name">
</cfgraph>


6. Partial page output

The new CFFlush tag allows you to incrementally output ColdFusion pages as they are produced. This tag is particularly useful for returning long-running pages, such as complex searches.  

The following code example shows the use of CFFlush. The page header will be displayed to the user while the rest of the page is still running:  

<!--- Include the page header --->  
<cfinclude template="header.cfm">  

<!-- Send the page header out to the browser so the user knows something is happening --->  
<cfflush>
 

<!--- Put slow queries below here.  --->
à


7. Use Administrator help

The ColdFusion Administrator now has built-in help. The help documents all function within the administrator. There are also complete guides for the new administrative tools in ColdFusion 5 Enterprise.


8. Customise logs

The new CFLog tag can be used to write customised log entries. You can create your own log file or write to the built-in Application or Scheduler logs. This tag is useful for customised error handling, reporting and audit trails.


9. Server reports

You can now monitor the ColdFusion server with a range of built-in administrative reports. To view the reports:

  1. Open the ColdFusion Administrator
  2. Click on Tools at the top of the left menu
  3. Select Server Reports


10. Upgrade Studio help

Macromedia has released an update for ColdFusion Studio 4.5. The update allows users of ColdFusion Studio 4.5.2 to take advantage of the new features of ColdFusion 5 by installing new ColdFusion 5 tag definitions and help files on workstations currently running Studio.

You can download the update from:

http://www.coldfusion.com/developer/REFERENCEDESK/ProductUpdates.cfm


11. CFDump

CFDump is a new ColdFusion tag that is very useful for debugging your templates. CFDump can display the contents of simple variables, queries, arrays, structures and WDDX variables created with the CFWDDX tag.

The following code example shows CFDump being used to display a query variable:

<cfquery name="qEmployees" datasource="CompanyInfo">  
SELECT * FROM Employee  
</cfquery>  
<!--- Display the contents of the query variable "qEmployees" --->  
<cfdump var="#qEmployees#">  

 

12. Generate Crystal reports

The CFReport tag allows reports from the Crystal Reports Professional report writer to be displayed through a ColdFusion interface. The CFReport tag requires the name of the report to run and you can also pass information to the report file being displayed to change the reportÆs appearance. 

The following code example shows a simple call to CFReport:

<cfreport report = ô/reports/monthlysales.rptö>

© Australian Consolidated Press 2001. All rights reserved.