Monday, November 07, 2011

Test Your ColdFusion skill ( Part - I)(ColdFusion - 8 and 9 )

  1. Which of the following page executes first when a ColdFusion Application runs.

    The page which will be mentioned in the URL.

  2. What is the scope of the following variable. <cfset x = “Hello World”>

    Request scope
    URL scope
    Application Scope
    variable(local) scope

  3. <cfcookie name="" value="wilson, john">
    When the above cookie variable will expire.

    After one day.
    When the browser will close.
    After time out period of session.
    After time out period of Application.

  4. Choose the scope of variable which always requires the scope before accessing the variables.

    local scope.
    form scope
    url scope
    request scope

  5. Which of the following scope is not appropriate for ColdFusion.


  6. What is the use of the tag “cfimap”

    Access google map in ColdFusion
    Access google map in igoogle.
    Manage your email in your mail account.
    Crate a mapping in ColdFusion admin.

  7. Which of the following is not a functionality of “cfsetting”.

    Manage request time out.
    Enable cfoutput.
    Suppress white space.
    Show debugging out put.

  8. How to call onSessionStart method in your application explicitly.

    By StructDelete method .
    By using StructClear method.
    By using <cfapplication> tag.
    We can’t call this method explicitly.

  9. Which operator is used to test for equality?


  10. Chose the incorrect ColdFusion output.

    YesNoFormat(“false“) = No
    YesNoFormat(“0”) = No
    YesNoFormat("-1") = No
    YesNoFormat("No") = No

Thursday, November 03, 2011

Application.cfm and Application.cfc

  • This is the first ColdFusion page that executes in a ColdFusion Application.
  • This file basically contains application level setting like setting of session, cookie variables for the application and data source for the application and some application level objects (if there is any).
  • It is not compulsory a ColdFusion application always needs the Application.cfm/ Application.cfc.
  • If an application contains both Application.cfm and Application.cfc in a root folder then Application.cfc will get more priority than Application.cfm in ColdFusion MX 7 +.
  • Application.cfc was first introduced in ColdFusion MX 7.
  • It is always advisable to write Application.cfc/Application.cfm instead of application.cfc/application.cfm. As application.cfc/application.cfm creates case sensitive issue in Linux system.

  • If we will place application.cfm in the root of our Application folder then all the codes of Apllication.cfm executes before the actual page execution.
  • If we will place Application.cfc in our project root then only some functions associated with a particular event gets executed. E.g onApplicationStart, onSessionStart, onApplicationEnd, onSessionEnd etc.
  • In a Application if the sub folder contains Applicaion.cfc / Application.cfm then the sub folders Application.cfc/cfm setting overwrites with the parent Application.cfc/cfm.