ColdFusion Interview Preparation Guide
Download PDF

ColdFusion Interview Questions and Answers will guide us now that ColdFusion is a commercial rapid application development platform. Originally designed to make it easier to connect simple HTML pages to a database, by 2.0 had become a full platform that included an IDE in addition to a full Scripting Language. Current versions of ColdFusion, sold by Adobe Systems. ColdFusion primarily competes with PHP and ASP. Learn ColdFusion by this ColdFusion Interview Questions with Answers Guide

24 ColdFusion Questions and Answers:

1 :: Difference between Cold fusion MX 6 and Cold fusion MX 7?

Windows authentication introduced thorough "cfntauthenticate" tag
cfcompile utility introduced which used for Sourceless deployment
Administrator API: Change ColdFusion settings programmatically, without logging into the CF Administrator.
Gateways: SMS, IM (based on Extensible Messaging and Presence Protocol) gateways introduced
Flash forms , Skinnable XML forms introduced
New report builder introduced

2 :: What is Application.cfm?

When ColdFusion receives a request for an application page, it searches the page's directory for a file named Application.cfm. If one exists, the Application.cfm code is logically included at the beginning of that application page.
If your application runs on a UNIX platform, which is case-sensitive, you must spell Application.cfm with an initial capital letter.

3 :: Can we have multiple Application.cfm file in an Application?

Yes. If the application page directory does not have an Application.cfm page, ColdFusion searches up the directory tree until it finds an Application.cfm page. If several directories in the directory tree have an Application.cfm page, ColdFusion uses the first page it finds. If the Application.cfm page is present in the directory tree (and has the required permissions set), you cannot prevent ColdFusion from including it.
ColdFusion processes only one Application.cfm page for each request. If a ColdFusion page has a cfinclude tag pointing to an additional ColdFusion page, ColdFusion does not search for an Application.cfm page when it includes the additional page.

4 :: What is the difference between absolute and relative div positioning?

Absolute is from the absolute 0,0 position in the top left corner of the browser window. Relative is relative from the positioning of where the div is declared within the html body.

5 :: How would you declare an inline css to format the table with a background color of yellow and give the table cell a right margin of 10 pixels?

<style>
table {
background-color: yellow;
}
td {
margin: 0 10px 0 0;
}
</style>

<table>
<tr>
<td>Hello world</td>
</tr>
</table>

6 :: How would you format some text using css to be verdana and bold?

.myfontclass {
font-family: Verdana;
font-weight: bold;
}

7 :: What is the working process for Application.cfm?

Yes. If the application page directory does not have an Application.cfm page, ColdFusion searches up the directory tree until it finds an Application.cfm page. If several directories in the directory tree have an Application.cfm page, ColdFusion uses the first page it finds. If the Application.cfm page is present in the directory tree (and has the required permissions set), you cannot prevent ColdFusion from including it.
ColdFusion processes only one Application.cfm page for each request. If a ColdFusion page has a cfinclude tag pointing to an additional ColdFusion page, ColdFusion does not search for an Application.cfm page when it includes the additional page.

8 :: What is cfapplication tag?

It defines the scope of a ColdFusion application; enables and disables storage of Client variables; specifies the Client variable storage mechanism; enables Session variables; and sets Application variable time-outs.

9 :: How can you set the Client Management?

We can enable & disable client management as well as we can configure How & Where client variables need to be store
1. In the Application.cfc initialization code
This.clientmanagement="True" / "false"
This.clientStorage="[Ur_datasource_name]" / "registry" / "cookie"
2. In appliation.cfm using <cfappliaction> tag attributes
clientManagement="yes" / "no"
clientStorage="[Ur_datasource_name]" / "registry" / "cookie"
[Ur_datasource_name] - Stored in ODBC or native data source. You must create storage repository in the Administrator.
registry - Stored in the system registry.
cookie - Stored on client computer in a cookie. Scalable. If client disables cookies in the browser, client variables do not work.

10 :: How can you set the Session Management?

Same as client management description in previous question sessionmanagement variable available, we can use that variable.

11 :: What are Session Timeout and Application Timeout? Where we have to do this process?

ApplicationTimeout : The time span an application will exist before it times out (if the application is not accessed in any way). This defaults to the value set in the ColdFusion administrator.
SessionTimeout : The time span a session will exist before it times out (if the application is not access in any way by that session's user). This defaults to the value set in the ColdFusion administrator.

12 :: How can you clear the cache?

To Flush cached queries <cfobjectcache action="clear">
To Flush cached pages <cfcache action="flush">

13 :: What are the advantages and disadvantages of using stored procedures versus calling SQL inline in Cold Fusion?

Stored procedures abstract database logic from server side code. They also offer performance benefits in pushing application logic to the database side.

The disadvantage is that if they are poorly written then they can hinder database performance and make development a little more obfuscated.

14 :: How would you write a simple stored procedure in TSQL which takes a movie_id and returns all the directors associated with it?

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE procedure [dbo].getDirector (
@movie_id INT
)

SELECT name FROM directors WHERE movie_id = @movie_id

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

16 :: How would you write a LEFT JOIN statement to return a result set of movie.title’s and director.name’s?

SELECT
movie.title,
director.name
FROM movie LEFT JOIN director ON movie.id = director.movie_id

18 :: Explain the structure of Cold fusion?

ColdFusion is implemented on the J2EE. J2EE is a standard, it is not a programming language. J2EE is an implementation of the Java programming language, but includes a number of Application Programming Interfaces (APIs) for connecting to databases, queuing messages, connecting to registries and naming and directory services.
All of these APIs are used by coldfusion for many of its base services and other runtime services.

ColdFusion consists of following components:
► cf script
► CFML
► ColdFusion Administrator
► Verity Search Server

19 :: What is Web Server?

A computer that delivers (serves up) Web pages. Every Web server has an IP address and possibly a domain name. For example, if you enter the URL http://www.domainname.com/index.html in your browser, this sends a request to the server whose domain name is domainname.com. The server then fetches the page named index.html and sends it to your browser.

Any computer can be turned into a Web server by installing server software and connecting the machine to the Internet. There are many Web server software applications, including public domain software from NCSA and Apache, and commercial packages from Microsoft, Netscape and others.

20 :: What is Application Server?

A server that exposes business logic to client applications through various protocols including HTTP, HTTPS, IIOS/SSL. Eg: Sun Java Application server, weblogic server

It takes care of important issues like Transaction Management, Security, Database Connection Pooling, Clustering, Scalability,session management,load balancing,thread management and Messaging etc. A web server cannot provide these.