<?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/"
	>

<channel>
	<title>Simon Whatley &#187; ColdFusion</title>
	<atom:link href="http://www.simonwhatley.co.uk/tag/coldfusion/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simonwhatley.co.uk</link>
	<description>The opposite of every great idea is another great idea</description>
	<lastBuildDate>Wed, 02 Nov 2011 09:28:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adobe ColdFusion 9 License Terms in Plain English</title>
		<link>http://www.simonwhatley.co.uk/adobe-coldfusion-9-license-terms-in-plain-english</link>
		<comments>http://www.simonwhatley.co.uk/adobe-coldfusion-9-license-terms-in-plain-english#comments</comments>
		<pubDate>Thu, 28 Jan 2010 12:58:46 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe ColdFusion]]></category>
		<category><![CDATA[Adobe Systems Inc]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Cloud infrastructure]]></category>
		<category><![CDATA[cloud network]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Computer software]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Multi-core]]></category>
		<category><![CDATA[Rackspace Cloud]]></category>
		<category><![CDATA[Software license agreement]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[Virtualization software licensing]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=2212</guid>
		<description><![CDATA[If like me, you’ve been struggling to understand the legalese of the Adobe ColdFusion 9 EULA, I have put together a brief and hopefully, helpful summary of what it actually means in in plain English.]]></description>
			<content:encoded><![CDATA[<p>If like me, you&#8217;ve been struggling to understand the legalese of the Adobe ColdFusion 9 <abbr title="End User License Agreement">EULA</abbr>, I have put together a brief and hopefully, helpful summary of what it actually means in <em>in plain English</em>.</p>
<p>The sections we&#8217;re really interested in are 3.1.1 and 3.1.2. These are detailed below.</p>
<p>Regarding production software on a per-<abbr title="Central Processing Unit">CPU</abbr> and Virtual Machine (<abbr title="Virtual Machine">VM</abbr>) basis:</p>
<blockquote><p>3.1.1 Adobe grants Licensee a license to install and use the Software as Production Software on a per-CPU basis as provided in a separate writing. The total number of CPUs of all of the Computers on which the Software operates may not exceed the total number of CPUs separately licensed. For purposes of this License Metric, (a) all CPUs on a Computer on which the Software is installed shall be deemed to operate the Software unless Licensee configures that Computer (using a reliable and verifiable means of hardware or software partitioning) such that the total number of CPUs that actually operate the Software is less than the total number on that Computer, and (b) a CPU shall mean a single, physical chip with the capability of housing multiple processor cores. If Licensee purchases a 2-CPU Production Software license, then each CPU to which it applies such license must reside in the same Computer. In the event that Licensee desires to apply 2-CPU Production Software licenses to Virtual Machines, then (c) for the Standard version of the Software, the number of 2-CPU licenses required shall be the greater of (i) the number of available physical CPUs for all instances of the Software divided by two (any fractions shall be rounded up for purposes of this provision), or (ii) the total number of Virtual Machines on all Computers on which the Software is installed, and (d) for the Enterprise version of the Software, the number of 2-CPU licenses required shall be the number of physical CPUs on which the Software operates divided by two (any fractions shall be rounded up for purposes of this provision).</p></blockquote>
<p>The key information here is:</p>
<ul>
<li>The Standard license is charged per 2-CPU or per-VM, which ever is greater.</li>
<li>The Enterprise license is charged per 2-CPU.</li>
</ul>
<p>But what does this actually mean for <em>Joe Bloggs</em>? Fortunately the guys at Adobe, via <a href="http://twitter.com/coldfusion" title="Twitter: @coldfusion" target="_blank" rel="nofollow">Twitter</a>, were on hand to help.</p>
<p>Here is a little table that should whet your appetite:</p>
<table>
<thead>
<tr>
<th scope="col" colspan="2">Server Configuration</th>
<th scope="col" colspan="2">Number of Licenses Required</th>
</tr>
<tr>
<th scope="col"><abbr title="Central Processing Unit">CPU</abbr></th>
<th scope="col"><abbr title="Virtual Machine">VM</abbr></th>
<th scope="col">Standard</th>
<th scope="col">Enterprise</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>4</td>
<td>0</td>
<td>2</td>
<td>2</td>
</tr>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>2</td>
<td>1</td>
</tr>
<tr>
<td>1</td>
<td>4</td>
<td>4</td>
<td>1</td>
</tr>
<tr>
<td>1</td>
<td>6</td>
<td>6</td>
<td>1</td>
</tr>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td>2</td>
<td>2</td>
<td>2</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>4</td>
<td>4</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>6</td>
<td>6</td>
<td>1</td>
</tr>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td>4</td>
<td>2</td>
<td>2</td>
<td>2</td>
</tr>
<tr>
<td>4</td>
<td>4</td>
<td>4</td>
<td>2</td>
</tr>
<tr>
<td>4</td>
<td>6</td>
<td>6</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>Regarding production software on a cloud network:</p>
<blockquote><p>3.1.2 Adobe grants Licensee a license to install and use the Software as Production Software on a Cloud Network on a per-instance basis as provided in a separate writing. The total number of instances that may run on a Cloud Network may not exceed the total number of instances separately licensed. Licensee must purchase and apply 1 instance license to each use of the Standard version of the Software. Licensee may apply 10 instances for each license purchased of the Enterprise version of the Software.</p></blockquote>
<p>The key information here is:</p>
<ul>
<li>The Standard license supports cloud computing, but for each instance, 1 license must be applied.</li>
<li>The Enterprise license supports up to 10 cloud instances, e.g. on Amazon EC3, Azure, Joyent, Rackspace Cloud etc.</li>
</ul>
<p>In essence, if you&#8217;re going to run a [decent] virtual machine environment, or indeed a cloud environment, it would be far more cost efficient to run ColdFusion Enterprise, since it is costed by the number of virtual machines or increments of 10 cloud instances.</p>
<p>You can download the original <a href="http://www.adobe.com/products/eulas/pdfs/adobe_coldFusion_combined_20090811_0930.pdf" title="Adobe ColdFusion 9 EULA" target="_blank" rel="nofollow">Adobe ColdFusion 9 EULA</a> (PDF 400K) from the Adobe website.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/adobe-coldfusion-9-license-terms-in-plain-english/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Parsing Twitter Usernames, Hashtags and URLs with ColdFusion</title>
		<link>http://www.simonwhatley.co.uk/parsing-twitter-usernames-hashtags-and-urls-with-coldfusion</link>
		<comments>http://www.simonwhatley.co.uk/parsing-twitter-usernames-hashtags-and-urls-with-coldfusion#comments</comments>
		<pubDate>Fri, 01 May 2009 11:24:07 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[GPS logger]]></category>
		<category><![CDATA[Holux M-241 GPS Receiver]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[New Brunswick]]></category>
		<category><![CDATA[online resource]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[username]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1907</guid>
		<description><![CDATA[Some time ago, well almost a year ago actually, I posted an article called Parsing Twitter Usernames, Hashtags and URLs with JavaScript. From that article, it became immediately apparent that this was an issue many people were confronting and one that required an answer. Now, belatedly, it is the turn of ColdFusion to get the Twitter love.]]></description>
			<content:encoded><![CDATA[<p>Some time ago, well almost a year ago actually, I posted an article called <a href="/parsing-twitter-usernames-hashtags-and-urls-with-javascript">Parsing Twitter Usernames, Hashtags and URLs with JavaScript</a>. From that article, it became immediately apparent that this was an issue many people were confronting and one that required an answer. Now, belatedly, it is the turn of ColdFusion to get the Twitter love.</p>
<p>Compared to JavaScript it is far easier to parse the <abbr title="Univeral Resource Locator">URL</abbr>s, Usernames and Hashtags in a tweet using ColdFusion and minor amendments to the regular expressions used in the JavaScript code.</p>
<p>Below is an example tweet that I&#8217;ll use for this post.</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #800000;">&lt;cfset</span> myTweet <span style="color: #0000ff">=</span> <span style="color: #009900;">&quot;Woot! I've just taken receipt of my Holux M-241 GPS logger. Good call @fordie. http://bit.ly/2RsAu ##holux ##gpslogger&quot;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span></pre></div></div>

<p><abbr title="Nota bene (please note)">NB</abbr>. For the purpose of this test, I need to double-hash the hashtags to prevent ColdFusion throwing an error.</p>
<h3>Parsing URLs as Links to the resource</h3>
<p>We can simply demonstrate the parsing of the link with the following code in the body of the page:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #800000;">&lt;cfset</span> myTweet <span style="color: #0000ff">=</span> <span style="color: #800080;">REReplace</span><span style="color: #000000;">&#40;</span>myTweet,<span style="color: #009900;">'([A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&amp;amp;\?\/.=]+)'</span>,<span style="color: #009900;">'&lt;a href=&quot;\1&quot;&gt;</span></span>\1<span style="color: #333333;"><span style="color: #800000;">&lt;</span><span style="color: #0000ff;">/</span>a<span style="color: #0000ff;">&gt;</span></span>','ALL') /&gt;</pre></div></div>

<p><abbr title="Nota bene (please note)">NB</abbr>. The <code>\1</code> is a back reference to part of the regular expression match. A backreference stores the part of the string matched by the part of the regular expression inside the parentheses. This means you can reuse it inside the regular expression, or afterwards as I am doing in each of these examples.</p>
<p>The resultant HTML generated is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Woot! I've just taken receipt of my Holux M-241 GPS logger. Good call @fordie. &lt;a href=&quot;http://bit.ly/2RsAu&quot;&gt;http://bit.ly/2RsAu&lt;/a&gt; #holux #gpslogger</pre></div></div>

<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Parsing Usernames as Links to Twitter</h3>
<p>Following on from the <abbr title="Universal Resource Locator">URL</abbr> example above, we can apply a similar methodology to Twitter usernames since they can also be <abbr title="Universal Resource Locator">URL</abbr>s to their associated Twitter page.</p>
<p>We can simply demonstrate this with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #800000;">&lt;cfset</span> myTweet <span style="color: #0000ff">=</span> <span style="color: #800080;">REReplace</span><span style="color: #000000;">&#40;</span>myTweet,<span style="color: #009900;">'[@]+([A-Za-z0-9-_]+)'</span>,<span style="color: #009900;">'&lt;a href=&quot;http://twitter.com/\1&quot; rel=&quot;nofollow&quot;&gt;</span></span>@\1<span style="color: #333333;"><span style="color: #800000;">&lt;</span><span style="color: #0000ff;">/</span>a<span style="color: #0000ff;">&gt;</span></span>','ALL') /&gt;</pre></div></div>

<p>The regular expression in this case finds all instances of <code>@username</code>. The Twitter <abbr title="Universal Resource Locator">URL</abbr> is then applied to the username.</p>
<p>The resultant HTML generated is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Woot! I've just taken receipt of my Holux M-241 GPS logger. Good call &lt;a href=&quot;http://twitter.com/fordie&quot; rel=&quot;nofollow&quot;&gt;@fordie&lt;/a&gt;. http://bit.ly/2RsAu #holux #gpslogger</pre></div></div>

<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Parsing Hashtags as Links to Twitter’s Search</h3>
<p>Finally, Twitter also allows user’s to create Hastags within their posts. Hashtags are a community-driven convention for adding additional context and metadata to your tweets. Like regular <abbr title="Universal Resource Locator">URL</abbr>s and usernames, Hastags can been parsed as a <abbr title="Universal Resource Locator">URL</abbr> to an online resource, in this case, Twitter’s search.</p>
<p>We can simply demonstrate this with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #800000;">&lt;cfset</span> myTweet <span style="color: #0000ff">=</span> <span style="color: #800080;">REReplace</span><span style="color: #000000;">&#40;</span>myTweet,<span style="color: #009900;">'[##]+([A-Za-z0-9-_]+)'</span>,<span style="color: #009900;">'&lt;a href=&quot;http://search.twitter.com/search?q=%23\1&quot; rel=&quot;nofollow&quot;&gt;</span></span><span style="color: #0000ff;">##</span>\1<span style="color: #333333;"><span style="color: #800000;">&lt;</span><span style="color: #0000ff;">/</span>a<span style="color: #0000ff;">&gt;</span></span>','ALL') /&gt;</pre></div></div>

<p>The regular expression in this case finds all instances of <code>#hashtag</code>. The Twitter Search <abbr title="Universal Resource Locator">URL</abbr> is then applied to the hashtag.</p>
<p>The resultant HTML generated is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Woot! I've just taken receipt of my Holux M-241 GPS logger. Good call @fordie. http://bit.ly/2RsAu &lt;a href=&quot;http://search.twitter.com/search?q=%23holux&quot; rel=&quot;nofollow&quot;&gt;#holux&lt;/a&gt; &lt;a href=&quot;http://search.twitter.com/search?q=%23ipslogger&quot; rel=&quot;nofollow&quot;&gt;#gpslogger&lt;/a&gt;</pre></div></div>

<h3>All in one</h3>
<p>So, putting all the regular expressions together, you would end up with the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Woot! I've just taken receipt of my Holux M-241 GPS logger. Good call &lt;a href=&quot;http://twitter.com/fordie&quot; rel=&quot;nofollow&quot;&gt;@fordie&lt;/a&gt;. &lt;a href=&quot;http://bit.ly/2RsAu&quot;&gt;http://bit.ly/2RsAu&lt;/a&gt; &lt;a href=&quot;http://search.twitter.com/search?q=%23holux&quot; rel=&quot;nofollow&quot;&gt;#holux&lt;/a&gt; &lt;a href=&quot;http://search.twitter.com/search?q=%23gpslogger&quot; rel=&quot;nofollow&quot;&gt;#ipslogger&lt;/a&gt;</pre></div></div>

<p>Which translates as the more useful tweet:</p>
<p>Woot! I&#8217;ve just taken receipt of my Holux M-241 GPS logger. Good call <a href="http://twitter.com/fordie" rel="nofollow">@fordie</a>. <a href="http://bit.ly/2RsAu">http://bit.ly/2RsAu</a> <a href="http://search.twitter.com/search?q=%23holux" rel="nofollow">#holux</a> <a href="http://search.twitter.com/search?q=%23gpslogger" rel="nofollow">#gpslogger</a></p>
<h3>Where to take it next</h3>
<p>Wrap these code snippets up into <a href="/examples/twitter/twitterise/twitterise.txt">a simple twitterise function</a> could be a good starter for ten. Following that, we could also create a simple Twitter feed reader, but I&#8217;ll leave that up to you to develop.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/parsing-twitter-usernames-hashtags-and-urls-with-coldfusion/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Programmer’s Dozen &#8211; Programming Best Practices</title>
		<link>http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices</link>
		<comments>http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices#comments</comments>
		<pubDate>Tue, 03 Mar 2009 11:23:46 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[fuzzy logic]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[object orientated]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programmer]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1826</guid>
		<description><![CDATA[Take control of your code with these programming best practices from Kevlin Henney. At JAOO Aarhus 2008 Kevlin used a trash can, vampires, a train wreck, whiskey and much more to make you understand and remember his 13 constructive points (a programmer’s dozen) about programming and code smells.]]></description>
			<content:encoded><![CDATA[<p>Take control of your code with these programming best practices from Kevlin Henney. At <abbr title="Java and object-oriented software engineering">JAOO</abbr> Aarhus 2008 Kevlin used a trash can, vampires, a train wreck, whiskey and much more to make you understand and remember his 13 constructive points (a programmer’s dozen) about programming and code smells.</p>
<p>The 13 points made by Kevlin were:</p>
<ul>
<li>0. Prefer code to comments.</li>
<li>1. Follow a consistent form.</li>
<li>2. Employ the contract metaphor.</li>
<li>3. Express independent ideas independently.</li>
<li>4. Encapsulate.</li>
<li>5. Parameterize from above.</li>
<li>6. Restrict mutability of state.</li>
<li>7. Favor symmetry over asymmetry.</li>
<li>8. Sharpen fuzzy logic.</li>
<li>9. Go with the flow.</li>
<li>10. Let code decide.</li>
<li>11. Omit needless code.</li>
<li>12. Unify duplicate code.</li>
</ul>
<p>You can see a <a href="http://blog.jaoo.dk/2009/01/19/programmers-dozen-programming-best-practices/" title="Programmer’s Dozen - Programming Best Practices" target="_blank" rel="nofollow">video of Kevlin&#8217;s presentation</a> on the <a href="http://jaoo.dk/" title="JAOO" target="_blank" rel="nofollow">JAOO website</a>.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/programmers-dozen-programming-best-practices/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secure Your Application &#8211; PCI DSS Specifications</title>
		<link>http://www.simonwhatley.co.uk/secure-your-application-pci-dss-specifications</link>
		<comments>http://www.simonwhatley.co.uk/secure-your-application-pci-dss-specifications#comments</comments>
		<pubDate>Mon, 26 Jan 2009 11:19:37 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Adobe ColdFusion]]></category>
		<category><![CDATA[American Express]]></category>
		<category><![CDATA[anti-virus software]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[BlueDragon]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[ColdFusion Administrator]]></category>
		<category><![CDATA[company processing]]></category>
		<category><![CDATA[compliance]]></category>
		<category><![CDATA[control measures]]></category>
		<category><![CDATA[Data Security Standard]]></category>
		<category><![CDATA[database server]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Discover Financial Services]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JCB International]]></category>
		<category><![CDATA[Manitoba]]></category>
		<category><![CDATA[Mastercard Worldwide]]></category>
		<category><![CDATA[Payment Card Industry]]></category>
		<category><![CDATA[Payment Card Industry Security Standards Council]]></category>
		<category><![CDATA[payment card processing]]></category>
		<category><![CDATA[Payment Processors]]></category>
		<category><![CDATA[PCI DSS]]></category>
		<category><![CDATA[public networks]]></category>
		<category><![CDATA[Railo]]></category>
		<category><![CDATA[raw processing]]></category>
		<category><![CDATA[RDBMS]]></category>
		<category><![CDATA[regulations]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[secure systems]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Security Standards Council]]></category>
		<category><![CDATA[security systems]]></category>
		<category><![CDATA[Server Side]]></category>
		<category><![CDATA[software developers]]></category>
		<category><![CDATA[software releases]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SSC]]></category>
		<category><![CDATA[the Council]]></category>
		<category><![CDATA[Visa]]></category>
		<category><![CDATA[Visa Inc .]]></category>
		<category><![CDATA[web application]]></category>
		<category><![CDATA[web application developers]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[web code]]></category>
		<category><![CDATA[Web Servers]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1785</guid>
		<description><![CDATA[PCI DSS stands for Payment Card Industry Data Security Standard, and is a worldwide security standard assembled by the Payment Card Industry Security Standards Council (PCI SSC). The PCI security standards are technical and operational requirements that were created to help organizations that process card payments prevent credit card fraud, hacking and various other security vulnerabilities and threats. The standards apply to all organizations that store, process or transmit cardholder data – with guidance for software developers and manufacturers of applications and devices used in those transactions. A company processing, storing, or transmitting cardholder data must be PCI DSS compliant.]]></description>
			<content:encoded><![CDATA[<p>PCI DSS stands for <a href="https://www.pcisecuritystandards.org/" title="Payment Card Industry Data Security Standard website" target="_blank" rel="nofollow">Payment Card Industry Data Security Standard</a>, and is a worldwide security standard assembled by the Payment Card Industry Security Standards Council (<abbr title="Payment Card Industry">PCI</abbr> <abbr title="Security Standards Council">SSC</abbr>). The <abbr title="Payment Card Industry">PCI</abbr> security standards are technical and operational requirements that were created to help organizations that process card payments prevent credit card fraud, hacking and various other security vulnerabilities and threats. The standards apply to all organizations that store, process or transmit cardholder data – with guidance for software developers and manufacturers of applications and devices used in those transactions. A company processing, storing, or transmitting cardholder data must be <abbr title="Payment Card Industry">PCI</abbr> <abbr title="Data Security Standard">DSS</abbr> compliant.</p>
<p><a href="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2009/01/payment-card-data.png"><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2009/01/payment-card-data.png" alt="Types of Data on a Payment Card" title="Types of Data on a Payment Card" width="600" height="255" class="aligncenter size-full wp-image-1815" /></a></p>
<p>The <abbr title="Payment Card Industry">PCI</abbr> <abbr title="Security Standards Council">SSC</abbr> (<q>Council</q>) is responsible for managing the security standards, while compliance with the <abbr title="Payment Card Industry">PCI</abbr> set of standards is enforced by the founding members of the Council: <a href="http://www.americanexpress.com/datasecurity" title="American Express" target="_blank" rel="nofollow">American Express</a>, <a href="http://www.discovernetwork.com/fraudsecurity/disc.html" title="Discover Financial Services" target="_blank" rel="nofollow">Discover Financial Services</a>, <a href="http://www.jcb-global.com/english/pci/index.html" title="JCB International" target="_blank" rel="nofollow">JCB International</a>, <a href="http://www.mastercard.com/sdp" title="MasterCard Worldwide" target="_blank" rel="nofollow">MasterCard Worldwide</a> and <a href="http://www.visa.com/cisp" title="Visa" target="_blank" rel="nofollow">Visa Inc</a>. Non-compliant companies who maintain a relationship with one or more of the card brands, either directly or through an acquirer risk losing their ability to process credit card payments and being audited and/or fined.</p>
<p>All in-scope companies must validate their compliance annually. This validation can be conducted by Qualified Security Assessors, i.e. companies that have completed a <a href="https://www.pcisecuritystandards.org/qsa_asv/become_qsa.shtml" title="PCI: Becoming a Qualified Security Assessor" target="_blank" rel="nofollow">three-step certification process</a> by the <abbr title="Payment Card Industry">PCI</abbr> <abbr title="Security Standards Council">SSC</abbr> which recognises them as being qualified to assess compliance to the <abbr title="Payment Card Industry">PCI</abbr> <abbr title="Data Security Standard">DSS</abbr> standard. However, smaller companies have the option to use a <a href="https://www.pcisecuritystandards.org/saq/index.shtml" title="PCI Self-Assessment Questionnaire" target="_blank" rel="nofollow">Self-Assessment Questionnaire</a>. Whether this questionnaire needs to be validated by a <abbr title="Qualified Security Assessors">QSA</abbr> depends on the requirements of the card brands in that merchant&#8217;s region.</p>
<p>The current version of the standard specifies 12 requirements for compliance, organised into 6 logically related groups, which are called &#8220;control objectives.&#8221;</p>
<ol>
<li>Build and Maintain a Secure Network
<ul>
<li>Requirement 1: Install and maintain a firewall configuration to protect cardholder data</li>
<li>Requirement 2: Do not use vendor-supplied defaults for system passwords and other security parameters</li>
</ul>
</li>
<li>Protect Cardholder Data
<ul>
<li>Requirement 3: Protect stored cardholder data</li>
<li>Requirement 4: Encrypt transmission of cardholder data across open, public networks</li>
</ul>
</li>
<li>Maintain a Vulnerability Management Program
<ul>
<li>Requirement 5: Use and regularly update anti-virus software</li>
<li>Requirement 6: Develop and maintain secure systems and applications</li>
</ul>
</li>
<li>Implement Strong Access Control Measures
<ul>
<li>Requirement 7: Restrict access to cardholder data by business need-to-know</li>
<li>Requirement 8: Assign a unique ID to each person with computer access</li>
<li>Requirement 9: Restrict physical access to cardholder data</li>
</ul>
</li>
<li>Regularly Monitor and Test Networks
<ul>
<li>Requirement 10: Track and monitor all access to network resources and cardholder data</li>
<li>Requirement 11: Regularly test security systems and processes</li>
</ul>
</li>
<li>Maintain an Information Security Policy
<ul>
<li>Requirement 12: Maintain a policy that addresses information security</li>
</ul>
</li>
</ol>
<p>Compliance with these requirements can be summarized into 3 main stages:</p>
<ul>
<li>Collecting and storing: Secure collection and tamper-proof storage of all log data so that it is available for analysis.</li>
<li>Reporting: Being able to prove compliance on the spot if audited and present evidence that controls are in place for protecting data.</li>
<li>Monitoring and alerting: Have systems in place such as auto-alerting, to help administrators constantly monitor access and usage of data. Administrators are warned of problems immediately and can rapidly address them. These systems should also extend to the log data itself –- there must be proof that log data is being collected and stored.</li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>What does this actually mean for web application developers?</h3>
<p>It is considerably more expensive and more time-consuming to recover from a security incident than to take preventative measures ahead of time. If you follow the guidelines below, you will go along way to securing you application in line with the <abbr title="Payment Card Industry">PCI</abbr> <abbr title="Data Security Standards">DSS</abbr> regulations. Many of the measures apply to general application security, but since <abbr title="Payment Card Industry">PCI</abbr> <abbr title="Data Security Standards">DSS</abbr> is all about security, they are worth mentioning.</p>
<p>Server-level Security:</p>
<ul>
<li>Separate web- and database-servers on to different physical machines.</li>
<li>Secure the web- and database-servers with traditional techniques. Only authorised accounts should have the capabilities to run tasks on the machine. That means not giving admin-rights to the user account.</li>
<li>Keep servers up-to-date with the latest patches and software releases.</li>
<li>Minimise the number of services running on the server. This means limiting the services to only those required for the web- or database-servers to function.</li>
<li>Secure information in transit between servers. This may mean physically securing the network to prevent evesdropping via encryption or obfuscating the data amongst innocuous &#8216;noise&#8217;.</li>
<li>Secure the database server behind a firewall.</li>
</ul>
<p>Application-level Security:</p>
<ul>
<li>Separate ColdFusion, the webserver and database server user accounts. They should never be under the same system account.</li>
<li>Create a database user specifically for your ColdFusion datasource and restrict it to only the activities required for the application. The user should not have database-owner rights, access to databases not relating to the application or access to the system tables.</li>
<li>Revoke privileges in the ColdFusion datasource definition to prevent the <abbr title="Structured Query Language">SQL</abbr> commands <code>CREATE</code>, <code>DROP</code>, <code>GRANT</code>, <code>REVOKE</code> and <code>ALTER</code>.</li>
<li>General settings in the ColdFusion Administrator:
<ul>
<li>Check the <em>Disable access to internal ColdFusion Java components</em> option.</li>
<li>Check the <em>Enable Global Script Protection</em> option.</li>
<li>Add a <em>Missing Template Handler</em>.</li>
<li>Add a <em>Site-wide Error Handler</em>.</li>
<li>Reduce the <em>Maximum size of post data</em> from 100<abbr title="megabytes">MB</abbr>.</li>
<li>Enable <em>Timeout Requests</em>, and set to 60 seconds or less.</li>
<li>Disable <em>Robust Exception Handling</em> on production servers.</li>
</ul>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Web Application-level Security:</p>
<ul>
<li>Use secure HTTP to transfer data and/or when logged into &#8216;administration&#8217; secutions of your web application.</li>
<li>Timeout sessions after 15 minutes and on browser close.</li>
<li>Provide multi-level login processes. For example, lock the application after 3 failed attempts for a period of 10 minutes.</li>
<li>Do not identify whether the username or password are incorrect, simply notify the user that their login failed and that they must try again.</li>
<li>Encrypt passwords stored in the database with a standard such as <a href="http://en.wikipedia.org/wiki/SHA_hash_functions" title="Wikipedia: SHA cryptographic has function" target="_blank" rel="nofollow">SHA-256</a> or &#8216;stronger&#8217;.</li>
<li>Use <a href="http://en.wikipedia.org/wiki/Captcha" title="Wikipedia: CAPTCHA" target="_blank" rel="nofollow">CAPTCHA</a>s (textual and aural) to prevent automated robots hacking into your application.</li>
<li>Run regular penetration tests on your application to identify potential problems.</li>
<li>Encrypt credit card information held in the database or other storage mechanism. Only store credit card data in line with the <abbr title="Payment Card Industry">PCI</abbr> <abbr title="Data Security Standards">DSS</abbr> regulations.</li>
</ul>
<p>Code-level Security:</p>
<ul>
<li>Application.cfc &#8211; Set the <code>scriptProtect</code> Application variable to <code>true</code> to enable application-wide cross-site script protection.
</li>
<li>CFQueryParam &#8211; This tag, importantly, verifies the data type of a query parameter and, for <abbr title="Relational Database Management Systems">RDBMS</abbr>s that support bind variables, enables ColdFusion to use bind variables in the <acronym title="Structured Query Language">SQL</acronym> statement. Bind variable usage enhances performance when executing a <code>cfquery</code> statement multiple times. There are limitations to the use of the <code>cfqueryparam</code> tag. In ColdFusion 7 for example, you cannot use them in queries using the <code>cachedWithin</code> attribute. Similarly, they cannot be used in <code>ORDER BY</code> clauses, although the use of conditional logic should resolve the need for order by variables.
</li>
<li>Functions &#8211; As a rule of thumb, validate <em>all</em> the data being passed into a query prior to it being used. ColdFusion MX 7 saw the introduction of the <code>isValid()</code> function. This function tests whether a value meets a validation or data type rule and can be used to replace a large number of type-specific functions such as <code>isArray()</code>, <code>isBinary()</code>, <code>isBoolean()</code>, <code>isDate()</code>, <code>isNumeric()</code> and <code>isSimpleValue()</code> etc.
</li>
<li>Stored Procedures &#8211; I often favour the use of stored procedures over standard queries. Not only do they add an additional level of performance, they provide an additional level of security; ColdFusion does not do any raw processing of queries in the web code, it simply passes variables down the wire to the database server.</li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Conclusion</h3>
<p>The goal of the <abbr title="Payment Card Industry">PCI</abbr> Data Security Standard is to protect cardholder data that is processed, stored or transmitted by merchants. The security controls and processes required by <abbr title="Payment Card Industry">PCI</abbr> <abbr title="Data Security Standards">DSS</abbr> are vital for protecting cardholder account data, including the <abbr title="primary account number">PAN</abbr> &#8211; the primary account number printed on the front of a payment card. Merchants and any other service providers involved with payment card processing must never store sensitive authentication data after authorisation. This includes sensitive data that is printed on a card, or stored on a card’s magnetic stripe or chip &#8211; and personal identification numbers entered by the cardholder.</p>
<p>By following the points made above, you will go a long way to meeting the <abbr title="Payment Card Industry">PCI</abbr> <abbr title="Data Security Standards">DSS</abbr> guidelines, whilst also securing your infrastructure and applications in a more general sense.</p>
<p><strong>Caveat:</strong> The views and comments written in this article are provided as a guideline. I hold no responsibility for the security of your applications and data based upon the information provided.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/secure-your-application-pci-dss-specifications/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe&#039;s LiveCycle Powered by Amazon&#039;s Cloud</title>
		<link>http://www.simonwhatley.co.uk/adobes-livecycle-powered-by-amazons-cloud</link>
		<comments>http://www.simonwhatley.co.uk/adobes-livecycle-powered-by-amazons-cloud#comments</comments>
		<pubDate>Wed, 14 Jan 2009 12:07:00 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe ColdFusion]]></category>
		<category><![CDATA[Adobe LiveCycle]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[chief rival]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[content services]]></category>
		<category><![CDATA[correspondence management]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[elastic cloud computing]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[information technology]]></category>
		<category><![CDATA[infrastructure web services platform]]></category>
		<category><![CDATA[installation of LiveCycle ES Solution Components]]></category>
		<category><![CDATA[Internet-based information technology services]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[LiveCycle]]></category>
		<category><![CDATA[LiveCycle Enterprise Suite]]></category>
		<category><![CDATA[Podcast]]></category>
		<category><![CDATA[process management]]></category>
		<category><![CDATA[Railo]]></category>
		<category><![CDATA[recent technology trends]]></category>
		<category><![CDATA[S3]]></category>
		<category><![CDATA[server software product]]></category>
		<category><![CDATA[simple storage service]]></category>
		<category><![CDATA[technology infrastructure]]></category>
		<category><![CDATA[term cloud computing]]></category>
		<category><![CDATA[utility computing]]></category>
		<category><![CDATA[Web Browser]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1757</guid>
		<description><![CDATA[Adobe recently announced, in conjunction with Amazon, that they would bring LiveCycle to Amazon’s Elastic Compute Cloud (EC2).]]></description>
			<content:encoded><![CDATA[<p>Adobe recently announced, in conjunction with Amazon, that they would bring LiveCycle to Amazon&#8217;s Elastic Compute Cloud (<abbr title="Elastic Compute Cloud">EC2</abbr>). To quote Adobe:</p>
<blockquote><p>
Adobe is now offering developers subscribed to the Adobe Enterprise Developer Program access to their own virtual instance of LiveCycle ES through LiveCycle ES Developer Express. LiveCycle ES Developer Express provides a pre-configured, virtualized installation of LiveCycle ES Solution Components in a self-contained development environment. LiveCycle ES Developer Express is hosted on the Amazon Elastic Compute Cloud (Amazon EC2). AEDP members can test, build, store and develop their applications in a cloud-base environment where all LiveCycle ES applications are pre-configured and running. The Adobe Enterprise Developer Program will offer a minimum of 10 hours of runtime per month, with additional hours to be available separately.</p></blockquote>
<h3>What is cloud computing and why is it important?</h3>
<p>The term cloud computing, as used by some commentators, refers to the use of scalable, real-time, Internet-based information technology services and resources. This somewhat nebulous concept incorporates software as a service (<abbr title="software as a servic">SaaS</abbr>), utility computing, <a href="http://en.wikipedia.org/wiki/Web_2.0" title="Wikipedia: Web 2.0" target="_blank" rel="nofollow">Web 2.0</a> and other recent technology trends. The common theme stresses reliance on the Internet for satisfying the computing needs of users, without them needing knowledge of, expertise with, or control over the technology infrastructure that supports them. An often-quoted example is <a href="http://www.google.com/apps/intl/en/business/index.html" title="Google Apps" target="_blank" rel="nofollow">Google Apps</a>, which provides common business applications online that are accessed from a web browser, while the software and data are stored on Google servers.</p>
<p>The cloud element of cloud computing derives from a metaphor used for the Internet, from the way it is often depicted in computer network diagrams, and is an abstraction for the complex infrastructure it conceals.</p>
<h3>How do Adobe and Amazon fit into the equation?</h3>
<p>Adobe and Amazon have similar goals. They both want to gain more share of the enterprise market. Amazon needs to convince the enterprise that its version of the cloud is capable of supporting the demands of enterprise applications. On the other hand Adobe wants to convince the developers who already use <abbr title="Amazon Web Services">AWS</abbr> that LiveCycle is the platform of choice for the enterprise.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>What is Adobe LiveCycle?</h3>
<p><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2009/01/logo_adobe_livecycle1.jpg" alt="Adobe LiveCycle" title="Adobe LiveCycle" width="102" height="105" class="alignleft size-full wp-image-1769" />Adobe&#8217;s <a href="http://www.adobe.com/products/livecycle/" title="Adobe LiveCycle" target="_blank" rel="nofollow">LiveCycle Enterprise Suite</a> is a <abbr title="Java 2 Enterprise Edition">J2EE</abbr>-based server software product used to build applications that automate a broad range of business processes for enterprises and government agencies.</p>
<p>LiveCycle combines technologies for data capture, information assurance, document output, content services, and process management to deliver solutions such as account opening, services and benefits enrollment, correspondence management, request for proposal processes, and other manual based workflows.</p>
<h3>What are Amazon Webservices?</h3>
<p><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2009/01/logo_aws.gif" alt="Amazon Webservices Logo" title="Amazon Webservices Logo" width="164" height="60" class="alignright size-full wp-image-1762" />Since early 2006, <a href="http://aws.amazon.com" title="Amazon Web Services" target="_blank" rel="nofollow">Amazon Web Services</a> (<abbr title="Amazon Web Services">AWS</abbr>) has provided companies of all sizes with an infrastructure web services platform in <a href="http://en.wikipedia.org/wiki/Cloud_computing" title="Wikipedia: Cloud Computing" target="_blank" rel="nofollow">the cloud</a>. With <abbr title="Amazon Web Services">AWS</abbr> you can requisition compute power, storage, and other services–gaining access to a suite of elastic <abbr title="Information Technology">IT</abbr> infrastructure services as your business demands them. With <abbr title="Amazon Web Services">AWS</abbr> you have the flexibility to choose whichever development platform or programming model makes the most sense for the problems you’re trying to solve. You pay only for what you use, with no up-front expenses or long-term commitments, making <abbr title="Amazon Web Services">AWS</abbr> a cost-effective way to deliver applications to customers and clients.</p>
<h3>How do they fit together?</h3>
<p>Essentially, Adobe has put a Red Hat <a href="http://www.jboss.org" title="JBoss" target="_blank" rel="nofollow">JBoss</a> <abbr title="Java 2 Enterprise Edition">J2EE</abbr> stack on <abbr title="Amazon Web Services">AWS</abbr> and deployed LiveCycle on the stack. Adobe state that this platform is purely for prototyping, developing and testing applications, rather than production environments, but that is likely to change.</p>
<h3>The future</h3>
<p>Deploying LiveCycle on <abbr title="Amazon Web Services">AWS</abbr> has wider implications, not only for Adobe products. By setting up a J2EE stack on <abbr title="Amazon Web Services">AWS</abbr> it makes it possible to deploy any Java-based application; yes that does mean one developed in Adobe&#8217;s ColdFusion or indeed its chief rival, Railo.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/adobes-livecycle-powered-by-amazons-cloud/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Let&#039;s not Dilly-Dally: ColdFusion has its Merits</title>
		<link>http://www.simonwhatley.co.uk/lets-not-dilly-dally-coldfusion-has-its-merits</link>
		<comments>http://www.simonwhatley.co.uk/lets-not-dilly-dally-coldfusion-has-its-merits#comments</comments>
		<pubDate>Fri, 09 Jan 2009 10:58:36 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[administrator]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe ColdFusion]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[content management]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[enterprise-level search]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[fundamentals]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Applications]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rapid application development]]></category>
		<category><![CDATA[Rich Internet Applications]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[web technology]]></category>
		<category><![CDATA[web world]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1734</guid>
		<description><![CDATA[ColdFusion is 13 years old. That make makes it the daddy of the web world! It does not make it any less hip or useful than the relatively new kids on the block. Let's not dilly-dally, bicker or insult one another about which is best, which one is dying and which one is not worth the computer it is compiled on. What is important is to understand the merits of each language and decide which one best suits the application, not only in technical terms, but also in terms of time-to-market, cost of development, availability of a skilled workforce etc.]]></description>
			<content:encoded><![CDATA[<p>ColdFusion is 13 years old. That make makes it the daddy of the web world! It does not make it any less hip or useful than the relatively new kids on the block.</p>
<p>Take this scenario. A company I once worked for had what can be described as a business directory built upon a licensed, yet bastardised, version of a popular ColdFusion-based <abbr title="Content Management System">CMS</abbr>. It didn&#8217;t work that well! The decision was made to redevelop the application in Java. It took two years to reach the same level of functionality! What happened next? Ruby-on-Rails is what! The rest is history and beyond the topic of this post.</p>
<p>So, in effect, the application almost went full-circle in its development paradigm &#8212; both ColdFusion and Ruby-on-Rails can be considered <q>Rapid Application Development</q> environments, Java, certainly not. Why did the decision makers not stick with ColdFusion and put time aside to actually build it properly in the first place? To put it simply, they lost faith in ColdFusion; it was largely mis-understood.</p>
<p>The weakness of every programming language does not lie with the language itself per se &#8212; albeit it can have an important influencing factor &#8212; but rather with the ability, or indeed inability, of the developer to leverage the language in the most efficient and optimal way.</p>
<p>ColdFusion, like every other programming language has had and I&#8217;m sure still does have its fair share of poor developers; those people simply working with it as a means-to-an-end, rather than those passionate about the language, those people programming without understanding the fundamentals of programming or the implications of their poorly written code. This is apparent from .NET to Java, ColdFusion to Ruby, JavaScript to ActionScript.</p>
<p>Let&#8217;s not dilly-dally, bicker or insult one another about which is best, which one is dying and which one is not worth the computer it is compiled on. What is important is to understand the merits of each language and decide which one best suits the application, not only in technical terms, but also in terms of time-to-market, cost of development, availability of a skilled workforce etc.</p>
<p>ColdFusion, whether rightly or wrongly in some people&#8217;s opinion, can sit proudly amongst its peers and provide a truly compelling alternative.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Here&#8217;s how (in no particular order):</p>
<ol>
<li>Low Total Cost of Ownership &#8211; frequently, ColdFusion is described as expensive, it simply isn&#8217;t especially if you consider the natively supported functions. But to put it bluntly, if your company cannot afford the cost of ColdFusion standard, or indeed ColdFusion hosting, you have bigger things to worry about regarding the profitability of the company; you won&#8217;t be able to afford much of anything! The problem becomes not the product. ColdFusion applications are quicker to develop and developers are vastly cheaper to employ than their peers in Java or Ruby, just look at <a href="http://www.itjobswatch.co.uk/" title="ITJobsWatch" target="_blank" rel="nofollow">ITJobsWatch</a> for examples.</li>
<li>Rapid Application Development &#8211; ColdFusion vastly simplifies tasks. What would take other languages numerous lines of code to produce is efficiently encapsulated either in a tag or function or as a setting in the administrator. This is a simplistic yet indicative example: where else can you connected to a database simply with one line of code or indeed simply by name? ColdFusion changed the idea of specifying development time in terms of months and years to weeks and months or small features a matter of hours and days. Simplicity is not the mother or all evil. To be pragmatic, simplification reduces costs.</li>
<li>Rich Internet Applications &#8211; ColdFusion may or may not have pioneered the <abbr title="Rich Internet Application">RIA</abbr> paradigm, but it has played a significant supporting role to Flash and now Flex. ColdFusion natively supports Flash remoting, providing the all important data access tier.</li>
<li>Platform Maturity &#8211; ColdFusion 8 is built upon the latest version of Java (1.6). Along with internal improvements to the ColdFusion application, this has afforded ColdFusion unprecedented speed improvements and stability.</li>
<li>Language Maturity &#8211; with each major release of ColdFusion comes many language enhancements added to the core. This means that previous addons, for example image manipulation, which came at a premium are now standard. Adobe and other companies that produce <abbr title="ColdFusion Markup Language">CFML</abbr> engines are now participating in  a <abbr title="ColdFusion Markup Language">CFML</abbr> advisory committee, which aims to set standards for the core language. This is not only a sign of maturity but a letter of intent by the industry that will mean your application will work on any engine, assuming no proprietary functionality is used.</li>
<li>The Ultimate Middleware &#8211; ColdFusion sits comfortably between any backend and front end system. Be it interfacing with a host of databases, Java, .NET, <abbr title="Component Object Model">COM</abbr>, Corba or connecting to classic <abbr title="HyperText Manrkup Language">HTML</abbr> or rich Flash, Flex and <abbr title="Asynchronous JavaScript and XML">AJAX</abbr> frontends with little or no configuration.</li>
<li>Feature Rich &#8211; what other web technology <strong>natively</strong> supports <abbr title="">PDF</abbr> generation, charting, enterprise-level search, <abbr title="Asynchronous JavaScript and XML">AJAX</abbr>, image manipulation, Atom and <abbr title="Really Simple Syndication">RSS</abbr> creation, Zip and <abbr title="Java Archive">JAR</abbr> file manipulation, a server monitor, Flex integration, encryption libraries, all important database connectors, webservice creation, <abbr title="">XML</abbr> manipulation, inbuilt reporting application (similar to Crystal Reports), email, <abbr title="File Transfer Protocol">FTP</abbr> to name but a few? I hazard a guess at none, unless you&#8217;re happy to pay a premium.</li>
<li>Platform Independent &#8211; since ColdFusion 6, when Macromedia redeveloped the entire application in Java, ColdFusion has been platform independent. You can install it on practically any machine.</li>
<li>OpenSource Alternatives &#8211; BlueDragon and Railo are both significant alternatives to Adobe ColdFusion and both have opensource alternatives, the latter of the two having recently joined the JBoss community. Adobe are also considering providing a free edition to academic institutions.</li>
<li>The Future &#8211; many commentators have mentioned Hibernate as a significant addition to the next release of ColdFusion, version 9. But having seen the prerelease notes, that is not all that will be added. Alas I&#8217;m under <abbr title="Non-Disclosure Agreement">NDA</abbr>, but rest assured, there is going to be a significant intake of breath when developers get hold of the next release. ColdFusion 8 was firmly geared towards middle management with fuzzy additions, ColdFusion 9 is set to re-address the balance with compelling language and functionality enhancements.</li>
</ol>
<p>ColdFusion evangelism needs to step up a gear! Adobe certainly doesn&#8217;t afford much marketing budget to the product, prefering <q>The Community</q> do the hard work. It is not always easy convincing the decision makers that ColdFusion is a good product of choice, without Adobe&#8217;s unnerving support, but we have to work hard, break down those barriers, encroach on events outside the comfortable sphere of the ColdFusion world and demonstrate ColdFusion&#8217;s match-winning ability.</p>
<p>ColdFusion isn’t dying, it’s simply niche. Every niche has its place.</p>
<p><strong>UPDATE:</strong> If you would like to view the ensuing debate regarding ColdFusion prompted by <a href="http://aralbalkan.com/1864" title="Aral Balkan - Why learning ColdFusion today is a waste of time." target="_blank" rel="nofollow">Aral Balkan</a>, feel free to do so. This post should serve as a positive reminder of ColdFusion&#8217;s virtues, alongside the need for a balanced and polite debate.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/lets-not-dilly-dally-coldfusion-has-its-merits/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Using Ant with Eclipse</title>
		<link>http://www.simonwhatley.co.uk/using-ant-with-eclipse</link>
		<comments>http://www.simonwhatley.co.uk/using-ant-with-eclipse#comments</comments>
		<pubDate>Tue, 06 Jan 2009 11:16:44 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache Ant]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[build.xml]]></category>
		<category><![CDATA[CFEclipse]]></category>
		<category><![CDATA[Click Import]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[dev server]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[extreme programming]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[lifecycle]]></category>
		<category><![CDATA[Martin Laine]]></category>
		<category><![CDATA[platform-independent tool]]></category>
		<category><![CDATA[software automation]]></category>
		<category><![CDATA[test-driven development]]></category>
		<category><![CDATA[unit testing frameworks]]></category>
		<category><![CDATA[web developers]]></category>
		<category><![CDATA[Web Server]]></category>
		<category><![CDATA[web server folder]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1552</guid>
		<description><![CDATA[If you're currently not using Eclipse as your development tool of choice, you certainly should be! Eclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re currently not using Eclipse as your development tool of choice, you certainly should be! Eclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle.</p>
<p>Eclipse started out as a Java <abbr title="Integrated Development Environment">IDE</abbr> and has continually grown from there. Plugins now include, amongst a plethora of others, the venerable Aptana, CFEclipse, SQL Explorer, Subclipse and, more recently, the Adobe-developed Flex Builder and ColdFusion-equivalent codenamed <q>Bolt</q>.</p>
<p>Apache Ant is a software tool for automating software build processes. It is implemented using the Java language, requires the Java platform, and was originally developed to automate the build of Java projects. However, since Ant was created as a simple, platform-independent tool, it can really be used to automate the build of anything you choose.</p>
<p>Ant uses <abbr title="eXtensible Markup Language">XML</abbr> to describe the build process and its dependencies, using a file commonly called <code>build.xml</code>. Using this file, Ant makes it trivial to integrate unit testing frameworks with the build process and has made it easy for web developers to adopt test-driven development, and even Extreme Programming.</p>
<p>Fortunately for us, if you download and run Eclipse, you already have Ant installed and so do not have any complex configuration to concern yourself with; well, at least initially.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Setting Up Eclipse</h3>
<p>For the most part, Eclipse has all you need to get up and running with Ant pre-installed. However, most projects will include a release target which uses <abbr title="File Transfer Protocol">FTP</abbr> to upload the files to a live server. The <abbr title="File Transfer Protocol">FTP</abbr> ant task requires some extra libraries (.jar files):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">commons-net-*.jar
jakarta-oro-*.jar</pre></div></div>

<p>(The library <a href="http://www.simonwhatley.co.uk/examples/ant/">files can be downloaded from here</a>).</p>
<p>Copy the files into the ant lib folder of your Eclipse install. The folder is commonly located here:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">C:\Program Files\Eclipse\plugins\org.apache.ant_*\lib</pre></div></div>

<p>(The asterix * refers to the Ant version).</p>
<p>Next, go to Window > Preferences and select Ant > Runtime. In the Classpath tab, select Ant Home Entries, click Add External JARs&#8230; and select the 2 files you copied to the ant lib folder.</p>
<h3>A Typical Ant Project Setup</h3>
<p>A project with ant build scripts should have the following within the repository:</p>
<ul>
<li>build.xml (the actual ant build script)</li>
<li>build.properties.template (a template for individual build.properties files)</li>
<li>an optional top level lib folder (containing jar files for external ant tasks)</li>
</ul>
<p>Examples of the <code>build.xml</code> and <code>build.properties.template</code> <a href="http://www.simonwhatley.co.uk/examples/ant/">files can be downloaded from here</a>.</p>
<h3>Create Your Own build.properties File</h3>
<p>Make a copy of the <code>build.properties.template</code> file (name it build.properties) and set the values to fit your local setup (in most cases, the only property you may want to change is <code>deploy.dir.local</code> which is the path to the site on your local machine).</p>
<p>This file should never be committed to the repository (the repository should be set to ignore it anyway).</p>
<h3>Basic Build Tasks</h3>
<p>The build file should have a <code>deploy.local</code> task. This task builds the project and copies it to your local webserver (the path to the web server folder will be defined in the <code>build.properties</code> file).</p>
<p>Most projects should also have a <code>deploy.dev</code> task to copy the latest work to the dev server so that other people can view it.</p>
<h3>Setting Up an Automatic Build</h3>
<p>To make things easy, you can set deploy.local to run every time you save a file. This is called an <q>automatic build</q>.</p>
<p>The process for setting up automatic build is quite convoluted. I&#8217;m not sure why but this is the best way I&#8217;ve found to make it work.</p>
<p><strong>Step 1: Add the build file to your ant view</strong></p>
<p>Click the add button and select the build.xml file from the project. You can also drag the build.xml file onto the ant view (To add the ant view to your perpective, go to Window > Show View > Other…)</p>
<p><strong>Step 2: Run as Ant Build</strong></p>
<p>In your ant view, right click the newly added build file and select Run As > Ant Build… In the dialog window, select the &#8216;Hide internal targets not selected for execution&#8217; option in the Targets tab. You can rename the builder in the box at the top of the window if you wish (I usually remove the trailing &#8216;build.xml&#8217;. Click Apply and Close.</p>
<p><strong>Step 3: Setup automatic build</strong></p>
<p>Right click on the project, select Properties, then Builders. Click Import. Before closing the screen, highlight the imported build and select edit. Go to the Targets tab select clean for &#8216;After a clean&#8217; and deploy.local for &#8216;Auto build&#8217;. Apply the changes and close.</p>
<p><strong>Step 4: Enable Auto Build</strong></p>
<p>Go to Project > Build Automatically</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p><strong> Acknowledgment:</strong> Thanks should go to <a href="http://www.1pixelout.net/" title="1PixelOut: Martin Laine's online musings" target="_blank" rel="nofollow">Martin Laine</a> for his help and guidance which resulted in this article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/using-ant-with-eclipse/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Enabling Search Engine Safe URLs with Apache and htaccess</title>
		<link>http://www.simonwhatley.co.uk/enabling-search-engine-safe-urls-with-apache-and-htaccess</link>
		<comments>http://www.simonwhatley.co.uk/enabling-search-engine-safe-urls-with-apache-and-htaccess#comments</comments>
		<pubDate>Mon, 08 Dec 2008 15:57:15 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[All]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[ColdBox]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Fusebox]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[httpd.conf]]></category>
		<category><![CDATA[ISAPI]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[New Brunswick]]></category>
		<category><![CDATA[None]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[search engine]]></category>
		<category><![CDATA[search engine optimisation]]></category>
		<category><![CDATA[search engine robots]]></category>
		<category><![CDATA[search engine safe]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[URL rewriting]]></category>
		<category><![CDATA[USD]]></category>
		<category><![CDATA[web applications]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1635</guid>
		<description><![CDATA[An increasingly popular technique among websites and in particular, blogs, is the idea of making URLs search engine friendly, or safe, on the premise that doing so will help search engine optimisation. By removing the obscure query string element of a URL and replacing it with keyword rich alternatives, not only makes it more readable for a human being, but also the venerable robots that allow our page content to be found in the first place.]]></description>
			<content:encoded><![CDATA[<p>An increasingly popular technique among websites and in particular, blogs, is the idea of making <abbr title="Universal Resource Locator">URL</abbr>s search engine friendly, or safe, on the premise that doing so will help search engine optimisation. By removing the obscure query string element of a <abbr title="Universal Resource Locator">URL</abbr> and replacing it with keyword rich alternatives, not only makes it more readable for a human being, but also the venerable robots that allow our page content to be found in the first place.</p>
<p>For example, the following is WordPress&#8217; default URL configuration for a post:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">http://www.domain.com/?p=1635</pre></div></div>

<p>However, buy using a URL-rewriting available in the Apache webserver, we can achieve a far better result, such as the following:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">http://www.domain.com/search-engine-safe-urls</pre></div></div>

<p>NB. It is also possible to achieve a similar result with an <abbr title="Internet Server Application Programming Interface">ISAPI</abbr> rewrite for Microsoft&#8217;s <abbr title="Internet Information Server">IIS</abbr> webserver, but this topic will not be included in this post.</p>
<p>To get your website working with <abbr title="search engine safe">SES</abbr> <abbr title="Universal Resource Locator">URL</abbr>s you need to enable both the <code>mod_rewite</code> module and <code>AllowOverride</code> directive in the Apache configuration file.</p>
<p>Uncomment (remove #) from the following to enable the re-write rule:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">LoadModule rewrite_module modules/mod_rewrite.so</pre></div></div>

<p>Change the <code>AllowOverride</code> directive from none to all</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&lt;directory /&gt;
    Options FollowSymLinks
    AllowOverride all
    Order deny,allow
    Deny from all
&lt;/directory&gt;
&nbsp;
&lt;directory &quot;C:/WebRoot&quot;&gt;
    # Possible values for the Options directive are &quot;None&quot;, &quot;All&quot;,
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that &quot;MultiViews&quot; must be named *explicitly* --- &quot;Options All&quot;
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks
&nbsp;
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be &quot;All&quot;, &quot;None&quot;, or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All
&nbsp;
    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all
&lt;/directory&gt;</pre></div></div>

<p>On Apache webservers, <code>.htaccess</code> (hypertext access) is the default name of directory-level configuration files. An <code>.htaccess</code> file is placed in a particular directory, and the directives in the <code>.htaccess</code> file apply to that directory, and all its subdirectories. It provides the ability to customize configuration for requests to the particular directory. In our case, enabling search engine safe (<abbr title="search engine safe">SES</abbr>) <abbr title="Universal Resource Locator">URL</abbr>s.</p>
<p>By setting the <code>AllowOverride</code> directive to <q>All</q> in effect defers configuration settings to the <code>.htaccess</code> file.</p>
<p>An example <code>.htaccess</code> file could include the following code to rewrite the URLs:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]</pre></div></div>

<p>Search engine friendly <abbr title="Universal Resource Locator">URL</abbr>s are implemented with Rewrite engines. The rewrite engine modifies the <abbr title="Universal Resource Locator">URL</abbr> based upon a number of rewrite conditions and rules.</p>
<p>The <code>RewriteBase</code> directive explicitly sets the base <abbr title="Universal Resource Locator">URL</abbr> for per-directory rewrites. The <code>RewriteCond</code> directive defines a rule condition, so in this case handling missing files or directories. Finally, the <code>RewriteRule</code> directive is the real rewriting workhorse. In this example, we&#8217;re getting everything in the <abbr title="Uniform Resource Identifier">URI</abbr> &#8212; i.e. not including the protocol (HTTP/S) and domain name &#8212; based upon a regular expression. This is then appended to the default file reference &#8212; index.php &#8212; as a <a href="http://www.regular-expressions.info/brackets.html" title="Regular Expression: back references" target="_blank" rel="nofollow">back reference</a>. The <code>[L,QSA]</code> refers to the rule being the last rule and append any query string parameters to the default file. It is important to note that this is all done on the server side, the user will never see the website address changing in the browser&#8217;s address bar. Furthermore, simply transposing the index.php filename with your default file name &#8212; e.g. index.cfm, default.aspx &#8212; will have the same result. Indeed, the above rewrite rules are becoming a de-facto standard for web applications.</p>
<p>To fully understand <code>mod_rewrite</code> rules above, look at the <a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html" title="Apache mod_rewrite documentation" target="_blank" rel="nofollow">Apache mod_rewrite documentation</a>.</p>
<p>Once you have your <abbr title="Search Engine Safe">SES</abbr> functionality in place on the webserver, it is then the responsibility of your application framework to understand the <abbr title="Universal Resource Locator">URL</abbr> construction and handle it accordingly. Fortunately, frameworks such as <a href="http://www.coldboxframework.com" title="ColdBox Framework" target="_blank" rel="nofollow">ColdBox</a> and <a href="http://www.fusebox.org" title="Fusebox Framework" target="_blank" rel="nofollow" >Fusebox</a> for ColdFusion, <a href="http://framework.zend.com" title="Zend PHP framework" target="_blank" rel="nofollow">Zend</a> and <a href="http://www.symfony-project.com" title="Symfony PHP fraemwork" target="_blank" rel="nofollow">Symfony</a> for <abbr title="PHP Hypertext Precursor">PHP</abbr>, all contain functionality to do this, but that is the subject of an entirely different post.</p>
<p>Users of web applications prefer short, neat <abbr title="Universal Resource Locator">URL</abbr>s to raw query string parameters. A concise <abbr title="Universal Resource Locator">URL</abbr> is easy to remember, and less time-consuming to type in. If the <abbr title="Universal Resource Locator">URL</abbr> can be made to relate clearly to the content of the page, then errors are not only less likely to happen, but our good friends the search engine robots are able to draw a stronger assumption of the pages&#8217; relevance and content.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/enabling-search-engine-safe-urls-with-apache-and-htaccess/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using the MooTools Autocompleter Plugin with ColdFusion</title>
		<link>http://www.simonwhatley.co.uk/using-the-mootools-autocompleter-plugin-with-coldfusion</link>
		<comments>http://www.simonwhatley.co.uk/using-the-mootools-autocompleter-plugin-with-coldfusion#comments</comments>
		<pubDate>Thu, 21 Aug 2008 10:57:35 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Australia]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[autocompleter]]></category>
		<category><![CDATA[Bulgaria]]></category>
		<category><![CDATA[CNet]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[Dylan Verheul]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Harald Kirschner]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript Object Notation]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[New Brunswick]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[search interface]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[united kingdom]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=883</guid>
		<description><![CDATA[In a previous post, I demonstrated how to implement Dylan Verheul’s jQuery Autocomplete plugin. Not content with demonstrating one library's plugin, it is now the turn of Mootools.]]></description>
			<content:encoded><![CDATA[<p>In a <a href="/using-jquery-auto-complete-with-coldfusion" title="Using jQuery Auto-Complete with ColdFusion">previous post</a>, I demonstrated how to implement Dylan Verheul&#8217;s <a href="http://www.dyve.net/jquery/?autocomplete" title="jQuery Autocomplete Plugin" target="_blank" rel="nofollow">jQuery Autocomplete plugin</a>. Not content with demonstrating one library&#8217;s plugin, it is now the turn of <a href="http://mootools.net/" title="MooTools JavaScript Framework" target="_blank" rel="nofollow">MooTools</a>.</p>
<blockquote><p>MooTools is a compact, modular, Object-Oriented JavaScript framework designed for the intermediate to advanced JavaScript developer. It allows you to write powerful, flexible, and cross-browser code with its elegant, well documented, and coherent API.</p></blockquote>
<p>In this post I will show you how to implement the <a href="http://digitarald.de/project/autocompleter/" title="Autocompleter Plugin" target="_blank" rel="nofollow">AutoCompleter plugin</a> by Harald Kirschner. Kirschner&#8217;s AutoCompleter plugin script for MooTools provides the functionality for text suggestion and completion. It features different data-sources (local, <acronym title="JavaScript Object Notation">JSON</acronym> or <abbr title="eXtensible Markup Language">XML</abbr>), a variety of user interactions, custom formatting, multiple selection, animations and much more.</p>
<h3>The Goal</h3>
<p>The goal of this post will be the same as the <a href="/using-jquery-auto-complete-with-coldfusion" title="Using jQuery Auto-Complete with ColdFusion">jQuery autocomplete post</a>: Allow the user to type a few characters into a standard form text input field and to automatically provide suggestions from which the user can select.</p>
<h3>Prerequisites</h3>
<ol>
<li>The <a href="http://mootools.net/download" title="Mootools Download" target="_blank" rel="nofollow">latest copy of MooTools</a></li>
<li>A basic understanding of JavaScript and <acronym title="JavaScript Object Notation">JSON</acronym></li>
<li>A server-side script that can respond to the <acronym title="Asynchronous JavaScript and XML">AJAX</acronym> request, in our case ColdFusion</li>
</ol>
<h3>Demo</h3>
<p>The demo below will show how to interact with a simple ColdFusion script, but I&#8217;ll also provide <a href="/examples/autocomplete/mootools/" title="More examples">more (advanced) examples</a> in the <a href="/examples/autocomplete/mootools/autocomplete.zip" title="Download the files">download</a>.</p>
<h3>How It Works</h3>
<p>Once the user begins to type into the form text input field, the MooTools auto-complete is activated. After a set character length and time interval (both optional), a list of items is displayed below the input field. The user can select an item with either the arrow keys or mouse.</p>
<p>NB. Clicking back in the input field will repopulate the auto-complete list, if options are available, so that the user can change the selection. Deleting part of the chosen item will also trigger a new selection list.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>The Code</h3>
<p>There are three parts to this demo:</p>
<ol>
<li>The page’s HTML.</li>
<li>The server-side code to produce the dynamic page (i.e. to load the autocomplete <code>div</code> when the user types something into the input field).</li>
<li>The MooTools JavaScript.</li>
</ol>
<p><strong>HTML Form</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;h1&gt;Example: Country Lookup&lt;/h1&gt;
&lt;p&gt;Using &lt;abbr title=&quot;Asynchronous JavaScript and XML&quot;&gt;AJAX&lt;/abbr&gt; to interrogate the database.&lt;/p&gt;
&lt;p&gt;Example data: Australia, Bulgaria, United Kingdom&lt;/p&gt;
&lt;form name=&quot;frmAutoCompleteCountry&quot; id=&quot;frmAutoCompleteCountry&quot; action=&quot;#&quot; method=&quot;post&quot;&gt;
&lt;p&gt;
&lt;label for=&quot;country&quot;&gt;Country&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;country&quot; id=&quot;country&quot; /&gt;
&lt;/p&gt;
&lt;/form&gt;</pre></div></div>

<p><strong>ColdFusion</strong></p>
<p>Below is a simple ColdFusion component that takes a string as an argument. This string is part or all of the country name. The query results are parsed as an array and returned from the function, as <acronym title="JavaScript Object Notation">JSON</acronym>, to the MooTools auto-complete function.</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #800000;">&lt;cfcomponent</span> <span style="color: #0000ff">output</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;false&quot;</span><span style="color: #800000;">&gt;</span></span>
&nbsp;
	<span style="color: #333333;"><span style="color: #800000;">&lt;cffunction</span> <span style="color: #0000ff;">name</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;getCountry&quot;</span> <span style="color: #0000ff">access</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;remote&quot;</span> <span style="color: #0000ff">output</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;false&quot;</span> <span style="color: #0000ff">returntype</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;array&quot;</span> returnf<span style="color: #0000ff;">or</span>mat<span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;json&quot;</span><span style="color: #800000;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #800000;">&lt;cfargument</span> <span style="color: #0000ff;">name</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;country&quot;</span> <span style="color: #0000ff;">type</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;string&quot;</span> <span style="color: #0000ff">required</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;true&quot;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>
&nbsp;
		<span style="color: #333333;"><span style="color: #800000;">&lt;cfset</span> <span style="color: #0000ff;">var</span> qryCountry <span style="color: #0000ff">=</span> <span style="color: #800080;">queryNew</span><span style="color: #000000;">&#40;</span><span style="color: #009900;">'country'</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #800000;">&lt;cfset</span> <span style="color: #0000ff;">var</span> arrCountry <span style="color: #0000ff">=</span> <span style="color: #800080;">arrayNew</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>
&nbsp;
		<span style="color: #333333;"><span style="color: #800000;">&lt;cfquery</span> <span style="color: #0000ff;">name</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;qryCountry&quot;</span> <span style="color: #0000ff">datasource</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;test&quot;</span><span style="color: #800000;">&gt;</span></span>
		SELECT countryName
		FROM country
		WHERE countryName LIKE <span style="color: #333333;"><span style="color: #800000;">&lt;cfqueryparam</span> <span style="color: #0000ff;">value</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;%#ARGUMENTS.country#%&quot;</span> <span style="color: #0000ff">cfsqltype</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;cf_sql_varchar&quot;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #800000;">&lt;/cfquery&gt;</span></span>
&nbsp;
		<span style="color: #333333;"><span style="color: #800000;">&lt;cfloop</span> <span style="color: #0000ff">query</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;qryData&quot;</span><span style="color: #800000;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #800000;">&lt;cfset</span> arrCountry<span style="color: #000000;">&#91;</span>currentRow<span style="color: #000000;">&#93;</span> <span style="color: #0000ff">=</span> qryCountry.countryName<span style="color: #000000;">&#91;</span>currentRow<span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #800000;">&lt;/cfloop&gt;</span></span>
&nbsp;
		<span style="color: #333333;"><span style="color: #0000ff;">&lt;</span>cfreturn arrCountry <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #800000;">&lt;/cffunction&gt;</span></span>
&nbsp;
<span style="color: #333333;"><span style="color: #800000;">&lt;/cfcomponent&gt;</span></span></pre></div></div>

<p><strong>JavaScript</strong></p>
<p>The JavaScript will attach itself after the <acronym title="Document Object Model">DOM</acronym> is ready &#8212; this more or less relates to when the page has loaded in the browser. Each time the text input field, with the ID of country, is changed, the <code>Autocompleter.Ajax.Json</code> event is fired. This makes a call to the ColdFusion component, which returns a <acronym title="JavaScript Object Notation">JSON</acronym> object of matched items. This <acronym title="JavaScript Object Notation">JSON</acronym> object is interpreted by the plugin and rendered as an <abbr title="Hyper-Text Markup Language">HTML</abbr> un-ordered list.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot; src=&quot;mootools.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;Observer.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;Autocompleter.js&quot;&gt;&lt;/script&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;Autocompleter.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
window.addEvent('domready', function() {
	new Autocompleter.Ajax.Json(
		'country',
		'data/Country.cfc?method=getCountry&amp;returnformat=json&amp;country=' + $('country').getProperty('value')
		, {
			'minLength': 1, // We wait for at least one character
			'overflow': true // Overflow for more entries'
	});
});
&lt;/script&gt;</pre></div></div>

<h3>Where to Take it Next</h3>
<p><strong>Unobtrusive JavaScript</strong></p>
<p>As with any page that is loaded with JavaScript and <acronym title="Asynchronous JavaScript and XML">AJAX</acronym> functionality, it should work without JavaScript.</p>
<p>To achieve this with the above tutorial, you will need to replace the MooTools autocomplete functionality with an ‘interim’ page that allows a user to select from a list of items, effectively turning the input field into a simple search interface. Of course, all other form field information would need to be retained between pages.</p>
<h3>Download the Code</h3>
<p>The <a href="/examples/autocomplete/mootools/autocomplete.zip" title="Download the example code">example code</a> can be downloaded from the demo page. Included are ColdFusion and PHP examples.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/using-the-mootools-autocompleter-plugin-with-coldfusion/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Protect Your Website from a Malicious Attack</title>
		<link>http://www.simonwhatley.co.uk/how-to-protect-your-website-from-a-malicious-attack</link>
		<comments>http://www.simonwhatley.co.uk/how-to-protect-your-website-from-a-malicious-attack#comments</comments>
		<pubDate>Mon, 18 Aug 2008 12:54:20 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Application.cfc]]></category>
		<category><![CDATA[Application.cfm]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[cfquery]]></category>
		<category><![CDATA[cfqueryparam]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[ColdFusion Administrator]]></category>
		<category><![CDATA[cross-site scripting]]></category>
		<category><![CDATA[database server]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Manitoba]]></category>
		<category><![CDATA[Mark Kruger]]></category>
		<category><![CDATA[prevention]]></category>
		<category><![CDATA[protection]]></category>
		<category><![CDATA[raw processing]]></category>
		<category><![CDATA[RDBMS]]></category>
		<category><![CDATA[script protect]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[software releases]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Injection]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[variables]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[Web Application Hacker]]></category>
		<category><![CDATA[web code]]></category>
		<category><![CDATA[Web Security]]></category>
		<category><![CDATA[Web Server]]></category>
		<category><![CDATA[Web Servers]]></category>
		<category><![CDATA[webserver]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=809</guid>
		<description><![CDATA[Every seasoned developer will know that protecting your website from a hacker is a top priority, whether for your own reputation or for maintaining your company's reputation and log-term revenue prospects.]]></description>
			<content:encoded><![CDATA[<p>Every seasoned developer will know that protecting your website from a hacker is a top priority, whether for your own reputation or for maintaining your company&#8217;s reputation and log-term revenue prospects.</p>
<p><strong>Why should you be worried about security?</strong></p>
<p>The Web is changing many of the assumptions that people have historically made about computer security and publishing. As the Internet makes it possible for web servers to publish information to millions of users, it also makes it possible for computer hackers, crackers, criminals, vandals, and other &#8220;bad guys&#8221; to break into the very computers on which the web servers are running. Once subverted, web servers can be used by attackers as a launching point for conducting further attacks against users and organisations.</p>
<p>It is considerably more expensive and more time-consuming to recover from a security incident than to take preventative measures ahead of time.</p>
<p>This blog post started on the premise of protecting your website from a <a href="http://en.wikipedia.org/wiki/SQL_injection" title="Wikipedia: SQL Injection" target="_blank" rel="nofollow">SQL Injection</a> Attack. However, it is also appropriate to discuss, at a relatively high level, how to secure your server architecture and applications.</p>
<h3>Server-Level Security</h3>
<ul>
<li>Separate web- and database-servers on to different physical machines.</li>
<li>Secure the web- and database-servers with traditional techniques. Only authorised accounts should have the capabilities to run tasks on the machine. That means not giving admin-rights to the user account.</li>
<li>Keep servers up-to-date with the latest patches and software releases.</li>
<li>Minimise the number of services running on the server. This means limiting the services to only those required for the web- or database-servers to function.</li>
<li>Secure information in transit between servers. This may mean physically securing the network to prevent evesdropping via encryption or obfuscating the data amongst innocuous &#8216;noise&#8217;.</li>
<li>Secure the database server behind a firewall.</li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Application-Level Security</h3>
<ul>
<li>Separate ColdFusion, the webserver and database server user accounts. They should never be under the same system account.</li>
<li>Create a database user specifically for your ColdFusion datasource and restrict it to only the activities required for the application. The user should not have database-owner rights, access to databases not relating to the application or access to the system tables.</li>
<li>Revoke privileges in the ColdFusion datasource definition to prevent the SQL commands <code>CREATE</code>, <code>DROP</code>, <code>GRANT</code>, <code>REVOKE</code> and <code>ALTER</code>.</li>
<li>General settings in the ColdFusion Administrator:
<ul>
<li>Check the <em>Disable access to internal ColdFusion Java components</em> option.</li>
<li>Check the <em>Enable Global Script Protection</em> option.</li>
<li>Add a <em>Missing Template Handler</em>.</li>
<li>Add a <em>Site-wide Error Handler</em>.</li>
<li>Reduce the <em>Maximum size of post data</em> from 100<abbr title="megabytes">MB</abbr>.</li>
<li>Enable <em>Timeout Requests</em>, and set to 60 seconds or less.</li>
<li>Disable <em>Robust Exception Handling</em> on production servers.</li>
</ul>
</li>
</ul>
<h3>Code-Level Security</h3>
<ul>
<li>Application.cfc &#8211; Set the <code>scriptProtect</code> Application variable to <code>true</code> to enable application-wide cross-site script protection.
</li>
<li>CFQueryParam &#8211; This tag, importantly, verifies the data type of a query parameter and, for <abbr title="Relational Database Management Systems">RDBMS</abbr>s that support bind variables, enables ColdFusion to use bind variables in the <acronym title="Structured Query Language">SQL</acronym> statement. Bind variable usage enhances performance when executing a <code>cfquery</code> statement multiple times.

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #800000;">&lt;cfquery</span> <span style="color: #0000ff;">name</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;qry&quot;</span> <span style="color: #0000ff">datasource</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;#APPLICATION.dsn#&quot;</span><span style="color: #800000;">&gt;</span></span>
SELECT column1, column2, column3
FROM tableName
WHERE column4 = <span style="color: #333333;"><span style="color: #800000;">&lt;cfqueryparam</span> <span style="color: #0000ff;">value</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;#variable1#&quot;</span> <span style="color: #0000ff">cfsqltype</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;cf_sql_bit&quot;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>
AND column5 LIKE <span style="color: #333333;"><span style="color: #800000;">&lt;cfqueryparam</span> <span style="color: #0000ff;">value</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;%#variable2#%&quot;</span> <span style="color: #0000ff">cfsqltype</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;cf_sql_varchar&quot;</span> <span style="color: #0000ff;">maxlength</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;200&quot;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>
AND column6 IN (<span style="color: #333333;"><span style="color: #800000;">&lt;cfqueryparam</span> <span style="color: #0000ff;">value</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;#variable3#&quot;</span> <span style="color: #0000ff">cfsqltype</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;cf_sql_integer&quot;</span> <span style="color: #0000ff">list</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;true&quot;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>)
<span style="color: #333333;"><span style="color: #800000;">&lt;/cfquery&gt;</span></span></pre></div></div>

<p>There are limitations to the use of the <code>cfqueryparam</code> tag. In ColdFusion 7 for example, you cannot use them in queries using the <code>cachedWithin</code> attribute. Similarly, they cannot be used in <code>ORDER BY</code> clauses, although the use of conditional logic should resolve the need for order by variables.
</li>
<li>Functions &#8211; As a rule of thumb, validate <em>all</em> the data being passed into a query prior to it being used. ColdFusion MX 7 saw the introduction of the <code>isValid()</code> function. This function tests whether a value meets a validation or data type rule and can be used to replace a large number of type-specific functions such as <code>isArray()</code>, <code>isBinary()</code>, <code>isBoolean()</code>, <code>isDate()</code>, <code>isNumeric()</code> and <code>isSimpleValue()</code> etc.
</li>
<li>Stored Procedures &#8211; I often favour the use of stored procedures over standard queries. Not only do they add an additional level of performance, they provide an additional level of security; ColdFusion does not do any raw processing of queries in the web code, it simply passes variables down the wire to the database server.</li>
</ul>
<h3>Additional Resources</h3>
<ul>
<li>
<a href="http://www.amazon.com/Web-Security-Privacy-Commerce-2nd/dp/0596000456/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1218663002&#038;sr=8-1" title="Amazon: Web Security, Privacy and Commerce" target="_blank" rel="nofollow">Web Security, Privacy and Commerce</a></li>
<li>O&#8217;Reilly&#8217;s <a href="http://www.amazon.com/Web-Application-Hackers-Handbook-Discovering/dp/0470170778/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1218663073&#038;sr=1-1" title="Amazon: The Web Application Hacker's Handbook" target="_blank" rel="nofollow">The Web Application Hacker&#8217;s Handbook</a></li>
<li>Adobe&#8217;s whitepaper &#8211; <a href="http://www.adobe.com/devnet/coldfusion/articles/dev_security/coldfusion_security_cf8.pdf" title="Adobe: ColdFusion 8 Security PDF" target="_blank" rel="nofollow">ColdFusion 8 Developer Security Guidlines</a> (<abbr title="Portable Document Format">PDF</abbr>, 281k)</li>
<li>Adobe&#8217;s whitepaper &#8211; <a href="http://www.adobe.com/devnet/coldfusion/articles/dev_security/coldfusion_security_cf7.pdf" title="Adobe: ColdFusion 7 Security PDF" target="_blank" rel="nofollow">ColdFusion 7 Developer Security Guidlines</a> (<abbr title="Portable Document Format">PDF</abbr>, 217k)</li>
<li>Adobe DevNet &#8211; <a href="http://www.adobe.com/devnet/coldfusion/articles/stored_procs.html" title="Learning Stored Procedure Basics in ColdFusion 8" target="_blank" rel="nofollow">Learning Stored Procedure Basics in ColdFusion 8</a></li>
<li>0&#215;000000 # The Hacker Webzine&#8217;s article on <a href="http://www.0x000000.com/?i=610" title="The Hacker Webzine: Attacking ColdFusion" target="_blank" rel="nofollow">Attacking ColdFusion</a></li>
<li>Three part series from Mark Kruger (ColdFusion Muse) &#8211; <a title="Query String with cfqueryparam" href="http://www.coldfusionmuse.com/index.cfm/2008/7/21/query-string-with-cfqueryparam" target="_blank" rel="nofollow">Part 1</a>, <a title="Using CAST and ASCII" href="http://www.coldfusionmuse.com/index.cfm/2008/7/18/Injection-Using-CAST-And-ASCII" target="_blank" rel="nofollow">Part 2</a>, <a title="Using Order By" href="http://www.coldfusionmuse.com/index.cfm/2008/7/21/SQL-injection-using-order-by" target="_blank" rel="nofollow">Part 3</a></li>
<li>Brad Wood&#8217;s article on <a href="http://www.codersrevolution.com/index.cfm/2008/7/26/cfqueryparam-its-not-just-for-security-also-when-NOT-to-use-it" title="CFQueryParam is not just for security - When not to use it" target="_blank" rel="nofollow">CFQueryParam is not just for security</a>.</li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/how-to-protect-your-website-from-a-malicious-attack/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.920 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-10 00:17:11 -->
<!-- Compression = gzip -->
