Saturday, June 21, 2008

ColdFusion Interview Questions

How would you loop through a SQL result set stored in the CF variable named my “results” and output the result set columns named “cola” and “colb” in an html table?

<cfoutput query=”results”>

Given the url http://localhost/test.cfm?printmesg=yes How would you write an if statement which would echo the message “hello world!” if the url parameter printmesg equals “yes”.

<cfif isDefined(”url.printmesg”) and url.printmesg IS “yes”>
hellol world!

When is it appropriate to use <cfparam> versus <cfset>?

<cfparam> allows you to set a default parameter if that variable does not have a value bound to it.
<cfset> merely sets the value of a given variable.

Given the datasource named “mydb” and a SQL stored procedure named “mystoredproc” which takes the following two parameters one VARCHAR param and one INTEGER parameter respectively, how would you declare this using the cold fusion tags <cfstoredproc>, <cfprocparam>, and <cfprocresult>?

<cfset param1 = “this is my test string”>
<cfset param2 = 1>

<cfstoredproc datasource=”mydb” procedure=”mystoredproc”>
<cfprocparam type=”IN” cfsqltype=”CF_SQL_VARCHAR” dbvarname=”@parama”
<cfprocparam type=”IN” cfsqltype=”CF_SQL_INTEGER” dbvarname=”@paramb”
<cfprocresult name=”myprocresult”>

How do you call a module named “testmod.cfm” with the parameters param1=”yes” and param2=5?

<cfmodule template=”testmod.cfm”

When is it appropriate to use <cfinclude> versus <cfmodule>?

Given two tables:

| id |
| title |
| rating |
| length |
| country |

| id |
| movie_id |
| name |

How would you write a SQL statement to find the names of all the actors associated with a movie titled “fight club”?

FROM movie INNER JOIN actor ON = actor.movie_id
WHERE movie.title = ‘Fight Club’

| id |
| title |
| rating |
| length |
| country |

| id |
| movie_id |
| name |

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

FROM movie LEFT JOIN director ON = director.movie_id

If there are no indices defined on any of the columns in the above two tables, which columns would you index to speed up the LEFT JOIN query?


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


CREATE procedure [dbo].getDirector (
@movie_id INT

SELECT name FROM directors WHERE movie_id = @movie_id


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 would you format some text using css to be verdana and bold?

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

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.

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?

table {
background-color: yellow;
td {
margin: 0 10px 0 0;

<td>Hello world</td>

ColdFusion Interview Questions - Part II
post info
By prayes
Categories: ColdFusion
Tags: ColdFusion

1. Which path is used in the template attribute in the tag?

A. physical path
B. calling template relative path
C. web document root relative path
D. any directory under Cfusion\CustomTags

The correct answer is B.

2. Which of the following would be the last one to capture an exception?

B. <CFERROR TYPE=”Request”>
C. <CFERROR TYPE=”Exception”>
D. site-wide error handler specified in the ColdFusion Administrator

The correct answer is D.

3. Of these tags with errors, which could NOT be caught with a block?

A. <CFSET X = 5 / 0>
B. <CFEST X = 5 / 0>
C. <CFSET X = “Y” + 1>
D. <CFINCLUDE TEMPLATE=”file.cfm”> where file.cfm is NOT found

The correct answer is B.

4. If you have the following variable definition in the Application.cfm file, what is the scope of the variable after it is created?

<CFSET x = “foo”>

A. Variables (local)
B. Application
C. Session
D. Request

The correct answer is A.

5. What is the purpose of the GetAuthUser() function?

A. To log in a specified user
B. To return the name of a logged in user who is requesting the page on which the function is used
C. To retrieve user details from a specified data source
D. To assign roles to the user who is requesting the page on which the function is used

The correct answer is B.

6. Which of the following variable types requires the use of the scope when referencing the variable? (Choose two)

A. request
B. form
C. local
D. application

The correct answer is A and D.

7. Which function is necessary when using CACHEDWITHIN attribute with the <CFQUERY> tag?

A. CreateDateTime()
B. ParseDateTime()
C. CreateTimeSpan()

The correct answer is C.

8. What is missing from the following <CFQUERY> tag’s SELECT statement if you want to return the count?

SELECT Count(*)
FROM TestTable

A. SELECT Count(CountVar)
B. SELECT Count(*) AS CountVar
C. SELECT Count(*) INTO CountVar

The correct answer is B.

9. Which of the following ANSI standard WHERE clauses will return all rows where City begins with the letter ‘S’?

B. WHERE City = ‘S*’

The correct answer is D.

10. Which one of the following tags is used for server-side validation? (Choose one.)

A. input type =”text”
B. input type=”hidden”
C. input value=”hidden”
D. input value=”text”

The correct answer is B.

11. When will the cookie created by the following tag expire?

<CFCOOKIE name=”bgcolor” value= “bgcolor”>

A. never
B. after one day
C. when the last browser window is closed
D. after the timeout period for session variables has elapsed

The correct answer is C.

1: What exactly is ColdFusion?
ColdFusion is actually two things, it is an application server and it is also a language. Most ColdFusion developers do not distinguish the two – they install the ColdFusion application server and use the ColdFusion language (called CFML for ColdFusion Markup Language) to write applications that run on that server. But ColdFusion the language can also be used on top of other application servers, J2EE application servers, providing an alternate and simplified scripting syntax for those high-end servers. Either way, the CFML language is used to create powerful applications quickly and easily, applications that run on the ColdFusion application server, or on an application server of your choice.

2: How old is ColdFusion?
ColdFusion is the original Web application server (even predating that term); it was created in 1995 making it the most mature product in the space.

3: How many organizations use ColdFusion?
ColdFusion is used by over 10,000 organizations worldwide and runs on over 125,000 servers.

4: How many developers use ColdFusion?
Conservative estimates put the number of ColdFusion developers at approximately 350,000. In reality this number is likely much higher as ColdFusion is sold per server and there is no limit to the number of developers who could use the same server.

5: How successful has ColdFusion been relative to other application servers?
Very. ColdFusion is the leading commercial (as in paid for) application server, and is second only to ASP in published pages. ColdFusion is used by over 75% of the Fortune 100.

6: What types of applications are built using ColdFusion?
While ColdFusion is used for all kinds of applications, including dynamic web sites, e-commerce sites, and portals, the significant majority of ColdFusion applications are Intranet and data reporting applications. This has always been one of ColdFusion's key strengths, and continues to be so.

7: Why do I not see more public ColdFusion driven sites?
Actually, there are lots of public ColdFusion sites out there. But, as Intranets and reporting is where ColdFusion tends to be most used the majority of ColdFusion powered applications are behind firewalls and on corporate networks. These can skew the perception of usage and page counts. For an idea of who is using ColdFusion see the lists on as well as

8: Why do companies buy ColdFusion when ASP and PHP are free?
Free is a bit of an overstatement. Yes, some core functionality may be available just by downloading software, but ColdFusion includes significant integrated services that are not included with other products. Major features like business graphing and full-text search, as well as small utility features like handling file uploads and reading and writing e-mail messages are not part of ASP and PHP and are included with ColdFusion. One recent estimate found that to add CF Professional functionality to ASP involved a raw cost of goods that topped $30,000. As such, ColdFusion Professional (for well under $1,000) is a real value. And that does not even take into account the cost savings of a simpler learning curve and shorter development cycle.

9: Isn't ColdFusion proprietary, and isn't using proprietary software dangerous?
No, ColdFusion is not proprietary. In fact, there are several other products (from other vendors) that have implemented CFML (or parts of it). In addition, ColdFusion leverages all open and public standards for everything from database integration (JDBC, ODBC) to configuration files (XML) to underlying architecture (J2EE). In fact, some might argue that ColdFusion and CFML are less proprietary than ASP and PHP (which are not supported by third party servers) and even Java itself (there is no licensing program or fee required to be ColdFusion compatible).

10: What is CFML?
CFML is the ColdFusion Markup Language, a tag based programming language designed specifically for writing Web and Internet based applications. CFML looks more like HTML than it does traditional programming languages, and this makes the language easy to learn and use (no more difficult than HTML). CFML is supported by ColdFusion as well as by some third party servers.

11: I have heard it argued that CFML is not a real programming language. Is this the case?
You can write real programs in CFML, that makes it a real programming language. Having said that, CFML has taken some heat for not looking like traditional programming languages (it is primarily tag based, not script based). There are several important points to keep in mind here: 1) CFML was designed to mimic HTML because it is HTML (and its inherent simplicity) that made the Web successful; rather than retrofitting existing languages to be Web centric (think Perl) CFML was built from the ground up for this space. 2) ColdFusion does indeed support scripting for programmatic tasks (flow control, conditional processing, etc.) via and more recently server-side ActionScript. 3) CFML is a very powerful programming language and is made up of about 100 tags and over 200 functions that perform all common programmatic operations and many not so common ones too (LDAP interaction, XML abstractions, COM and CORBA support, graphing and full text searching, and more). 4) It is somewhat ironic that for 5 years CFML was criticized for being tag based, and then comes ASP.NET featuring tag abstractions, and JSP which is essentially tag wrappers around Java code, and even XML which is nothing more than tag based data sharing. Looks like CFML had it right all along.

