<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Patrick Rayes &#187; ColdFusion</title>
	<atom:link href="http://patrickrayes.wordpress.com/category/technology/coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://patrickrayes.wordpress.com</link>
	<description>Technical Architect and Project Manager</description>
	<lastBuildDate>Tue, 21 Jul 2009 20:10:01 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='patrickrayes.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/f3775da9ad9044ea3b2c9a6644122cec?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Patrick Rayes &#187; ColdFusion</title>
		<link>http://patrickrayes.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://patrickrayes.wordpress.com/osd.xml" title="Patrick Rayes" />
		<item>
		<title>ColdFusion Coding Guideline and Best Practices</title>
		<link>http://patrickrayes.wordpress.com/2007/04/15/coldfusion-coding-guideline-and-best-practices/</link>
		<comments>http://patrickrayes.wordpress.com/2007/04/15/coldfusion-coding-guideline-and-best-practices/#comments</comments>
		<pubDate>Sun, 15 Apr 2007 06:53:29 +0000</pubDate>
		<dc:creator>prayes</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://patrickrayes.wordpress.com/2007/04/15/coldfusion-3/</guid>
		<description><![CDATA[Last year I put together this coding guideline document for ColdFusion developers. It covers the following topics:

Style: Naming, Comments &#38; Layout
Structure: Application, Component, Tag etc
Good Practice
Globalization

CLICK HERE to download the guideline in PDF format.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patrickrayes.wordpress.com&blog=976791&post=11&subd=patrickrayes&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Last year I put together this coding guideline document for ColdFusion developers. It covers the following topics:</p>
<ul>
<li>Style: Naming, Comments &amp; Layout</li>
<li>Structure: Application, Component, Tag etc</li>
<li>Good Practice</li>
<li>Globalization</li>
</ul>
<p><a href='http://patrickrayes.files.wordpress.com/2007/04/coldfusioncodingguideline.pdf' title='ColdFusion Coding Guideline'>CLICK HERE</a> to download the guideline in PDF format.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patrickrayes.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patrickrayes.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patrickrayes.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patrickrayes.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patrickrayes.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patrickrayes.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patrickrayes.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patrickrayes.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patrickrayes.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patrickrayes.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patrickrayes.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patrickrayes.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patrickrayes.wordpress.com&blog=976791&post=11&subd=patrickrayes&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://patrickrayes.wordpress.com/2007/04/15/coldfusion-coding-guideline-and-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/925b0aaddb041993501de3abd5a331a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prayes</media:title>
		</media:content>
	</item>
		<item>
		<title>ColdFusion Interview Questions &#8211; Part II</title>
		<link>http://patrickrayes.wordpress.com/2007/04/15/coldfusion-interview-questions-part-ii/</link>
		<comments>http://patrickrayes.wordpress.com/2007/04/15/coldfusion-interview-questions-part-ii/#comments</comments>
		<pubDate>Sun, 15 Apr 2007 06:13:27 +0000</pubDate>
		<dc:creator>prayes</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://patrickrayes.wordpress.com/2007/04/15/coldfusion-2/</guid>
		<description><![CDATA[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?
A. &#60;CFCATCH&#62;
B. &#60;CFERROR TYPE=&#8221;Request&#8221;&#62;
C. &#60;CFERROR TYPE=&#8221;Exception&#8221;&#62;
D. site-wide error handler specified in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patrickrayes.wordpress.com&blog=976791&post=10&subd=patrickrayes&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>1. Which path is used in the template attribute in the  tag?</strong></p>
<p>A. physical path<br />
B. calling template relative path<br />
C. web document root relative path<br />
D. any directory under Cfusion\CustomTags</p>
<p>The correct answer is B.</p>
<p><strong>2. Which of the following would be the last one to capture an exception?</strong></p>
<p>A. &lt;CFCATCH&gt;<br />
B. &lt;CFERROR TYPE=&#8221;Request&#8221;&gt;<br />
C. &lt;CFERROR TYPE=&#8221;Exception&#8221;&gt;<br />
D. site-wide error handler specified in the ColdFusion Administrator</p>
<p>The correct answer is D.</p>
<p><strong>3. Of these tags with errors, which could NOT be caught with a  block?</strong></p>
<p>A. &lt;CFSET X = 5 / 0&gt;<br />
B. &lt;CFEST X = 5 / 0&gt;<br />
C. &lt;CFSET X = &#8220;Y&#8221; + 1&gt;<br />
D. &lt;CFINCLUDE TEMPLATE=&#8221;file.cfm&#8221;&gt; where file.cfm is NOT found</p>
<p>The correct answer is B.</p>
<p><strong>4. If you have the following variable definition in the Application.cfm file, what is the scope of the variable after it is created?</strong></p>
<p>&lt;CFSET x = “foo”&gt;</p>
<p>A. Variables (local)<br />
B. Application<br />
C. Session<br />
D. Request</p>
<p>The correct answer is A.</p>
<p><strong>5. What is the purpose of the GetAuthUser() function?</strong></p>
<p>A. To log in a specified user<br />
B. To return the name of a logged in user who is requesting the page on which the function is used<br />
C. To retrieve user details from a specified data source<br />
D. To assign roles to the user who is requesting the page on which the function is used</p>
<p>The correct answer is B.</p>
<p><strong>6. Which of the following variable types requires the use of the scope when referencing the variable? (Choose two)</strong></p>
<p>A. request<br />
B. form<br />
C. local<br />
D. application<br />
E. URL</p>
<p>The correct answer is A and D.</p>
<p><strong>7. Which function is necessary when using CACHEDWITHIN attribute with the &lt;CFQUERY&gt; tag?</strong></p>
<p>A. CreateDateTime()<br />
B. ParseDateTime()<br />
C. CreateTimeSpan()</p>
<p>The correct answer is C.</p>
<p><strong>8. What is missing from the following &lt;CFQUERY&gt; tag&#8217;s SELECT statement if you want to return the count?</strong></p>
<p>&lt;CFQUERY NAME=&#8221;test&#8221; DATASOURCE=&#8221;test&#8221;&gt;<br />
SELECT Count(*)<br />
FROM TestTable<br />
&lt;/CFQUERY&gt;</p>
<p>A. SELECT Count(CountVar)<br />
B. SELECT Count(*) AS CountVar<br />
C. SELECT Count(*) INTO CountVar<br />
D. SELECT Count(*) &lt;CFQUERYPARAM NAME=&#8221;CountVar&#8221;&gt;</p>
<p>The correct answer is B.</p>
<p><strong>9. Which of the following ANSI standard WHERE clauses will return all rows where City begins with the letter ‘S’?</strong></p>
<p>A. WHERE City LIKE &#8220;S&#8221;<br />
B. WHERE City = &#8216;S*&#8217;<br />
C. WHERE City LIKE &#8216;S_&#8217;<br />
D. WHERE City LIKE &#8216;S%&#8217;</p>
<p>The correct answer is D.</p>
<p><strong>10. Which one of the following tags is used for server-side validation? (Choose one.)</strong></p>
<p>A. input type =&#8221;text&#8221;<br />
B. input type=&#8221;hidden&#8221;<br />
C. input value=&#8221;hidden&#8221;<br />
D. input value=&#8221;text&#8221;</p>
<p>The correct answer is B.</p>
<p><strong>11. When will the cookie created by the following tag expire?</strong></p>
<p>&lt;CFCOOKIE name=”bgcolor” value= “bgcolor”&gt;</p>
<p>A. never<br />
B. after one day<br />
C. when the last browser window is closed<br />
D. after the timeout period for session variables has elapsed</p>
<p>The correct answer is C.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patrickrayes.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patrickrayes.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patrickrayes.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patrickrayes.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patrickrayes.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patrickrayes.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patrickrayes.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patrickrayes.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patrickrayes.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patrickrayes.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patrickrayes.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patrickrayes.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patrickrayes.wordpress.com&blog=976791&post=10&subd=patrickrayes&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://patrickrayes.wordpress.com/2007/04/15/coldfusion-interview-questions-part-ii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/925b0aaddb041993501de3abd5a331a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prayes</media:title>
		</media:content>
	</item>
		<item>
		<title>ColdFusion Interview Questions &#8211; Part I</title>
		<link>http://patrickrayes.wordpress.com/2007/04/15/coldfusion-interview-questions-part-i/</link>
		<comments>http://patrickrayes.wordpress.com/2007/04/15/coldfusion-interview-questions-part-i/#comments</comments>
		<pubDate>Sun, 15 Apr 2007 06:09:50 +0000</pubDate>
		<dc:creator>prayes</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://patrickrayes.wordpress.com/2007/04/15/coldfusion/</guid>
		<description><![CDATA[How would you loop through a SQL result set stored in the CF variable named my &#8220;results&#8221; and output the result set columns named &#8220;cola&#8221; and &#8220;colb&#8221; in an html table?
&#60;table&#62;
&#60;cfoutput query=&#8221;results&#8221;&#62;
	&#60;tr&#62;
		&#60;td&#62;#cola#&#60;/td&#62;
		&#60;td&#62;#colb#&#60;/td&#62;
	&#60;/tr&#62;
&#60;/cfoutput&#62;
&#60;/table&#62;
Given the url http://localhost/test.cfm?printmesg=yes How would you write an if statement which would echo the message &#8220;hello world!&#8221; if the url parameter printmesg equals [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patrickrayes.wordpress.com&blog=976791&post=9&subd=patrickrayes&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>How would you loop through a SQL result set stored in the CF variable named my &#8220;results&#8221; and output the result set columns named &#8220;cola&#8221; and &#8220;colb&#8221; in an html table?</strong></p>
<p>&lt;table&gt;<br />
&lt;cfoutput query=&#8221;results&#8221;&gt;<br />
	&lt;tr&gt;<br />
		&lt;td&gt;#cola#&lt;/td&gt;<br />
		&lt;td&gt;#colb#&lt;/td&gt;<br />
	&lt;/tr&gt;<br />
&lt;/cfoutput&gt;<br />
&lt;/table&gt;</p>
<p><strong>Given the url http://localhost/test.cfm?printmesg=yes How would you write an if statement which would echo the message &#8220;hello world!&#8221; if the url parameter printmesg equals &#8220;yes&#8221;.</strong></p>
<p>&lt;cfif isDefined(&#8220;url.printmesg&#8221;) and url.printmesg IS &#8220;yes&#8221;&gt;<br />
hellol world!<br />
&lt;/cfif&gt;</p>
<p><strong>When is it appropriate to use &lt;cfparam&gt; versus &lt;cfset&gt;?</strong></p>
<p>&lt;cfparam&gt; allows you to set a default parameter if that variable does not have a value bound to it.<br />
&lt;cfset&gt; merely sets the value of a given variable.</p>
<p><strong>Given the datasource named &#8220;mydb&#8221; and a SQL stored procedure named &#8220;mystoredproc&#8221; which takes the following two parameters one VARCHAR param and one INTEGER parameter respectively, how would you declare this using the cold fusion tags &lt;cfstoredproc&gt;, &lt;cfprocparam&gt;, and &lt;cfprocresult&gt;?</strong></p>
<p>&lt;cfset param1 = &#8220;this is my test string&#8221;&gt;<br />
&lt;cfset param2 =  1&gt;</p>
<p>&lt;cfstoredproc datasource=&#8221;mydb&#8221; procedure=&#8221;mystoredproc&#8221;&gt;<br />
	&lt;cfprocparam type=&#8221;IN&#8221; cfsqltype=&#8221;CF_SQL_VARCHAR&#8221; dbvarname=&#8221;@parama&#8221;<br />
value=&#8221;#param1#&#8221;&gt;<br />
	&lt;cfprocparam type=&#8221;IN&#8221; cfsqltype=&#8221;CF_SQL_INTEGER&#8221; dbvarname=&#8221;@paramb&#8221;<br />
value=&#8221;#param1#&#8221;&gt;<br />
	&lt;cfprocresult name=&#8221;myprocresult&#8221;&gt;<br />
&lt;/cfstoredproc&gt;</p>
<p><strong>How do you call a module named &#8220;testmod.cfm&#8221; with the parameters param1=&#8221;yes&#8221; and param2=5?</strong></p>
<p>&lt;cfmodule template=&#8221;testmod.cfm&#8221;<br />
	param1=&#8221;yes&#8221;<br />
	param2=5&gt;</p>
<p><strong>When is it appropriate to use &lt;cfinclude&gt; versus &lt;cfmodule&gt;?</strong></p>
<p>Given two tables:</p>
<p>movie<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| id             |<br />
|&#8212;&#8212;&#8212;&#8212;&#8212;-|<br />
| title          |<br />
| rating         |<br />
| length         |<br />
| country        |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>actor<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| id             |<br />
|&#8212;&#8212;&#8212;&#8212;&#8212;-|<br />
| movie_id       |<br />
| name           |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p><strong>How would you write a SQL statement to find the names of all the actors associated with a movie titled &#8220;fight club&#8221;?</strong></p>
<p>SELECT actor.name<br />
FROM movie INNER JOIN actor ON movie.id = actor.movie_id<br />
WHERE movie.title = &#8216;Fight Club&#8217;</p>
<p>movie<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| id             |<br />
|&#8212;&#8212;&#8212;&#8212;&#8212;-|<br />
| title          |<br />
| rating         |<br />
| length         |<br />
| country        |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>director<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| id             |<br />
|&#8212;&#8212;&#8212;&#8212;&#8212;-|<br />
| movie_id       |<br />
| name           |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p><strong>How would you write a LEFT JOIN statement to return a result set of movie.title&#8217;s and director.name&#8217;s?</strong></p>
<p>SELECT<br />
	movie.title,<br />
	director.name<br />
FROM movie LEFT JOIN director ON movie.id = director.movie_id</p>
<p><strong>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?</strong></p>
<p>movie_id</p>
<p><strong>How would you write a simple stored procedure in TSQL which takes a movie_id and returns all the directors associated with it?</strong></p>
<p>SET QUOTED_IDENTIFIER ON<br />
GO<br />
SET ANSI_NULLS ON<br />
GO</p>
<p>CREATE procedure [dbo].getDirector (<br />
	@movie_id INT<br />
)</p>
<p>SELECT name FROM directors WHERE movie_id = @movie_id</p>
<p>SET QUOTED_IDENTIFIER ON<br />
GO<br />
SET ANSI_NULLS ON<br />
GO</p>
<p><strong>What are the advantages and disadvantages of using stored procedures versus calling SQL inline in Cold Fusion?</strong></p>
<p>Stored procedures abstract database logic from server side code. They also offer performance benefits in pushing application logic to the database side.  </p>
<p>The disadvantage is that if they are poorly written then they can hinder database performance and make development a little more obfuscated.</p>
<p><strong>How would you format some text using css to be verdana and bold?</strong></p>
<p>.myfontclass {<br />
	font-family: Verdana;<br />
	font-weight: bold;<br />
}</p>
<p><strong>What is the difference between absolute and relative div positioning?</strong></p>
<p>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.</p>
<p><strong>How would you declare an inline css to format the table with a background color of &#8220;yellow&#8221; and give the table cell a right margin of 10 pixels?</strong></p>
<p>&lt;style&gt;<br />
table {<br />
	background-color: yellow;<br />
}<br />
td {<br />
	margin: 0 10px 0 0;<br />
}<br />
&lt;/style&gt;</p>
<p>&lt;table&gt;<br />
	&lt;tr&gt;<br />
		&lt;td&gt;Hello world&lt;/td&gt;<br />
	&lt;/tr&gt;<br />
&lt;/table&gt;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patrickrayes.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patrickrayes.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patrickrayes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patrickrayes.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patrickrayes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patrickrayes.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patrickrayes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patrickrayes.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patrickrayes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patrickrayes.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patrickrayes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patrickrayes.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patrickrayes.wordpress.com&blog=976791&post=9&subd=patrickrayes&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://patrickrayes.wordpress.com/2007/04/15/coldfusion-interview-questions-part-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/925b0aaddb041993501de3abd5a331a7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prayes</media:title>
		</media:content>
	</item>
	</channel>
</rss>