ColdFusion Interview questions 2021 - Part 1

 1. What is ColdFusion. How it works?

ColdFusion is a powerful and fast development platform built on java for web application development. For more detailed explanation,  you can refer the video below:





2. Difference between Application.cfc and Applicaion.cfm

Every time a page runs, ColdFusion looks for the Application.cfm page  in the current directory and then in each parent directory up to the web root until it finds one. As soon as it finds an Application.cfm page, it runs it and stops looking.

ColdFusion looks for the Application.cfc, page in the same manner as it does for Application.cfm.

Below video shows the main difference between Application.cfm and Application.cfc


 



3. What are components in ColdFusion?

Components are nothing but a class with methods / functions and variables in it. In ColdFusion the tag <cfcomponent> is used for creating components. The functions inside a component can be created by using <cffunction> tag. The syntax for creating a component is :

<cfcomponent name="test">
       <cffunction name="testfunction1" returntype="any">
            ......
            
       </cffunction>
</cfcomponent>

Components can be instantiated by creating objects for that. There are different ways to create object of a compoent.

  • <cfobject> tag
  • CreateObject()
  • <cfinvoke> tag     
4. Object Oriented Concepts in ColdFusion?

Objects are implemented in different manners in different languages. In ColdFusion, in CF, objects are created using CFCs (Coldfusion Components).
Below video shows OOP concepts in ColdFusion.



5. What are the difference between cfset and cfparam?

cfset is used for creating a variable in ColdFusion. This tag can be used to call coldfusion components also. cfparam checks the existence of a variable and validates its data. The main difference between cfset and cfparam are given in the video below:


6. What is cfinclude tag? How to pass a variable to cfinclude?

<cfinclude > tag includes a file or template logically to the current file. the syntax to use the tag is :

<cfinclude template=" path of the file">

For more details video is below:




7. How to validate numeric value in coldfusion?

Numeric values can be validated using coldfusion methods isvalid() and isnumeric(). 

isvalid check the validation of given value with the given type. The syntax of isvalid() is isalid(type,value). So for numbers we can use isvalid("numeric","12") which will return true. 


isnumeric() checks whether a given value can be a numeric value or not. The syntax of this function is isnumeric(value). So for numbers, we can use isnumeric("20") which will return true.

For details with example, refer the video below:













Comments

Popular posts from this blog

how to add new line in google form questions | Fix for next line issue in google form questions

How to add new line in dropdown type question in google forms