12: What are .CFM and .CFC files?
CFML code is saved in files with either a .CFM or a .CFC extension. .CFM files are standard ColdFusion files and may be plain files, included files, or Custom Tags. .CFC files are ColdFusion Components (reusable ColdFusion objects).

13: Isn't ColdFusion a low-end and entry-level solution?
Only if you want it to be. ColdFusion is a tool, what you do with the tool is up to you. Sure, lots of entry-level solutions have been built with ColdFusion – after all, for beginners ColdFusion is the easiest product and technology to learn. But unlike many easy-to-learn tools, ColdFusion allows users to expand their use to much more advanced applications. In addition to the many basic applications, many high-end and mission critical applications have been built with ColdFusion too. ColdFusion is no more "low-end" than a hammer is "a tool to build only small houses" – it's not the tool, it's how you use it.

14: Doesn't ColdFusion encourage poor programming practices?
No, not at all. ColdFusion provides all the necessary building blocks to create highly scalable, structured, manageable, and maintainable code. ColdFusion does not enforce any particular development methodology or structure – this is deliberate and by design as ColdFusion's emphasis is on getting the job done. Many developers do in fact start off by writing code that is less than ideal, and then learn and grow with the product. The fact of the matter is that not every application need be n-tier, implemented using model-view controllers, or built using design patterns. However, all of these are supported (especially via ColdFusion Components) and should be used when needed. In other words, you'll not outgrow ColdFusion – use it as suits you best and then keep getting better.

15: I have no programming experience. Is ColdFusion for me?
Absolutely. You'll need to learn some HTML and SQL, but Dreamweaver MX can even help with those too. Unlike other programming languages, you'll find yourself productive in ColdFusion in hours (not days or weeks or months).

16: I am an experienced developer and use C and/or Java, why should I use ColdFusion?
C and Java are great low-level programming languages, and are ideally suited for heavy-lifting and back-end processing. But you'd never want to generate HTML output or interact with form submissions using those languages. It would be way too much work and with no real value or upside. Rather, you should use a combination of ColdFusion with those languages and tier your development. Let ColdFusion handle the presentation layer and all web integration, and use your C or Java code for the back-end. It's the ideal solution.

17: I am a Flash user. Why should I use ColdFusion?
As a Flash user you already understand the importance of creating rich and engaging user experiences. Flash is often used for animation, intros, advertisements, and special effects, but Flash can do a whole lot more too. Flash can also be used as a front end for Internet based applications, and ColdFusion is ideally suited to be the back-end powering your Flash applications. ColdFusion and Flash are designed to talk to each other allowing you to build client-server type applications easily and effectively – Flash as the client and ColdFusion as the server.

