Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Difference between Application .cfc and .cfm?

Participant ,
May 14, 2007 May 14, 2007
Title says it all. I'm a bit confused about the difference between Application.cfc and .cfm.

I understand a bit more about the .cfc, where you define methods onRequestStart, etc.
Yet in an example I'm following, they use .cfm and the <cfapplication> tag. Both seem to get called, but should I only be using one file? Or?

Also since both can be used what is the calling order by ColdFusion or is one ignored if the other is present?
TOPICS
Getting started
7.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 15, 2007 May 15, 2007
application.cfc gives you more control over when code runs. In an application.cfm file, all of the code in that file is processed at the start of every page request. With application.cfc you can assign bits of code to the appropriate method.
Translate
LEGEND ,
May 14, 2007 May 14, 2007
if you have both files in the same location, only .cfc is processed.
.cfm is ignored if .cfc is found.
--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2007 May 15, 2007
LATEST
application.cfc gives you more control over when code runs. In an application.cfm file, all of the code in that file is processed at the start of every page request. With application.cfc you can assign bits of code to the appropriate method.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources