Tally List : mailing list management, archiving, and analysis
click for archive home
 
Archive of:
CFtipsPlus
Cold Fusion tips email (external)
 
home
24 hour view
quick stats
weekly updates
 
all tallylists
corporate solutions
archive your favorite
help / feedback


Search the Tallylist search by keyword:

About Cold Fusion Tips :
product's home
product's list home
 
  Archived TallyList / CFtipsPlus: 
Subject: ColdFusion 5.0: What's new? | Application.cfm and OnRequestEnd
Nathan Stanford (23p/+0r)     Posted: Saturday 17 Feb 2001
This post: 127 views, +0 rating

============== ColdFusion TIPS PLUS ColdFusion 01 Volume 01 Issue 07 =============================================================== http://www.cftipsplus.com ============== Issue 00046 ============== I. Comments: II. ColdFusion 5.0: What's new? By Kevin Schmidt, Web Technology Manager Allaire Certified Cold Fusion Developer schmidt@pwb.com

III. Application.cfm and OnRequestEnd By Nathan Stanford admin@nsnd.com ============== Next Week's Issue will include the following:

Issue 00047

Using <CFINSERT> and <CFUPDATE>: No SQL required!

============== I. Comments:

If you would like to write for cftipsplus.com send us an email to:

cftips@nsnd.com

We are looking for a few new writers. We have been providing tips for more then a year now and we are expecting to grow.

=============================================================== If you have any suggestions please email me at cftips@nsnd.com. ===============================================================

=============================================================== II. ColdFusion 5.0: What's new?

By Kevin Schmidt, Web Technology Manager Allaire Certified Cold Fusion Developer schmidt@pwb.com ===============================================================

ColdFusion 5.0: What's new?

I recently downloaded the Beta verison of ColdFusion 5.0 as well as the documentation and found out there are some very exciting new features packed into it.

There is a whole slew of new changes to the administrative piece of the server and several new features on the scripting side. The ones with the biggest buzz surrounding them are the ability to query a query and the <CFFLUSH> tag. I'll focus mainly on these two aspects.

Query A Query

ColdFusion currently supports caching a query but what if you wanted a subset of data from that query you had to take a trip back to the server. That's no longer the case. There's a new dbtype specification in the <CFQUERY> tag, query. This allows you to run a query against an already existing recordset, including cached queries. You specify the original query name in the query attribute of the new <CFQUERY> tag. (Wow that's a toungue twister)

Below is an example:

<!--- Originial Query ---> <CFQUERY NAME="Employees_Query" DATASOURCE="Employee"> SELECT * FROM Employee_Information </CFQUERY>

This query returns all the records in the employee_information table. What if we wanted to just have everyone whose last name started with S. Rather than take another trip to the database we can pull this information from the query we just ran.

See below:

<!---Query of Query ---> <CFQUERY NAME="S_Employees" DATASOURCE="foo" DBTYPE="query"> SELECT * FROM Employees_Query WHERE Last_Name LIKE 'S%' </CFQERY>

All we need to do is specify the FROM attribute as our original query name rather than the table in the database.

<CFFLUSH>

Developers have long awaited this tag. <CFFLUSH> allows you to flush the current ColdFusion output buffer to the web server. This tag also sends back all the HTML headers as well. Unfortunetely, once you have done this you can't execute any CF tag that would affect the header in any way. (cfcontent, cfcookie, cfform,cfheader, cfhtmlhead, cflocation). You can also specify the interval in bytes that when reached the output buffer is autmatically flushed.

Syntax below:

<CFFLUSH interval = "bytes">

There are a few other items in CF 5.0 worth mentioning. <CFFTP> now supports the ability to remove directories and there is a new tag <CFLOG> for log file management. There is also a new function GetHttpRequestData that returns a ColdFusion structure containing all the HTTP request data.

The Beta and the documentation are available at beta.allaire.com. All you have to do is register.

As always, if you have any questions please feel free to contact me at schmidt@pwb.com

Coming Next Week: Using <CFINSERT> and <CFUPDATE>: No SQL required!

If you have any questions or suggestions for tips you would like to see feel free to email me at schmidt@pwb.com

Until next time Happy CFing.

Kevin Schmidt, Web Technology Manager Allaire Certified Cold Fusion Developer ===============================================================

============== III. Application.cfm and OnRequestEnd By Nathan Stanford admin@nsnd.com ==============

Application.cfm ===============

Most ColdFusion Developers have used application.cfm. In case you have not you should know that ColdFusion will run the application.cfm file before running your code. This can be a great place to test to see if the user is logged in or to set default variables. ColdFusion will look first in the current directory for a application.cfm the it will search the directory structure until it finds one or reaches the top.

Important to note... it will go up the directory structure even out side of the root.

EX: C:\Application.cfm C:\inetpub\wwwroot\index.cfm

If there is no application.cfm in C:\inetpub\wwwroot\ and in C:\inetpub\ then it will use C:\Application.cfm. This is why it is a good idea in my mind even if you do not want to use a application.cfm that you should at least put a application.cfm in your web root directory.

OnRequestEnd.cfm ================

The OnRequestEnd.cfm file has not been used by most beginner ColdFusion Programmers. This file will be ran by ColdFusion after it finishes running the currect ColdFusion file. So this is a great place to finish up on processes. The only thing is that it must be in the exact same directory that ColdFusion found the application.cfm. It does not look anywhere else for it.

Nathan Stanford admin@cftipsplus.com ============== Publisher and Creator: Nathan Stanford, admin@cftipsplus.com

Web Developers: Dain Anderson, danderson@cftipsplus.com Hal Helms, hal.helms@TeamAllaire.com Kevin Schmidt, schmidt@pwb.com Andres Adamoli, andres@adamoli.com Sarah Durham, sarah@rmls.com Scott Knaub, scott@web-mgt.com Vincent Egt, vincent@e-dynamics.nl

============== Copyright (c) 2000 - 2001 CFTIPSPLUS.COM and NSND.COM Permission is granted to circulate this publication via MANUAL forwarding by email to friends provided that the text is forwarded in its entirety and no fee is charged. ==============

============== To unsubscribe: unsubscribe-cftips@nsnd.com

To subscribe: subscribe-cftips@nsnd.com ==============

____________________________________________________________ T O P I C A -- Learn More. Surf Less. Newsletters, Tips and Discussions on Topics You Choose. http://www.topica.com/partner/tag01


Similar Subject Line Posts (+/- two weeks of this post)
ColdFusion 5.0: What's new? | Application.cfm and OnRequestEnd  17 Feb 2001 (this post)   (127 v/ +0 r)
 

Send a reply to the CFtipsPlus list!
click to send a reply! NOTE: Many lists will reject your post unless you have already registered with them. Also - don't forget the right account to send from (for those with multiple emails!)

Feedback: If this post was exceptionally helpful, please help by giving this post a positive review.

 

TallyList : copyright Ububik - 2000