18: My company has standardized on the J2EE platform. Doesn't this preclude the use of ColdFusion?
On the contrary. Your company has made a strategic decision to builds its IT infrastructure on an incredibly powerful facilitating technology, one that is steadily growing in popularity. J2EE (the Java platform) provides the architecture and the building blocks needed to build reliable, robust, and scalable applications. But all that power comes with a price (and not just the cost of software) – J2EE development is complex and beyond the scope of most members of most organizations. And even for experienced Java developers, not all tasks need be (or even should be) written in low-level Java. ColdFusion MX can sit on top of J2EE implementations, leveraging the underlying architecture and investment, while making its power accessible to all. Or put another way, ColdFusion MX delivers the power of underlying J2EE to those to whom it would have been inaccessible, and along the way makes accomplished Java developers far more productive. Not only does a move to J2EE not preclude the use of ColdFusion, it actually makes ColdFusion a logical choice for you – you've already made a massive investment (both financially and resource-wise), with just a little more money that investment can actually become usable by all.

19: As ColdFusion MX is built on underlying Java technology, is Microsoft and Windows support going to be discontinued?
The significant majority of ColdFusion installations run on Windows and use Microsoft back-ends (SQL Server, for example). There are no plans whatsoever to drop support for our most used platform, and with new support for .NET services ColdFusion has stronger Windows support than ever before. At the same time, ColdFusion also supports non-Microsoft platforms like Linux, Solaris, and HP-UX and non-Microsoft databases like Oracle, DB2 and mySQL – making it one of the most flexible products on the market.

20: Active communities are important to the success of any technology. Does ColdFusion have a strong and involved user community? Comments
ColdFusion has always had strong community ties, and the direction and growth of product has always been very community driven. There are numerous discussion lists, forums, publications, user groups, events (both Macromedia events and independent events) and an entire third-party publishing industry too.

21: Is Macromedia committed to ColdFusion?
Definitely. In fact, the latest version of ColdFusion (the first built entirely by Macromedia) was built by the largest product development team ever with the greatest budget and resource allocation of any ColdFusion to date. That alone is testament to Macromedia's commitment to ColdFusion and the ColdFusion community.


1: What do I need to start writing ColdFusion? Comments
You need two things: 1) a ColdFusion server to run your applications, you may either use an ISP who offers ColdFusion hosting or install your own server, and you may even install a local copy of ColdFusion for development at no cost whatsoever. 2) You also need an editing environment. Your best bet is to use Dreamweaver MX, but any text editor may be used.

2: Realistically, what skills do I need to be productive using ColdFusion?
You should be familiar with web and internet basics, and you should know the basics of using HTML to build web pages. You also need a good working knowledge of SQL. Armed with these you'll find yourself productive with ColdFusion in no time.

3: Which version of ColdFusion should I install to get started?
If you want to experiment with ColdFusion, your best bet is to use the Developer Edition (it even has an integrated Web server to help you get up and running quickly and easily). However, you cannot deploy applications using the Developer Edition - you'll need a full version of ColdFusion, and you have two choices: ColdFusion MX Standard is the entry-level version of ColdFusion, or ColdFusion MX Enterprise (which can be installed standalone or as a Java application on top of a J2EE server).

4: Where can I obtain a copy of ColdFusion?
ColdFusion can be bought from Macromedia directly at and from resellers (information at that same URL). You can also download a trial version by going to The trial version is the full product and will run for 30 days from the time of installation. After 30 days it reverts to a Developer Edition which may be used for ongoing development.

5: What is the ColdFusion Developer Edition?
ColdFusion Developer Edition is a non-expiring version of ColdFusion that is freely available to ColdFusion developers. It is the full ColdFusion Enterprise product but limited in that it will only process local requests as well as requests from one other IP address. As such, it is useful for development only (you can test pages on the server hosting ColdFusion and from one other machine). Applications created with the free Developer Edition may be deployed on full versions of ColdFusion. The Developer Edition is actually the full Enterprise product, at install time you'll be able to select an option that activates it as a Developer Edition (instead of having to provide a license number). The Developer Edition is also included with the Macromedia MX Studio.

6: What are the primary differences between ColdFusion Standard and ColdFusion Enterprise?
ColdFusion Enterprise runs on more platforms and supports more databases than does ColdFusion Standard, and also includes a full copy of JRun, supports the creation of multiple ColdFusion instances, features high performance mail delivery, and more. Sites that require high availability and greater performance should consider using the Enterprise edition. The complete feature comparison chart is at

