Important Adobe Coldfusion Interview Questions Part – 2
How Error Handling Is Handled In Coldfusion?
While debugging is mainly used to debug the code and to see run time values. Especially for trouble shooting. How ever, once the programs are in production server, we can not debug, but to avoide users seeing all the error messages when a program unexpectedly failed and throwing errors, we can use error handling methods.
TRY and CATCH is the best among them to handle any database related errors.
Here is your actual code…of coldfusion….
Write your message to the user in case of any error.
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.
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.
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
How Do You Call A Module Named “testmod.cfm” With The Parameters Param1=”yes” And Param2=5?
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 .
If There Are No Indexes Defined On Any Of The Columns In The Above Two Tables, Which Columns Would You Index To Speed Up The Left Join Query?
movie_id.
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
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.
How Can You Clear The Cache?
To Flush cached queries
To Flush cached pages
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.
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
In the Application.cfc initialization code This.clientmanagement=”True” / “false”
This.clientStorage=”[Ur_datasource_name]” / “registry” / “cookie”
In appliation.cfm using 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.
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 timeouts.
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.
How Would You Format Some Text Using Css To Be Verdana And Bold?
.myfontclass
{
fontfamily: Verdana;
fontweight: bold;
}
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?
Hello World
Can We Have Multiple Application.cfm File In An Application?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.
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.