7: Is ColdFusion available for Mac OSX?
A Developer Edition of ColdFusion MX for J2EE is available for Mac OSX. It requires that a J2EE server (like JRun or Tomcat) be installed, and ColdFusion will run on top of it. At this time there is no production version of ColdFusion for OSX.

8: Where can I find a hosting company that offers ColdFusion hosting?
The most complete ColdFusion ISP list is at

9: Where can I find books on ColdFusion?
Start at, the "ColdFusion Web Application Construction Kit" is the book used by most ColdFusion developers. If you need a quick introduction to SQL take a look at "Sams Teach Yourself SQL in 10 Minutes".

10: I need a class to help me get started. Where can I find out about ColdFusion training? Comments
If you are just starting with ColdFusion you may want to take Macromedia's "Fast Track to ColdFusion" class - a 3 day introduction to ColdFusion. Information about this class (and other classes on ColdFusion, Flash, Dreamweaver, and more) is at

11: What methodology should I use for my ColdFusion development? Comments
That's a tough one. There is no right or wrong methodology, nor is there a preferred methodology. The only real wrong is writing applications without a methodology, be it a formal one or one of your own. The most popular ColdFusion framework and methodology is the independent initiative Fusebox (, and many ColdFusion developers are now paying attention to Mach-II (



harri said...


I read this post two times.

I like it so much, please try to keep posting.

Let me introduce other material that may be good for our community.

Source: Construction interview questions

Best regards

Ivan said...


I like this post:

You create good material for community.

Please keep posting.

Let me introduce other material that may be good for net community.

Source: Construction interview questions

Best rgs

otr214421 said...

Work from home theory is fast gaining popularity because of the freedom and flexibility that comes with it. Since one is not bound by fixed working hours, they can schedule their work at the time when they feel most productive and convenient to them. Women & Men benefit a lot from this concept of work since they can balance their home and work perfectly. People mostly find that in this situation, their productivity is higher and stress levels lower. Those who like isolation and a tranquil work environment also tend to prefer this way of working. Today, with the kind of communication networks available, millions of people worldwide are considering this option.

Women & Men who want to be independent but cannot afford to leave their responsibilities at home aside will benefit a lot from this concept of work. It makes it easier to maintain a healthy balance between home and work. The family doesn't get neglected and you can get your work done too. You can thus effectively juggle home responsibilities with your career. Working from home is definitely a viable option but it also needs a lot of hard work and discipline. You have to make a time schedule for yourself and stick to it. There will be a time frame of course for any job you take up and you have to fulfill that project within that time frame.

There are many things that can be done working from home. A few of them is listed below that will give you a general idea about the benefits of this concept.

This is the most common and highly preferred job that Women & Men like doing. Since in today's competitive world both the parents have to work they need a secure place to leave behind their children who will take care of them and parents can also relax without being worried all the time. In this job you don't require any degree or qualifications. You only have to know how to take care of children. Parents are happy to pay handsome salary and you can also earn a lot without putting too much of an effort.

For those who have a garden or an open space at your disposal and are also interested in gardening can go for this method of earning money. If given proper time and efforts nursery business can flourish very well and you will earn handsomely. But just as all jobs establishing it will be a bit difficult but the end results are outstanding.

Freelance can be in different wings. Either you can be a freelance reporter or a freelance photographer. You can also do designing or be in the advertising field doing project on your own. Being independent and working independently will depend on your field of work and the availability of its worth in the market. If you like doing jewellery designing you can do that at home totally independently. You can also work on freelancing as a marketing executive working from home. Wanna know more, email us on workfromhome.otr and we will send you information on how you can actually work as a marketing freelancer.

Internet related work
This is a very vast field and here sky is the limit. All you need is a computer and Internet facility. Whatever field you are into work at home is perfect match in the software field. You can match your time according to your convenience and complete whatever projects you get. To learn more about how to work from home, contact us today on workfromhome and our team will get you started on some excellent work from home projects.

Diet food
Since now a days Women & Men are more conscious of the food that they eat hence they prefer to have homemade low cal food and if you can start supplying low cal food to various offices then it will be a very good source of income and not too much of efforts. You can hire a few ladies who will help you out and this can be a good business.

Thus think over this concept and go ahead.