<?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>SitePoint &#187; ColdFusion</title> <atom:link href="http://www.sitepoint.com/category/tech/coldfusion/feed/" rel="self" type="application/rss+xml" /><link>http://www.sitepoint.com</link> <description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description> <lastBuildDate>Thu, 09 Feb 2012 04:20:52 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>CloudSpring: 11 Things Every Developer Should Know About the Cloud</title><link>http://feedproxy.google.com/~r/cloudspring/~3/zr_s-OEGKrA/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=11-things-every-developer-should-know-about-the-cloud</link> <comments>http://feedproxy.google.com/~r/cloudspring/~3/zr_s-OEGKrA/#comments</comments> <pubDate>Mon, 19 Dec 2011 06:03:04 +0000</pubDate> <dc:creator>Toby Tremayne</dc:creator> <category><![CDATA[.NET]]></category> <category><![CDATA[AWS]]></category> <category><![CDATA[Cloud]]></category> <category><![CDATA[ColdFusion]]></category> <category><![CDATA[Community]]></category> <category><![CDATA[debug]]></category> <category><![CDATA[DR]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Resources]]></category> <category><![CDATA[Snapshot]]></category> <category><![CDATA[Tech]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Web Tech]]></category> <category><![CDATA[cloud computing]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=49500</guid> <description><![CDATA[ Cloud computing opens a world of possibilities for software and developers, but coding for the cloud isn’t necessarily as straightforward as you might think. The learning curve for developers can be tricky—especially for web developers unused to working with concepts such as threading and concurrency, latency, asynchronicity and failure tolerance. Here are 11 things you need to watch out for when you start developing for the cloud. Compliance &#038; Governance Legal and operational requirements often dictate the location of your data storage and hosting, and in the cloud it’s no different]]></description> <content:encoded><![CDATA[<p></p><p>Cloud computing opens a world of possibilities for software and developers, but coding for the cloud isn’t necessarily as straightforward as you might think. The learning curve for developers can be tricky—especially for web developers unused to working with concepts such as threading and concurrency, latency, asynchronicity and failure tolerance. Here are 11 things you need to watch out for when you start developing for the cloud. Compliance &#038; Governance Legal and operational requirements often dictate the location of your data storage and hosting, and in the cloud it’s no different</p><p>Read more here:<br
/> <a
target="_blank" href="http://feedproxy.google.com/~r/cloudspring/~3/zr_s-OEGKrA/" title="11 Things Every Developer Should Know About the Cloud">11 Things Every Developer Should Know About the Cloud</a></p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://feedproxy.google.com/~r/cloudspring/~3/zr_s-OEGKrA/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ColdFusion 9 at Your Service: Image Manipulation with AIR</title><link>http://www.sitepoint.com/image-manipulation-coldfusion-9-air/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=image-manipulation-coldfusion-9-air</link> <comments>http://www.sitepoint.com/image-manipulation-coldfusion-9-air/#comments</comments> <pubDate>Wed, 28 Oct 2009 23:57:56 +0000</pubDate> <dc:creator>Kai Koenig</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://blogs.sitepoint.com/?p=34869</guid> <description><![CDATA[One of the exciting new features in ColdFusion 9 is the addition of a web service layer wrapping several aspects of ColdFusion's functionality. Kai shows us how to access those services from an AIR app to manipulate images online.]]></description> <content:encoded><![CDATA[<p></p><div
class="article" lang="en"><div
class="titlepage"><div><div></div><div></div><div></div><div></div></div></div><p>Earlier this month, Adobe released the latest version of ColdFusion at<br
/> the MAX conference in Los Angeles. Back in July I gave an <a
class="ulink" href="http://articles.sitepoint.com/article/whats-new-coldfusion-9" target="_top">overview<br
/> of ColdFusion 9</a>, covering some of the new features with the benefit<br
/> of Kay Smoljak&rsquo;s examples. This article is about one juicy new feature that<br
/> we omitted in that article: ColdFusion as a service (CFaaS).</p><p>CFaaS is a new way of accessing some of ColdFusion&rsquo;s functionalities<br
/> as remote or local services. For example, <code
class="sgmltag-element">&lt;CFIMAGE&gt;</code> and <code
class="sgmltag-element">&lt;CFDOCUMENT&gt;</code>, which were previously only<br
/> available as CFML tags and could therefore only be used in<br
/> <code
class="filename">.cfm</code> documents running on your server. With CFaaS, your<br
/> client-side code can access these ColdFusion functionalities with web<br
/> service calls.</p><p>With the current trend towards richer applications based on Flash,<br
/> Flex, AIR, or AJAX on the client side, it made sense for Adobe to give<br
/> ColdFusion 9 a service layer. This allows RIA developers to leverage some of<br
/> ColdFusion&rsquo;s rapid application development functionality in their<br
/> work.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>To illustrate how you can take advantage of this new service layer,<br
/> I&rsquo;ll show you how to build a simple AIR application that will act as a front<br
/> end for image processing tasks taking place on the server side. We want to<br
/> be able to drag and drop an image into the application, upload it to a<br
/> ColdFusion server, perform some CFaaS functionality to modify the image,<br
/> then retrieve the image to be displayed in our application. Finally, users<br
/> will be able to drag and drop the modified image back into their file system<br
/> as a JPEG file.</p><p>Before we start, here&rsquo;s what you&rsquo;ll need:</p><div
class="itemizedlist"><ul><li><p><a
class="ulink" href="http://www.adobe.com/cfusion/tdrc/index.cfm?product=coldfusion" target="_top">ColdFusion<br
/> 9</a> from Adobe. Download and install the free developer<br
/> edition.</p></li><li><p><a
class="ulink" href="http://labs.adobe.com/technologies/flashbuilder4/" target="_top">Flash Builder 4<br
/> beta 2</a> from Adobe Labs, which we&rsquo;ll use to build our AIR app.<br
/> We&rsquo;ll be using the Flex 3.4 SDK, so you could in theory use Flex Builder<br
/> 3 for most of what we&rsquo;ll be doing, but Flash Builder 4 will simplify a<br
/> few key tasks.</p></li><li><p>The sample code, which is <a
class="ulink" href="http://sitepoint-examples.s3.amazonaws.com/cf9webservices/ImageDragger.zip" target="_top">available<br
/> here</a>. The archive includes both an <code
class="filename">.fxp</code><br
/> project that you can import into Flash Builder, and the raw source files<br
/> in case you want to look at them on their own.</p></li></ul></div><p>Once you&rsquo;re done reading the article, head over and test your new<br
/> skills in our <a
class="ulink" href="http://sitepoint.com/quiz/coldfusion/image-manipulation-coldfusion-9-air" target="_top">Article<br
/> Quiz</a>!</p><div
class="section" lang="en"><div
class="titlepage"><div><div><h2 class="title"> <a
name="id2312055"></a>The Basics</h2></div></div></div><p>Before we start working through the example, let&rsquo;s have a look at<br
/> some basic CFaaS features and how we can make use of them. In ColdFusion<br
/> 9, the following tags and their functionality are available as<br
/> SOAP/WSDL-based web services:</p><div
class="itemizedlist"><ul><li><p><code
class="sgmltag-element">&lt;cfchart&gt;</code></pre></li><li><p><code
class="sgmltag-element">&lt;cfdocument&gt;</code></pre></li><li><p><code
class="sgmltag-element">&lt;cfimage&gt;</code></pre></li><li><p><code
class="sgmltag-element">&lt;cfmail&gt;</code></pre></li><li><p><code
class="sgmltag-element">&lt;cfpop&gt;</code></pre></li><li><p><code
class="sgmltag-element">&lt;cfpdf&gt;</code></pre></li></ul></div><p>The WDSL URLs for these services follow the format:<br
/> <code
class="uri">http://&lt;servername&gt;:&lt;port&gt;/CFIDE/services/&lt;servicename&gt;.cfc?wsdl</code>.<br
/> So, if you installed ColdFusion 9 on your local machine using its built-in<br
/> HTTP server, the WSDL URL to access the image service will be:<br
/> <code
class="uri">http://localhost:8500/CFIDE/services/image.cfc?wsdl</code>. All the<br
/> examples and sample code will be using this format, so if you&rsquo;re using a<br
/> different server name or port, you&rsquo;ll need to adjust the URLs<br
/> accordingly.</p><p>The WSDL URL of a service essentially exposes the entire service<br
/> API, and this can pose a significant security risk. Because of this, the<br
/> CFaaS engine is disabled by default, so you (or your ColdFusion server<br
/> administrator) will need to set up a user account for the CFaaS layer and<br
/> provide that user with appropriate access to the individual services.<br
/> You&rsquo;ll also need to provide a list or range of IP addresses that are<br
/> permitted to access exposed services. For the purpose of this exercise<br
/> we&rsquo;ll just be accessing the service from our local machine, so you&rsquo;ll only<br
/> need to add <code
class="uri">127.0.0.1</code> to that list.</p><p>To add the user for our service, we&rsquo;ll first log in to the<br
/> ColdFusion server administration area, located at<br
/> <code
class="uri">http://localhost:8500/CFIDE/administrator/index.cfm</code>. The two<br
/> screens we&rsquo;ll need are both found in the <span
class="guilabel">Security</span><br
/> section: <span
class="guilabel">User Manager</span> and <span
class="guilabel">Allowed IP<br
/> Addresses</span>.</p><div
class="figure"> <a
name="fig_cf_security"></a><p
class="title"><b>Figure&nbsp;1.&nbsp;ColdFusion Administrator menu</b></p><div
class="figure-contents"><div
class="mediaobject"><img
src="http://articles.sitepoint.com/articleresources/2009-11-CF9-images-kai-koenig/figures/image1.png" alt="ColdFusion Administrator menu"></div></div></div><p><br
class="figure-break"><p>First, in the <span
class="guilabel">User Manager</span> screen, create a<br
/> user, specifying a username and password. At the bottom of the screen,<br
/> move <span
class="guilabel">Image Service</span> from the list of prohibited<br
/> services to the list of exposed services.</p><div
class="figure"> <a
name="fig_cf_user_manager"></a><p
class="title"><b>Figure&nbsp;2.&nbsp;User Manager</b></p><div
class="figure-contents"><div
class="mediaobject"><img
src="http://articles.sitepoint.com/articleresources/2009-11-CF9-images-kai-koenig/figures/image2.png" alt="User Manager"></div></div></div><p><br
class="figure-break"><p>Nevermind the other sections of this form, you can leave them alone<br
/> for the purposes of this application. Make sure to remember the username<br
/> and password you set for your new user, as you&rsquo;ll need them to permit your<br
/> AIR app to access the image service.</p></div></div><p></p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/image-manipulation-coldfusion-9-air/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Five Stars! Add a Rating Widget to your ColdFusion App</title><link>http://www.sitepoint.com/rating-widget-coldfusion/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rating-widget-coldfusion</link> <comments>http://www.sitepoint.com/rating-widget-coldfusion/#comments</comments> <pubDate>Tue, 25 Aug 2009 14:00:00 +0000</pubDate> <dc:creator>Kai Koenig</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://blogs.sitepoint.com/?p=34854</guid> <description><![CDATA[Your readers want to have their say! In this article Kai shows you how to add a rating widget to your ColdFusion 9 app using a custom tag and some Ajax magic courtesy of the Adobe Spry JavaScript library.]]></description> <content:encoded><![CDATA[<p></p><p><strong>ColdFusion 9 &#8211; The latest version &#8211; has just recently been released as a <a
class="sublink" href="http://www.sitepoint.com/launch/7c7c62">beta preview on Adobe Labs</a>. ColdFusion is  Adobe&#8217;s server-side platform for web application development and we&#8217;re jumping on this opportunity to use it in combination with the brand-new ColdFusion Builder. We&#8217;ll develop a rating widget, so that you can provide your users with the option to rate content on your web site. The <a
class="sublink" href="http://www.sitepointstatic.com/examples/coldfusion-rating-widget-code.zip">source code for this article</a> is also available for download.</strong></p><p>Once you&#8217;ve read the article, why don&#8217;t you <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/rating-widget-coldfusion">test your knowledge with our quiz</a>? If you&#8217;re one of the first 200 to complete the quiz, Adobe will send you a printed copy of the <strong>Adobe ColdFusion Evangelism Kit</strong>.</p><p>Before we start let me say that this tutorial assumes that you&#8217;ve installed a stand-alone ColdFusion 9 server on your local development machine in a non-J2EE deployment and that this server is running on port 8500. If you have set up your server in a way to use a locally installed HTTP server like Apache or IIS, you might need to place the files I&#8217;m mentioning in a different location on your hard drive, as well as change all port references to port 80.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><h5>Setting Up The Database</h5><p> All right, let&#8217;s start! Our task is to add a rating widget to a ColdFusion application or page. Therefore, we need to have a ColdFusion application first, and the easiest way to achieve that is by creating a few database tables to store content and ratings. If you&#8217;ve followed <a
class="sublink" href="http://www.sitepoint.com/article/get-shorty-coldfusion/">Kay Smoljak&#8217;s tutorial on building a URL shortener application</a>, the easiest way is to just add a rating table to the existing Derby database. You can do so by executing the <code>sql/db.cfm</code> file of the download package for this tutorial.</p><div
id="adz" class="horizontal"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>For those users of SQL Server, we aim to keep this tutorial as straightforward as possible. So rather than dive into the depths of database schemas, here&#8217;s a screenshot of the schema diagram and how the two tables are related.</p><p><img
src="http://i2.sitepoint.com/graphics/1750-db.thumb.png"  height="164" width="400" alt="" /><em>Database schema for content and rating table (<a
rel='external' class="sublink" href="http://sitepointstatic.com/graphics/1750-db.png">View larger image in a new window.</a>)</em></p><p>SQL scripts that create the two tables on SQL Server 2005 or 2008 are part of the <a
class="sublink" href="http://www.sitepointstatic.com/examples/coldfusion-rating-widget-code.zip">download package</a> (you&#8217;d have to create the Content table first, as both scripts assume there&#8217;s a database named &quot;sitepoint&quot; already existing on your SQL Server). Keep in mind that this is just an example; the column definitions of the Content table are arbitrarily chosen and the only requirement is really to have a unique content identifier that can be tied into the rating table to associate both entities.</p><h5>Importing the Project into ColdFusion Builder</h5><p> In <a
class="sublink" href="http://www.sitepoint.com/article/whats-new-coldfusion-9/">Kay Smoljak&#8217;s and my article &#8220;<em>What&#8217;s new in ColdFusion 9</em>&#8220;</a>, we&#8217;ve discussed a variety of the new features in CF9. Among those is the aforementioned ColdFusion Builder. The <a
class="sublink" href="http://www.sitepointstatic.com/examples/coldfusion-rating-widget-code.zip">code samples for this tutorial</a> come as an exported CF Builder project and can be imported into your own project using the import wizard in the File menu of CF Builder. The image below shows the project&#8217;s file and folder structure.</p><p><img
src="http://i2.sitepoint.com/graphics/1750-files.png"  height="577" width="241" alt="" /><em>CF Builder project structure</em></p><h5>Displaying the Content</h5><p> The first file we&#8217;re going to look at is <code>index.cfm</code>. Let&#8217;s pretend this is the main application file that&#8217;s supposed to query and show the content:</p><pre><code>... <br />
&lt;cfscript&gt; <br />
 &nbsp;oContent = CreateObject(&quot;component&quot;,&quot;nz.co.ventego.sitepoint.Content&quot;); <br />
 &nbsp;data = oContent.getAllContent(); <br />
&lt;/cfscript&gt; <br />
 <br />
&lt;body&gt; &nbsp; <br />
 &nbsp;&lt;cfoutput query=&quot;data&quot;&gt; <br />
 &nbsp; &nbsp;&lt;h3&gt;http://#cgi.server_name#:#cgi.server_port#/URLS/?#data.shortlink# (id: #data.id#)&lt;/h3&gt; <br />
 &nbsp; &nbsp;&lt;p&gt;(#data.link#)&lt;/p&gt; <br />
 &nbsp; &nbsp;&lt;p&gt; <br />
 &nbsp; &nbsp; &nbsp;&lt;strong&gt;Do you like this content? Why not rate it...&lt;/strong&gt;&lt;br/&gt; <br />
 &nbsp; &nbsp;&lt;/p&gt; <br />
 &nbsp; &nbsp;&lt;br/&gt;&lt;br/&gt; <br />
 &nbsp; &nbsp;&lt;hr/&gt; <br />
 &nbsp;&lt;/cfoutput&gt; <br />
&lt;/body&gt; <br />
...</code></pre><p>The top <code>&lt;cfscript&gt;</code> block instantiates a CFC (ColdFusion Component) and calls the method <code>getAllContent</code>. The method executes an SQL query against our database and retrieves a list of all Content entries, together with the amount and the average value of ratings (we&#8217;re allowing users to pick a score between one and five stars):</p><pre><code>SELECT  &nbsp;C.id, C.label, C.text, C.link, C.shortlink, AVG(R.rating) as average_rating, COUNT(R.id) as number_of_ratings <br />
FROM &nbsp;Content C <br />
LEFT JOIN Rating R ON C.id = R.contentId <br />
GROUP BY C.id, C.label, C.text, C.link, C.shortlink</code></pre><p>The <code>resultset</code> of this query is stored in the variable data on the page and can now be used there. The <code>&lt;cfoutput&gt;</code> tag&#8217;s <code>query</code> attribute loops over the query <code>resultset</code> and for each row of the query, the HTML content from <code>&lt;h3&gt;</code> to <code>&lt;hr&gt;</code> is created, as shown below.</p><p><img
src="http://i2.sitepoint.com/graphics/1750-entries.thumb.png"  height="298" width="400" alt="" /><em>Database output (<a
rel='external' class="sublink" href="http://sitepointstatic.com/graphics/1750-entries.png">View larger image in a new window.</a>)</em></p><p><div
class="article-cms-pagebreak"></div></p><p>While looping over the <code>resultset</code> ColdFusion will evaluate the expressions that are embedded between the #-symbols and replace those with data from the <code>resultset</code>. As you can see in the code, we&#8217;re using the <code>shortlink</code> and <code>link</code> columns from Kay&#8217;s tutorial to rate the shortened URLs her application created. Let me just point out that the Content table has columns to store a label and text as well &#8211; so feel free to store whatever data you like in there, and change the display logic shown above in <code>index.cfm</code> to tweak the output for your needs.</p><h5>The Custom Tag</h5><p>The rating widget will be implemented as a ColdFusion custom tag. Custom tags were introduced into ColdFusion back in the days of ColdFusion 3 or 4 but are still the most efficient and preferable way to create modularized functionality for the direct purpose of creating page output. From a high-level point of view a custom tag is nothing more than including a <code>.cfm</code> file into another <code>.cfm</code> file, but we&#8217;re in fact following a few guidelines and requirements in writing and accessing this custom tag.</p><p>A CFML custom tag can be called via <code>&lt;cfmodule&gt;</code> and gets passed so-called custom tag attributes by specifying key-value pairs. Our rating widget will need to be passed three pieces of information: the content identifier it&#8217;s supposed to be tied against, the average current rating, and the amount of ratings that we&#8217;ve already received for this content. We&#8217;ll place the following line right after the <code>&lt;strong&gt;...&lt;/strong&gt;&lt;br/&gt;</code> block in <code>index.cfm</code> later to embed our widget:</p><pre><code>&lt;cfmodule template=&quot;customtags/widget.cfm&quot; contentId=&quot;#data.id#&quot; rating=&quot;#data.average_rating#&quot; ratingcount=&quot;#data.number_of_ratings#&quot;/&gt;</code></pre><p>The widget code itself is placed in the subfolder <code>customtags</code> and named <code>widget.cfm</code>. The latter indicates again that our custom tag is simply a normal <code>.cfm</code> template written in a specific way. The custom tag itself is surprisingly concise, partly due to the fact that we&#8217;re leveraging the Ajax framework, Spry to help us with managing the rating mechanism itself. Let&#8217;s have a look at the custom tag first:</p><pre><code>&lt;cfif thisTag.executionMode eq &quot;start&quot;&gt; &nbsp;<br />
 &nbsp; &nbsp;<br />
 &nbsp;&lt;cfif isDefined(&quot;attributes.contentId&quot;)&gt; &nbsp;<br />
 &nbsp; &nbsp;&lt;cfoutput&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp;&lt;p&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;cfif isDefined(&quot;attributes.rating&quot;) AND isDefined(&quot;attributes.ratingcount&quot;)&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;div&gt;The current score is #DecimalFormat(attributes.rating)# based on #attributes.ratingcount# votes.&lt;/div&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;/cfif&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;span id=&quot;rate_content_#attributes.contentId#&quot; class=&quot;ratingContainer&quot;&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;span class=&quot;ratingButton&quot;&gt;&lt;/span&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;span class=&quot;ratingButton&quot;&gt;&lt;/span&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;span class=&quot;ratingButton&quot;&gt;&lt;/span&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;span class=&quot;ratingButton&quot;&gt;&lt;/span&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;span class=&quot;ratingButton&quot;&gt;&lt;/span&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;span class=&quot;ratingRatedMsg thankyou&quot;&gt;Thanks for voting!&lt;/span&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;input type=&quot;text&quot; id=&quot;ratingValue_#attributes.contentId#&quot; name=&quot;ratingValue_#attributes.contentId#&quot; value=&quot;#attributes.rating#&quot; /&gt; &nbsp; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;/span&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;script type=&quot;text/javascript&quot;&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var rate_content_#attributes.contentId# = new Spry.Widget.Rating(&quot;rate_content_#attributes.contentId#&quot;, {allowMultipleRating:false, ratingValueElement:&quot;ratingValue_#attributes.contentId#&quot;, postData:&quot;contentId=#attributes.contentId#&amp;rating=@@ratingValue@@&quot;, saveUrl:&quot;rate.cfm&quot;}); &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;/script&gt; &nbsp;<br />
 &nbsp; &nbsp; &nbsp;&lt;/p&gt; &nbsp;<br />
 &nbsp; &nbsp;&lt;/cfoutput&gt; &nbsp;<br />
 &nbsp;&lt;cfelse&gt; &nbsp;<br />
 &nbsp; &nbsp;&lt;p&gt;Please supply a contentId value to use this widget for rating content&lt;/p&gt; &nbsp;<br />
 &nbsp;&lt;/cfif&gt; &nbsp;<br />
 &nbsp;<br />
&lt;/cfif&gt; &nbsp;<br />
</code></pre><p>A custom tag has different execution modes. The idea behind this concept is that one should be able to &#8220;wrap&#8221; a custom tag with opening and closing tags around other existing content on a page and apply whatever functionality the tag provides to the enclosed content. In our case, we just want to call the custom tag once to actually include the rating widget and attach it to an item on the page. At the beginning of the custom tag, we&#8217;re therefore just checking if the execution mode of this tag is &#8220;start&#8221;. If the tag is used in any other mode, no output is created and the custom tag has no effect.</p><p>Everything that&#8217;s been passed into the custom tag from the <code>index.cfm</code> via the <code>&lt;cfmodule&gt;</code> tag ends up in the so-called &quot;attributes scope&quot; within the custom tag. We&#8217;re checking if the <code>contentId</code> has been passed in and therefore if the variable <code>attributes.contentId</code> is defined. If that&#8217;s the case we can at least safely run the rating widget. If the developer using our <code>widget.cfm</code> passes in both a value for <code>attributes.rating</code> and <code>attributes.ratingcount</code>, we&#8217;ll display information of the current average score and the amount of votes for that content item.</p><h5>Adding Ajax with Spry</h5><p>After this conditional CFML code, the real rating widget is being set up. As mentioned earlier, we&#8217;re going to use some widgets from an Ajax library called <a
class="sublink" href="http://labs.adobe.com/technologies/spry/home.html">Spry</a>. Spry is a lightwight collection of widgets, effects, and other useful Ajax-related classes developed by Adobe that&#8217;s been released under a BSD license. The nested set of <code>&lt;span&gt;</code> tags creates the rating widget itself and five elements of class <code>ratingButton</code> inside. We also throw in a message to be displayed after the user has voted and an <code>&lt;input&gt;</code> element to store the current rating. The latter will allow our rating widget to reveal the average score (in stars) at that point when it&#8217;s loaded (see the figure below). It&#8217;s worth mentioning that Spry is obviously not the only way of creating a dynamic and Ajax-based widget; other JavaScript frameworks such as jQuery or extJS are also able to provide a solution.</p><p><img
src="http://i2.sitepoint.com/graphics/1750-test1.png"  height="187" width="320" alt="" /><em>Preloaded &quot;stars&quot; to reflect the average score</em></p><p>Below the section of nested <code>&lt;span&gt;</code> tags we&#8217;re actually instantiating an object of the <code>Spry.Widget.Rating</code> class in JavaScript. In our scenario we&#8217;re going to have multiple content items with a rating widget each on a single page, so we&#8217;ll have to make sure that we&#8217;re creating individual instances of the <code>Rating</code> class. This is done by naming the instances <code>rate_content_#attributes.contentId#</code> &#8211; the ColdFusion expression in #&#8217;s is evaluated on the server before the HTML is delivered to the client and the JavaScript is executed there. The constructor of the JavaScript object is passed a reference to the <code>id</code> of the <code>&lt;span&gt;</code> section we created just before, as well as an object of properties and settings.</p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>The latter is of particular interest as it allows us to customize the Spry widget in a variety of ways. In this case here, we allow a user to vote just once while being on the page (without additional checks on the server they can vote again when they reload the page) and we define a <code>saveUrl</code> in combination with a <code>postData</code> query string. As soon as a user of the widget clicks on a star, we&#8217;re sending the current <code>contentId</code> and the selected rating to the <code>rate.cfm</code> template via a <code>POST</code> request.</p><p>Data that has been sent to a CFML page via a <code>POST</code> request becomes variables in the form scope; then the core task of <code>rate.cfm</code> is to check if <code>contentId</code> and the rating are actually defined in the latter, before executing a SQL statement to insert the new rating into the Rating table. For this data access, we&#8217;re following a similar pattern to what we used in the data retrieval before:</p><ol><li>Create an instance of a data access CFC: <code>oRating = CreateObject(&quot;component&quot;,&quot;nz.co.ventego.sitepoint.Rating&quot;);</code></li><p></p><li>Call a method of the previously instantiated component: <code>oRating.insertRating(form.contentId,form.rating);</li></code></ol></p><p>The <code>Rating.cfc</code>&#8216;s <code>insertRating</code> method executes the following SQL query:</p><pre><code>&lt;cfquery datasource=&quot;sitepoint&quot; name=&quot;local.qRating&quot;&gt; &nbsp;<br />
 &nbsp;INSERT &nbsp; <br />
 &nbsp;INTO Rating(contentId,rating) &nbsp;<br />
 &nbsp;VALUES (&lt;cfqueryparam cfsqltype=&quot;cf_sql_integer&quot; value=&quot;#arguments.contentId#&quot;/&gt;,&lt;cfqueryparam cfsqltype=&quot;cf_sql_integer&quot; value=&quot;#arguments.rating#&quot;/&gt;) &nbsp;<br />
&lt;/cfquery&gt;</code></pre><h5>An Important Tip</h5><p> Although indirectly related to the rating widget tutorial, it&#8217;s worth mentioning this query is an example of two very important best practices that regularly are forgotten by CF developers:</p><ul><li>Always use the <code>&lt;cfqueryparam&gt;</code> tag when you&#8217;re creating dynamic SQL queries &#8211; otherwise you&#8217;re creating a barndoor-sized security gap and opening yourself up to SQL injection hacks. <code>&lt;cfqueryparam&gt;</code> ensures at least the correct type of data and additionally creates a parameter binding, which usually executes faster than just using ColdFusion variables, as in <code>...VALUES ('#arguments.contentId#')...</code>.</li><li>Remember to scope variables that are local to a function. Until ColdFusion 8 that had to be done by declaring function-local variables by using the <code>var</code> keyword, as in: <code>&lt;cfset var abc=345&gt;</code>. ColdFusion 9 has introduced a new, alternative (and in my opinion, better) syntax by offering the local scope as shown above by naming the query object <code>local.qRating</code>.</li></ul><h5>Finishing Up</h5><p>With that last step we have everything covered &#8211; nearly. When we were looking at the <code>index.cfm</code> file earlier in the tutorial, we just saw a snippet of CFML code, rather than all of it. Because our page and the <code>widget.cfm</code> use the Spry Rating class, we need to make sure we import those particular JavaScript and CSS files from the Spry library:</p><pre><code>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &nbsp; <br />
 &nbsp; &nbsp;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt; &nbsp;<br />
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt; &nbsp;<br />
&lt;head&gt; &nbsp;<br />
 &nbsp;... &nbsp;<br />
 &nbsp; &nbsp;<br />
 &nbsp;&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot; src=&quot;js/spry/SpryRating.js&quot;&gt;&lt;/script&gt; &nbsp;<br />
 &nbsp;&lt;link href=&quot;css/spry/SpryRating.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt; &nbsp;<br />
 &nbsp; &nbsp;<br />
 &nbsp;&lt;style type=&quot;text/css&quot;&gt; &nbsp;<br />
 &nbsp; &nbsp;.thankyou &nbsp;<br />
 &nbsp; &nbsp;{ &nbsp;<br />
 &nbsp; &nbsp; &nbsp;float:left; &nbsp;<br />
 &nbsp; &nbsp; &nbsp;margin-top:1px; &nbsp; &nbsp;<br />
 &nbsp; &nbsp;} &nbsp;<br />
 &nbsp;&lt;/style&gt; &nbsp;<br />
&lt;/head&gt;</code></pre><p>There&#8217;s also an additional style rule for the <code>thankyou</code> HTML <code>class</code> to position the &quot;Thanks for voting&quot; output. The final output is shown below.</p><p><img
src="http://i2.sitepoint.com/graphics/1750-test-thanks.png"  height="183" width="309" alt="" /><em>Thank-you message</em></p><p>The user has given the content 4 stars; a revote, as such, is impossible. Reloading the page provides updates to the score and amount of votes, and does enable this user to vote again. There are a variety of possible extensions of this widget to work around this issue and the feasibility of each depends on the use case of the widget. One could think of implementing a very simple, cookie-based solution, but also tie the widget into a proper authentication model that keeps track of user sessions and identifiers; that way, you could prohibit multiple voting on the same content by a given user.</p><p>So how would you rate your knowledge? <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/rating-widget-coldfusion">Test yourself with our quiz</a> and, If you&#8217;re one of the first 200, receive a printed copy of the <strong>Adobe ColdFusion Evangelism Kit</strong>. Don&#8217;t forget to <a
class="sublink" href="http://www.sitepoint.com/launch/7c7c62">download the ColdFusion 9 preview</a>, the <a
class="sublink" href="http://www.sitepointstatic.com/examples/coldfusion-rating-widget-code.zip">source code from this article</a>, and have a go at building your first ColdFusion app.</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/rating-widget-coldfusion/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Build Your Own URL Shortener</title><link>http://www.sitepoint.com/build-your-own-url-shortener/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-your-own-url-shortener</link> <comments>http://www.sitepoint.com/build-your-own-url-shortener/#comments</comments> <pubDate>Wed, 05 Aug 2009 13:54:40 +0000</pubDate> <dc:creator>Matthew Magain</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/blogs/?p=13079</guid> <description><![CDATA[Kay's latest tutorial walks you through the creation of a web app to shorten URLs using the slick new beta of ColdFusion Builder. If you're interested, you can play along at home, and quiz yourself on how well you did!]]></description> <content:encoded><![CDATA[<p></p><p><img
class="imgright" src="http://i2.sitepoint.com/graphics/1743_feature.png" alt="Clamp" />URL shorteners are all the rage—tinyurl.com, tr.im, ow.ly, bit.ly … even <a
href="http://www.sitepoint.com/blogs/2009/04/19/podcast-diggbar/">Digg are getting in on the action</a>. But wouldn’t it be cool to write your own?</p><p>It turns out that doing so is not so hard. We’ve just published Kay Smoljak’s latest article <a
href="http://www.sitepoint.com/article/get-shorty-coldfusion/"><em>Get Shorty: Trim the Fat with ColdFusion</em></a>, which takes you step-by-step through the creation of a simple URL-shortening web app in ColdFusion 9. It also comes with a <a
href="http://www.sitepoint.com/quiz/adobe/get-shorty-coldfusion/">handy little quiz</a>, sponsored by Adobe, to test your understanding of the tutorial.</p><p>Now hold your horses folks—we know ColdFusion isn’t for everyone. If ColdFusion isn’t your bag, or you reckon you can write this app in half the time in your favourite development platform, then that’s fantastic. But if you’re interested in reading about how to do it in a super elegant way using the ColdFusion Builder tool, then this is definitely the article for you. You might be surprised.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p><a
href="http://www.sitepoint.com/article/get-shorty-coldfusion/">Check it out.</a></p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/build-your-own-url-shortener/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item><div><div
class="post_box two_ads" style="float:left;padding-left:2px;"> <script>GA_googleFillSlot("Edit_728x90_2");</script> </div></div><div
class="clear">&nbsp;</div> <item><title>Get Shorty: Trim the Fat with ColdFusion</title><link>http://www.sitepoint.com/get-shorty-coldfusion/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-shorty-coldfusion</link> <comments>http://www.sitepoint.com/get-shorty-coldfusion/#comments</comments> <pubDate>Tue, 04 Aug 2009 14:00:00 +0000</pubDate> <dc:creator>Kay Smoljak</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://blogs.sitepoint.com/?p=34849</guid> <description><![CDATA[Tired of the same old URL shorteners like TinyURL, tr.im or bit.ly? Ever wished you could run your very own URL shortener? In ColdFusion, it's probably easier than you think.]]></description> <content:encoded><![CDATA[<p></p><p><strong>Tired of the same old URL shorteners like TinyURL, tr.im or bit.ly? Ever wished you could run your very own URL shortener? In ColdFusion, it&#8217;s probably easier than you think. To demonstrate just how powerful and easy to use ColdFusion is, we&#8217;re going to build our own simple URL shortener from scratch. In this article, we&#8217;ll start out with a basic set of functions &#8211; creating shortened links, and expanding them. Don&#8217;t forget to <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/get-shorty-coldfusion/">try the quiz</a> when you&#8217;ve finished reading!</strong></p><p>To follow along, you&#8217;ll need to <a
class="sublink" href="http://labs.adobe.com/">download and install the ColdFusion 9 and ColdFusion Builder betas</a> and install them on your development machine. ColdFusion 9 is also available for Linux, and it is possible (with some tweaking) to install ColdFusion Builder &#8211; <a
class="sublink" href="http://www.compoundtheory.com/?action=displayPost&#038;ID=414">see this tutorial at Compound Theory for details.</a> You&#8217;ll also need to <a
class="sublink" href="http://sitepointstatic.com/examples/getshorty/SitePointURLShortener.zip">grab the code archive for this tutorial</a>.</p><h5>Before we start</h5><p>This tutorial assumes that you have ColdFusion 9 beta running on localhost, on port 8500, using the stand-alone, built-in development server. If you&#8217;ve installed ColdFusion on a machine other than localhost, or are using IIS or Apache instead of the stand-alone development server, or are using a J2EE server configuration, you&#8217;re going to need to change the server paths mentioned in the code listings.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>We&#8217;re also going to assume that you have ColdFusion Builder installed on the same localhost machine. If you already have the Eclipse IDE on your machine (including Flash Builder or Flex Builder) and have installed ColdFusion Builder as a plugin, you&#8217;ll need to make sure you&#8217;re in the ColdFusion perspective: from the Window menu, select <strong>Open Perspective &gt; Other &gt; ColdFusion</strong>.</p><p>Before we start coding, we&#8217;re going to tell ColdFusion Builder which ColdFusion server we will be working with. We&#8217;ll configure this using the <strong>Servers</strong> tab at the bottom of the ColdFusion Builder window. There are quite a few steps to follow here, which I&#8217;ve broken down for you below:</p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><ol><li>Click on the <strong>Add Server</strong> icon &#8211; there&#8217;s a little yellow plus sign on it.</li><p></p><li>Select <strong>ColdFusion</strong> as the server type, and click <strong>Next</strong>.</li><p></p><li>Enter a name for the server &#8211; this is so it&#8217;s recognizable to you. I&#8217;ve entered localhost.</li><p></p><li>Enter the hostname &#8211; if you&#8217;re running the default setup, it&#8217;s localhost too.</li><p></p><li>Enter the port &#8211; the default for the built in development setup is port 8500.</li><p></p><li>Enter the RDS User Name, which is always admin, unless you specified a different username when you installed the server (this is usually only the case if you&#8217;re running on a J2EE server configuration).</li><p></p><li>Enter the RDS password you specified when installing ColdFusion. Click <strong>Next</strong>.</li><p></p><li>Browse for your Server Home. This is the directory where ColdFusion was installed &#8211; on Windows, it will probably be C:\ColdFusion9; on the Mac, /Applications/ColdFusion 9.</li><p></p><li>You might also need to browse for your Document Root. This is your web root &#8211; on a default Windows installation, it will probably be C:\ColdFusion9\wwwroot; on the Mac, it&#8217;s at /Applications/ColdFusion9/wwwroot.</li><p></p><li>Select the version of ColdFusion installed from the drop down box &#8211; 9.0.x.</li><p></p><li>Click <strong>Finish</strong>.</li></ol><p>ColdFusion Builder will verify these details and connect to the server. If all went well, you should see the server in the <strong>Servers</strong> tab. You can start and stop the server and access its ColdFusion Administrator panel from this tab.</p><p><img
src="http://i2.sitepoint.com/graphics/1743_localhostrunning.thumb.png"  height="82" width="400" alt="The Servers tab, showing our local server" /></p><p>ColdFusion Builder works with projects. We could create a new project now, and associate it with our development server, but to make things easier for you we&#8217;ve included all the code in a downloadable project which we&#8217;re now going to import.</p><ol><li>Download the sample zip file and extract the folder into your ColdFusion web root. Change the name of the folder to URLS now, if needed.</li><p></p><li>The navigator panel on the left hand side of the screen shows the files in your current project. Right-click in the <strong>Navigator</strong> and select <strong>Import</strong>.</li><p></p><li>From the Import wizard, drill down to <strong>ColdFusion -&gt; Import Existing Projects</strong>, and click <strong>Next</strong>.</li><p></p><li>Browse for the folder you just extracted.</li></ol><p>ColdFusion Builder will scan the folder and look for any project files, which will then be listed in the <strong>Project List</strong> below. Check the box next to our URLs project, and then click <strong>Finish</strong>.</p><p><img
src="http://i2.sitepoint.com/graphics/1743_selectfolder.thumb.png"  height="400" width="347" alt="Selecting the project in the Import ColdFUsion Project dialog" /></p><p>The project will now be listed in your <strong>Navigator</strong> panel. The last step is to associate the project with our server.</p><ol><li>Right click on the project name and select <strong>Properties</strong>.</li><p></p><li>Select <strong>ColdFusion Server Settings</strong> from the left hand side of the dialog.</li><p></p><li>Select your local development server from the drop-down box of servers, and click <strong>OK</strong>.</li></ol><p><img
src="http://i2.sitepoint.com/graphics/1743_choosingaserver.thumb.png"  height="296" width="400" alt="Selecting a server" /></p><p><div
class="article-cms-pagebreak"></div></p><h5>Setting up the database</h5><p>Our URL shortener application will need a database. Apache Derby is an open source database with some fairly heavy-duty features, and it&#8217;s built right in to ColdFusion 8 and later. For our purposes, it&#8217;s perfect, because although Derby has no client and no user interface, setting up databases is very simple and there&#8217;s no need to install MSSQL, MySQL, or other database server.</p><p>ColdFusion uses data source names to store database connections. Data source names are set up in the ColdFusion Administrator, which is the command central for your ColdFusion Server. To access the ColdFusion Administrator for your local development server, right-click on the server name in the <strong>Servers</strong> tab (remember, it&#8217;s down the bottom of the screen) and select <strong>Launch Admin Page.</strong></p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>The ColdFusion Administrator launches in a new Eclipse tab and prompts you for your administrator password (which is the one you chose during installation).</p><p>Once you&#8217;ve logged in, select Data Sources from the left hand menu. At the top of the screen there&#8217;s a form for creating a new data source. Enter &#8220;URLShortener&#8221; as the data source name, select Apache Derby Embedded from the driver dropdown and click <strong>Add</strong>.</p><p>You&#8217;re nearly there! In the form that you are now shown, type &#8220;URLShortener&#8221; in the Database Folder (same as the data source name), and tick the <strong>Create Database</strong> checkbox. Hit <strong>Submit</strong>, and your Derby embedded database is created at the same time as your ColdFusion data source name.</p><p><img
src="http://i2.sitepoint.com/graphics/1743_derby.thumb.png"  height="194" width="400" alt="Setting up our Derby database" /></p><h5>Overview of the problem</h5><p>Are you still with me? Now that we have a development environment and a database, we&#8217;re ready to think about how we&#8217;ll develop our URL shortener.</p><p>URL shortening applications are all over the Internet these days. URL shorteners aim to solve the problem encountered when trying to use long URLs in an instant message, a Twitter message, or any other form of communication with limited characters. The basic premise of a URL shortener is to give you a unique short URL to their site, which, when clicked will redirect the user to the longer URL.</p><p>For example, to link to this SitePoint article &#8220;What&#8217;s New in ColdFusion 9&#8243;, with the following URL:</p><p><a
class="sublink" href="http://www.sitepoint.com/article/whats-new-coldfusion-9/4/">http://www.sitepoint.com/article/whats-new-coldfusion-9/4/</a></p><p>The service TweetBurner will give you this shorter URL:</p><p><a
class="sublink" href="http://twurl.nl/qiakd3">http://twurl.nl/qiakd3</a></p><p>At just 22 characters, the shortened URL is less than half the length of the original 58 character link. And with longer URLs, the benefits are even more obvious.</p><h5>Adding tables to the database</h5><p>To create our URL shortening application, we&#8217;re going to need to create a table in our Derby database. We&#8217;ll call our table <code>content</code> and give it the following columns:</p><table
border="0" cellspacing="5" cellpadding="5"><tr><th>Column</th><th>Data type</th><th>Description</th></tr><tr><td>id</td><td>integer</td><td>Data</td></tr><tr><td>label</td><td>character(100)</td><td>-</td></tr><tr><td>text</td><td>text</td><td>-</td></tr><tr><td>link</td><td>text</td><td>The URL we are linking to</td></tr><tr><td>shortlink</td><td>character(20)</td><td>The short code that will identify our URL</td></tr></table><p> There are some fields in this database that are not strictly necessary for a simple URL shortener, but we&#8217;re going to use them in a follow-up article to this tutorial, so we might as well add them now.</p><p>As we mentioned before, there&#8217;s no client or user interface for the embedded version of the Apache Derby database, so to create our tables we&#8217;re going to run a SQL script in ColdFusion. Open the file db.cfm in the web root of our ColdFusion Builder Project. It contains the following code:</p><p> <code> &nbsp;<br
/> Creating database... &nbsp;<br
/> &nbsp;<br
/> &lt;cfquery datasource=&quot;URLShortener&quot; result=&quot;return&quot;&gt; &nbsp;<br
/> &nbsp;CREATE TABLE content &nbsp;<br
/> &nbsp;( &nbsp;<br
/> &nbsp; &nbsp;id INTEGER NOT NULL GENERATED ALWAYS &nbsp;<br
/> &nbsp; &nbsp; &nbsp; AS IDENTITY (START WITH 1, INCREMENT BY 1), &nbsp;<br
/> &nbsp; &nbsp;label VARCHAR(100), &nbsp;<br
/> &nbsp; &nbsp;text VARCHAR(500), &nbsp;<br
/> &nbsp; &nbsp;link VARCHAR(500) NOT NULL, &nbsp;<br
/> &nbsp; &nbsp;shortlink VARCHAR(20) NOT NULL, &nbsp;<br
/> &nbsp; &nbsp;CONSTRAINT shortlink_uc UNIQUE(shortlink) &nbsp;<br
/> &nbsp;) &nbsp;<br
/> &lt;/cfquery&gt; &nbsp;<br
/> &nbsp;<br
/> &lt;cfdump var=&quot;#return#&quot;&gt; &nbsp;<br
/> </code></pre><p>You can execute this code by clicking the <strong>Run</strong> icon in the toolbar - it's a white arrow in a green circle. This will launch the script in your default browser. It is also possible to launch the browser inside of ColdFusion Builder by switching to a tab at the bottom of the editing window. There will be a tab for every browser that has been detected on your computer.</p><p>After executing, you'll see the result of the query operation that we ran:</p><p><img
src="http://i2.sitepoint.com/graphics/1743_dbresults.thumb.png"  height="330" width="400" alt="The result of our database creation script" /></p><p> While there's nothing to specifically state that the operation was successful, it indicates that there were no errors, and shows the execution time and generated SQL code that was run, so we can safely assume that all is okay.</p><h5>The application code</h5><p>Take a look inside the ColdFusion Builder project and you'll see a couple of other .cfm files, and several .cfc files - one on the root directory, and one inside the /com subdirectory. Files ending in .cfm are regular ColdFusion template files. The .cfm extension tells the web server to pass them through the ColdFusion application server before serving them to the end user's browser. A file with the .cfc extension is a ColdFusion component. This is ColdFusion's equivalent to what is often called a class in other languages.</p></p><h5>Application.cfc</h5><p>The Application.cfc file in the root directory is a special kind of component which is run before each page request. It holds application-wide settings and has a set of special functions that are run when the application first fires up, before and after each request, when a user session is started or ended, and when an error occurs.</p><p>There is an Application.cfc file in the root folder of our ColdFusion Builder project. Open it up and you'll see it sets a couple of variables - the application name, and a timeout value - and has one function, <code>onApplicationStart</code>:</p><pre><code>&lt;cfcomponent output=&quot;false&quot;&gt; &nbsp;<br />
 &nbsp; &nbsp;<br />
 &nbsp;&lt;cfset this.Name=&quot;URLShortener&quot;&gt; &nbsp;<br />
 &nbsp;&lt;cfset this.ApplicationTimeout=CreateTimeSpan(0,0,5,0)&gt; &nbsp;<br />
 &nbsp; &nbsp;<br />
 &nbsp;&lt;cffunction name=&quot;OnApplicationStart&quot; access=&quot;public&quot; &nbsp;<br />
 &nbsp; &nbsp; &nbsp;returntype=&quot;boolean&quot; output=&quot;false&quot; &nbsp;<br />
 &nbsp; &nbsp; &nbsp;hint=&quot;Fires when the application is first created&quot;&gt; &nbsp;<br />
 &nbsp; &nbsp;&lt;!--- delete and recreate the content cfc &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;stored in the application scope ---&gt; &nbsp;<br />
 &nbsp; &nbsp;&lt;cfset StructDelete(application,&quot;oContent&quot;)&gt; &nbsp;<br />
 &nbsp; &nbsp;&lt;cfset application.oContent=CreateObject(&quot;component&quot;,&quot;com.content&quot;)&gt; &nbsp;<br />
 &nbsp; &nbsp; &lt;cfreturn true&gt; &nbsp;<br />
 &nbsp;&lt;/cffunction&gt; &nbsp;<br />
 &nbsp; <br />
&lt;/cfcomponent&gt;</code></pre><p>As we will have multiple files in our URL Shortener application, and they are all going to need to use functions in content.cfc, we're going to load that component into the application scope when the application starts. This means that on any page request, we'll be able to reference any of the functions inside content.cfc by prefixing them with <code>application.oContent</code>.</p><h5>First, the form</h5><p>Enough housekeeping - let's jump into some code. To allow our users to enter their URLs to shorten, we'll need a form. Open up add.cfm in the ColdFusion Builder project root, and you'll see a basic form.</p><p>At the top of the form is some code that is run when a variable called <code>form.action</code> is defined. Essentially, a function from our content CFC is run inside a loop until the loop's exit condition - the <code>shortlink</code> variable is not zero length - happens. We'll examine what's actually going on here in a moment. Skip down in the file and you'll see a standard HTML template with a little bit of ColdFusion conditional display code - checking for a variable's existence and if it is found, displaying it - and a HTML form to enter our URL to shorten. Fairly simple stuff.</p><pre><code>&lt;!--- display the add form ---&gt; &nbsp;<br />
&lt;form action=&quot;add.cfm&quot; method=&quot;post&quot;&gt; &nbsp;<br />
 &nbsp;&lt;label for=&quot;link&quot;&gt;URL to shorten&lt;/label&gt; &nbsp;<br />
 &nbsp;&lt;input type=&quot;text&quot; name=&quot;link&quot; id=&quot;link&quot; size=&quot;100&quot;&gt;&lt;br&gt; &nbsp;<br />
 &nbsp;&lt;input type=&quot;submit&quot; name=&quot;action&quot; value=&quot;Submit&quot;&gt; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&lt;/form&gt; &nbsp;<br />
</code></pre><p><div
class="article-cms-pagebreak"></div></p><h5>The heavy lifting: generating the short link code</h5><p>To generate our short URL, we're going to create a function which returns a random string of a predefined length from a pool of acceptable characters. I've added 63 possible characters - uppercase characters A-Z, lowercase characters a-z, digits 0-9 and the dash character (-). A six-character string made up of these characters yields 636 possible combinations: that's 62,523,502,209 URLs, which should be enough to keep us going for quite a while!</p><p>Open up Content.cfc in the /com directory under our project root to see this function (it's the very first one listed). You'll see that the function <code>generateShowLink</code> takes one argument, <code>length</code>, which is required but has a default value of 6, should it not be supplied:</p><pre><code>&lt;cffunction name=&quot;generateShortLink&quot; returntype=&quot;string&quot;&gt; &nbsp; <br />
 &nbsp; <br />
&lt;cfargument name=&quot;length&quot; type=&quot;Numeric&quot; required=&quot;true&quot; default=&quot;6&quot;&gt; &nbsp; <br />
 &nbsp;&lt;cfset var local=StructNew()&gt;</code></pre><p>This is the number of characters that will be generated for the shortcode. Should you wish to use more or fewer characters, you could simply pass a value for <code>length</code> into the function when it's called. In this code snippet we're also setting up a variable structure called <code>local</code> to store local variables.</p><p>First we set up a list of all allowable characters, then define our <em>radix</em> - that is, the total number of possible characters:</p><pre><code>&lt;!--- create a list of all allowable characters for our short URL link ---&gt; &nbsp; <br />
 &nbsp;&lt;cfset local.chars=&quot;A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S, &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp;T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n, &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp;o,p,q,r,s,t,u,v,w,x,y,z,0,1,2,3,4,5,6,7,8,9,-&quot;&gt; &nbsp; <br />
 &nbsp;&lt;!--- our radix is the total number of possible characters ---&gt; &nbsp; <br />
 &nbsp;&lt;cfset local.radix=listlen(local.chars)&gt;</code>
Then, after setting our return variable to an empty string, we're going to add random characters from that list in a loop:
<pre><code>&lt;!--- initialise our return variable ---&gt; &nbsp; <br />
&lt;cfset local.shortlink=&quot;&quot;&gt; &nbsp; <br />
&lt;!--- loop from 1 until the number of characters our URL should be, &nbsp; <br />
 &nbsp; &nbsp; &nbsp;adding a random character from our master list on each iteration &nbsp;---&gt; &nbsp; <br />
&lt;cfloop from=&quot;1&quot; to=&quot;#arguments.length#&quot; index=&quot;i&quot;&gt; &nbsp; <br />
 &nbsp; <br />
 &nbsp;&lt;!--- generate a random number in the range of 1 &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp;to the total number of possible characters we have defined ---&gt; &nbsp; <br />
 &nbsp;&lt;cfset local.randnum=RandRange(1,local.radix)&gt; &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp; <br />
 &nbsp;&lt;!--- add the character from a random position in our list to our short link ---&gt; &nbsp; <br />
 &nbsp;&lt;cfset local.shortlink=local.shortlink &nbsp; <br />
 &nbsp; &amp; listGetAt(local.chars,local.randnum)&gt; &nbsp; <br />
 &nbsp; <br />
&lt;/cfloop&gt;</code></pre><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>Finally, return the newly generated short link to the calling code:</p><pre><code>&lt;!--- return the generated random short link ---&gt; &nbsp; <br />
 &nbsp;&lt;cfreturn local.shortlink&gt; &nbsp; <br />
 &nbsp; &nbsp; &nbsp; <br />
&lt;/cffunction&gt; </code></pre><p>When we insert our link and short URL code into the database, we need to make sure that the short link value is unique in the database. To help with this, we made the <code>shortlink</code> column in the database unique, so if we attempted to insert a duplicate value, the database would throw an error. We're going to use this to our advantage.</p><p>The function in content.cfc that actually handles the insertion of data into the database is called <code>insertContent</code>. It takes one argument, <code>link</code> - the URL that we wish to shorten - defined at the top, and then initialises a local structure that will hold variables that we need to use locally in this function:</p><pre><code>&lt;cffunction name=&quot;insertContent&quot; returntype=&quot;string&quot;&gt; &nbsp; <br />
&lt;cfargument name=&quot;link&quot; type=&quot;String&quot; required=&quot;true&quot;&gt; &nbsp; <br />
&lt;cfset var result=StructNew()&gt;</code></pre><p>Next, inside an error-catching <code>cftry</code> block, we're going to attempt to insert the link and a short link code generated by our <code>generateShortlink</code> function. If the <code>shortlink</code> value is unique, the insert will be successful, and our <code>insertContent</code> function will return the new value to display to the end user.</p><pre><code>&lt;!--- begin our error-catching block ---&gt; &nbsp; <br />
&lt;cftry&gt; &nbsp; <br />
 &nbsp; <br />
 &nbsp;&lt;!--- try to insert the new link into the database ---&gt; &nbsp; <br />
 &nbsp;&lt;cfquery datasource=&quot;#variables.dsn#&quot; name=&quot;result.qry&quot; result=&quot;result.stats&quot;&gt; &nbsp; <br />
 &nbsp; &nbsp;INSERT INTO &nbsp; <br />
 &nbsp; &nbsp; &nbsp;content( &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp;link, &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp;shortlink &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp;) &nbsp; <br />
 &nbsp; &nbsp;VALUES( &nbsp; <br />
 &nbsp; &nbsp; &nbsp;&lt;cfqueryparam cfsqltype=&quot;cf_sql_varchar&quot; value=&quot;#arguments.link#&quot;&gt;, &nbsp; <br />
 &nbsp; &nbsp; &nbsp;&lt;cfqueryparam cfsqltype=&quot;cf_sql_varchar&quot; value=&quot;#generateShortLink()#&quot;&gt; &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp;) &nbsp; <br />
 &nbsp;&lt;/cfquery&gt; &nbsp; <br />
 &nbsp;&lt;!--- try to return the new shortlink value, &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp;referencing the last returned identifier ---&gt; &nbsp; <br />
 &nbsp;&lt;cfquery datasource=&quot;#variables.dsn#&quot; name=&quot;result.inserted&quot;&gt; &nbsp; <br />
 &nbsp; &nbsp;SELECT &nbsp; <br />
 &nbsp; &nbsp; &nbsp;shortlink &nbsp; <br />
 &nbsp; &nbsp;FROM &nbsp; <br />
 &nbsp; &nbsp; &nbsp;content &nbsp; <br />
 &nbsp; &nbsp;WHERE &nbsp; <br />
 &nbsp; &nbsp; &nbsp;id = &lt;cfqueryparam cfsqltype=&quot;cf_sql_integer&quot; value=&quot;#result.stats.IDENTITYCOL#&quot;&gt; &nbsp; <br />
 &nbsp;&lt;/cfquery&gt;</code></pre><p>What if the generated shortcode just happens to be one that's already been used? The function will hit the error-catching cfcatch block, where the result is instead set to an empty string:</p><pre><code> &nbsp;&lt;cfcatch&gt; &nbsp; <br />
 &nbsp; &nbsp; &nbsp;&lt;!--- insert was not successful - the shortlink generated &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;was not unique, so set the return variable to an &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;empty string ---&gt; &nbsp; <br />
 &nbsp; &nbsp; &nbsp;&lt;cfset result.inserted.shortlink=&quot;&quot;&gt; &nbsp; <br />
 &nbsp;&lt;/cfcatch&gt; &nbsp; &nbsp;<br />
 &nbsp; <br />
&lt;/cftry&gt; &nbsp;</code>
The last thing the function does is return either the newly inserted short link, or an empty string:
<pre><code>&lt;!--- return either the newly created shortlink, &nbsp; <br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;or an empty string if an error occurred ---&gt; &nbsp; <br />
&lt;cfreturn result.inserted.shortlink&gt; &nbsp; &nbsp;<br />
&lt;/cffunction&gt;</code></pre><p>In our add.cfm component, we are calling the <code>insertContent</code> function inside a condition loop:</p><pre><code>&lt;cfloop condition=&quot;len(shortlink) EQ 0&quot;&gt; &nbsp; <br />
&lt;cfset shortlink=application.oContent.insertContent(link)&gt; &nbsp; <br />
&lt;/cfloop&gt;</code></pre><p>This loop will continue to run, generating new values and trying to insert them into the database, until it is successful and the value returned is not an empty string.</p><p>The add.cfm template then sets the <code>message</code> variable to hold the newly generated short URL:</p><pre><code>&lt;cfset message=&quot;Your new short URL is http://#cgi.server_name#:#cgi.server_port#/URLS/?#shortlink#&quot;&gt;</code></pre><p>The <code>message</code> variable is displayed to the end user just above the form:</p><pre><code>&lt;!--- if there is a variable defined called &quot;message&quot;, display it ---&gt; &nbsp; <br />
&lt;cfif isDefined(&quot;message&quot;)&gt; &nbsp; <br />
 &nbsp;&lt;cfoutput&gt;&lt;p&gt;#message#&lt;/p&gt;&lt;/cfoutput&gt; &nbsp; <br />
&lt;/cfif&gt;</code></pre><h5>The last step - handling shortened URLs</h5><p>The final piece of the puzzle is the code that actually accepts our shortened URL and redirects the end user to the real link. This code is inside index.cfm.</p><p>First, we use the built-in <code>cgi</code> variable to read the contents of the current request's query string, and the <code>Replace</code> function to remove the question mark at the beginning of the query string.</p><pre><code>&lt;!--- remove the question mark from the beginning of the URL ---&gt; &nbsp; <br />
&lt;cfset shortlink=Replace(cgi.query_string,'?','')&gt;</code></pre><p>Because we're using the built-in development server, which is very basic, it's hard for us to generate cleaner short URLs - that is, URLs without a question mark in them. If you were building a URL shortening application that was going to be deployed on ColdFusion running on an Apache or IIS server, you would be able to remove the question mark from the equation.</p><p>Next, we retrieve the full link record from the database using the <code>getLink</code> function from inside the content.cfc:</p><pre><code>&lt;!--- retrieve the full URL ---&gt; &nbsp; <br />
&lt;cfset link=application.oContent.getLink(shortlink)&gt;</code></pre><p>Jumping back over to content.cfc, this <code>getLink</code> function performs a simple database lookup on the one required argument, <code>shortlink</code>, and returns the original link value:</p><pre><code>&lt;cffunction name=&quot;getLink&quot; returntype=&quot;string&quot;&gt; &nbsp; <br />
 &nbsp;&lt;cfargument name=&quot;shortlink&quot; type=&quot;string&quot; required=&quot;true&quot;&gt; &nbsp; <br />
 &nbsp;&lt;cfset var result=&quot;&quot;&gt; &nbsp; <br />
 &nbsp;&lt;cfquery datasource=&quot;#variables.dsn#&quot; name=&quot;result&quot;&gt; &nbsp; <br />
 &nbsp; &nbsp;SELECT &nbsp; <br />
 &nbsp; &nbsp; &nbsp;Link &nbsp; <br />
 &nbsp; &nbsp;FROM &nbsp; <br />
 &nbsp; &nbsp; &nbsp;content &nbsp; <br />
 &nbsp; &nbsp;WHERE &nbsp; <br />
 &nbsp; &nbsp; &nbsp;shortlink = &lt;cfqueryparam cfsqltype=&quot;cf_sql_varchar&quot; value=&quot;#arguments.shortlink#&quot;&gt; &nbsp; <br />
 &nbsp;&lt;/cfquery&gt; &nbsp; <br />
 &nbsp;&lt;cfreturn result.link&gt; &nbsp; <br />
&lt;/cffunction&gt;</code></pre><p>Finally, we take the link value returned from the database. If there's a valid URL there, we use a <code>cflocation</code> tag to redirect the user to this link. However, if nothing is returned - the value of link has zero length - then we're going to display an error message.</p><pre><code>&lt;!--- if a URL is returned, relocate to it; otherwise show an error message ---&gt; &nbsp; <br />
&lt;cfif len(link) GT 0&gt; &nbsp; <br />
 &nbsp;&lt;cflocation url=&quot;#link#&quot;&gt; &nbsp; <br />
&lt;cfelse&gt; &nbsp; <br />
 &nbsp;&lt;p&gt;Link not found.&lt;/p&gt; &nbsp; <br />
&lt;/cfif&gt;</code></pre><h5>Improvements</h5><p>This example is very simple and there are a lot of ways you could improve it, should you wish. As a starting point, there is no validation of the input variable - it would be nice if the URL add form displayed a message if the entered URL was not valid. I'm sure there's much more you could think of too!</p><p><strong>Stay tuned for a follow-up to this tutorial, where we'll expand on our URL shortener to include a rating widget.  For now, <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/get-shorty-coldfusion/">try your skills at our ColdFusion quiz</a>, proudly sponsored by Adobe, to check how much of this tutorial you've absorbed.</strong></p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/get-shorty-coldfusion/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>What&#8217;s New in ColdFusion 9?</title><link>http://www.sitepoint.com/whats-new-coldfusion-9/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=whats-new-coldfusion-9</link> <comments>http://www.sitepoint.com/whats-new-coldfusion-9/#comments</comments> <pubDate>Tue, 14 Jul 2009 14:00:00 +0000</pubDate> <dc:creator>Kai Koenig</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://blogs.sitepoint.com/?p=34842</guid> <description><![CDATA[The ColdFusion 9 beta is finally here, and there's plenty to get excited about. In this article Kai reveals what you can expect from the next generation of Adobe ColdFusion. If you're up to a challenge, test your knowledge of what's new in ColdFusion with our quiz!]]></description> <content:encoded><![CDATA[<p></p><p><strong>The ColdFusion 9 beta is finally here, and there&#8217;s plenty to get excited about. If you&#8217;re up to a challenge, <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/whats-new-coldfusion-9/">test your knowledge of what&#8217;s new in ColdFusion with our quiz!</a> What&#8217;s more, there&#8217;s a freebie up for grabs for the first 200 quiz contestants who enter their details &#8211; a ColdFusion evangelist&#8217;s kit, full of everything you need to know about what&#8217;s happening in the world of ColdFusion.</strong></p><p>ColdFusion and the ColdFusion Markup Language (CFML) in general have recently gained significant traction, with not one but two alternative engines garnering interest from the open source community; now, interest is growing more, with the next generation of Adobe ColdFusion &#8211; formerly known as <strong>Centaur</strong> &#8211;  made available as a public preview release. This pre-release version of ColdFusion 9 has unveiled a very interesting set of new features.</p><p>Among these are improvements to various tags, the CFScript language and the overall syntax and coding style, the PDF subsystem, and Ajax components. Probably the two most publically discussed and awaited features are the ColdFusion IDE ColdFusion Builder (also known by its codename, Bolt) and ColdFusion 9&#8242;s new ORM (object-relational mapping) system. We&#8217;ll be taking a look at some code examples &#8211; if you&#8217;re keen to follow along, you can <a
class="sublink" href="http://sitepoint.com/examples/coldfusion9/code.zip">grab all these here,</a> and <a
class="sublink" href="http://sitepointdemos.fasthit.net/cf9new/">view demos in action</a>. Let&#8217;s dive in!<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p><em>Caution! The features described in this article and all code samples are based on the ColdFusion 9 pre-release version available on <a
class="sublink" href="http://labs.adobe.com">Adobe Labs</a> at the time of publishing. Please understand that Adobe might change or even remove features of pre-release software at any time &#8211; so some features in this article may be dropped from the final release.</p><p>A big kudos goes to Kay Smoljak for contributing the sections and examples on ORM and Ajax features to this article.</em></p><h5>ColdFusion Builder</h5><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>Let&#8217;s start this article off with a look at one of the most visible features of the upcoming ColdFusion 9 release: <a
class="sublink" href="http://labs.adobe.com/technologies/coldfusionbuilder/">ColdFusion Builder.</a> Although ColdFusion Builder 9 is a stand-alone product and separate from the ColdFusion 9 server product itself, we think it&#8217;s one of the most important moves Adobe has made in the last few years. ColdFusion veterans might remember back to the good old days of Allaire&#8217;s ColdFusion Studio, which was the last commercially available and dedicated ColdFusion IDE.</p><p>ColdFusion Builder has been created on top of Eclipse, the well-known development framework that powers dozens of popular IDEs. Adobe&#8217;s made good use of Eclipse in the past &#8211; Flex Builder (now called Flash Builder) and Flash Catalyst are both Eclipse-based tools.</p><p>The IDE presents itself with a typical Eclipse-like workspace consisting of various views. In the figure below, you&#8217;ll see a common development setup comprising a project navigator on the left, code views in the center, and multiple helper views such as outline, RDS database and file server views, and log file access to the right.</p><p><img
src="http://i2.sitepoint.com/graphics/1737_Image1.thumb.png"  height="243" width="400" alt="Inside the new ColdFusion IDE" /></p><p>It&#8217;s possible to set up multiple servers in ColdFusion Builder so that one could directly interact with development, staging, and production environments. The code views also offer toolbars for quick access to commonly used ColdFusion tags, HTML, and CSS features.</p><p>ColdFusion Builder includes a line debugger, which developers already working with Eclipse will become familiar with in a very short amount of time. It&#8217;s a feature Adobe had already introduced in ColdFusion 8, but now springs to new life with a dedicated IDE catering for the debug process. Here&#8217;s the debugger in action.</p><p><img
src="http://i2.sitepoint.com/graphics/1737_Image2.thumb.png"  height="243" width="400" alt="Debugging in ColdFusion Builder" /></p><p>The third set of features we&#8217;d like to introduce here are the extremely helpful code and content assistance, together with syntax checking. Any good IDE should include syntax highlighting and code completion as a matter of course, but Adobe has added useful support for instantiating ColdFusion Components (CFCs) and introspecting CFC methods, which you&#8217;ll see in action in the figures below.</p><p><img
src="http://i2.sitepoint.com/graphics/1737_Image3a.thumb.png"  height="290" width="400" alt="Code completion in ColdFusion Builder" /></p><p>ColdFusion Builder also provides an ongoing syntax analysis of your code by parsing the files right there in the IDE. This feature alone provides a massive boost in productivity &#8211; there&#8217;s no more need to run the page in the browser anymore to see if there was a syntax error in the ColdFusion code.</p><p>Of course, there&#8217;s more to ColdFusion 9 than a shiny new IDE. Let&#8217;s move onto some server features and practical examples.</p><p><div
class="article-cms-pagebreak"></div></p><h5>Language Specification Enhancements</h5><p>Let&#8217;s examine some of the changes and improvements to the language of ColdFusion itself. The first of these improvements surrounds CFScript, and the changes can be best described as upgrading CFScript to be a first-class citizen in ColdFusion 9. CFScript is a way to write CFML code in a manner that resembles JavaScript. Unfortunately CFScript never supported the full language features of ColdFusion, and was quite limited in a various ways.</p><p>In ColdFusion 9, we&#8217;re now able to code ColdFusion Components entirely in CFScript, and that we can run SQL queries from CFScript. To compare, let&#8217;s see an identical logging component written and called in both CFML and CFScript. <br
/> Using CFML, let&#8217;s create a simple logging component:</p><pre><code>&lt;cfcomponent&gt; &nbsp;<br />
 &nbsp;&lt;cffunction name=&quot;init&quot; output=&quot;false&quot; access=&quot;public&quot; &nbsp;<br />
 &nbsp; returntype=&quot;logWithTags&quot;&gt; &nbsp;<br />
 &nbsp; &nbsp;&lt;cfargument name=&quot;logFile&quot; default=&quot;customLogger&quot; &nbsp;<br />
 &nbsp; &nbsp; &nbsp;type=&quot;string&quot; required=&quot;no&quot;/&gt; &nbsp;<br />
 &nbsp; &nbsp;&lt;cfset variables.logFile = arguments.logFile /&gt; &nbsp;<br />
 &nbsp; &nbsp;&lt;cfreturn this/&gt; &nbsp;<br />
 &nbsp;&lt;/cffunction&gt; &nbsp;<br />
 &nbsp;<br />
 &nbsp;&lt;cffunction name=&quot;write&quot; output=&quot;false&quot; access=&quot;public&quot; &nbsp; <br />
 &nbsp; returntype=&quot;void&quot;&gt; &nbsp;<br />
 &nbsp; &nbsp;&lt;cfargument name=&quot;message&quot; type=&quot;string&quot; required=&quot;yes&quot;/&gt; &nbsp;<br />
 &nbsp; &nbsp;&lt;cfset writelog(text=arguments.message, file=variables.logFile)/&gt; &nbsp;<br />
 &nbsp;&lt;/cffunction&gt; &nbsp;<br />
 &nbsp;<br />
&lt;/cfcomponent&gt;</code></pre><div
id="adz" class="horizontal"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>Here&#8217;s how we&#8217;d invoke the component and write a message to that log:</p><pre><code>&lt;cfinvoke component=&quot;logWithTags&quot; method=&quot;init&quot; &nbsp;<br />
 &nbsp;logFile=&quot;LogTestDeleteMe&quot; returnvariable=&quot;logger&quot; /&gt; &nbsp;<br />
 &nbsp; &nbsp;<br />
&lt;cfinvoke component=&quot;#logger#&quot; method=&quot;write&quot; &nbsp;<br />
 &nbsp;message=&quot;Testing out the new logger with CFML.&quot; /&gt; &nbsp;<br />
</code></pre><p>In ColdFusion 9, we&#8217;re able to use CFScript for this purpose. Here&#8217;s a logging component written in CFScript, which is functionally identical to the above component:</p><pre><code>component &nbsp;<br />
 &nbsp;{ &nbsp;<br />
 &nbsp; &nbsp;public log function init (string logFile=&quot;customLogger&quot;) output=&quot;false&quot; &nbsp;<br />
 &nbsp; &nbsp; &nbsp;{ &nbsp;<br />
 &nbsp; &nbsp; &nbsp;variables.logFile = arguments.logFile; &nbsp;<br />
 &nbsp; &nbsp; &nbsp;return This; &nbsp;<br />
 &nbsp; &nbsp; &nbsp;} &nbsp;<br />
 &nbsp; &nbsp;public void function write(string message) output=&quot;false&quot; &nbsp; <br />
 &nbsp; &nbsp;{ &nbsp;<br />
 &nbsp; &nbsp;writelog(text=arguments.message, file=variables.logFile); &nbsp;<br />
 &nbsp; &nbsp;} &nbsp;<br />
 &nbsp;}</code></pre><p>And in CFScript, we&#8217;d invoke it like so:</p><pre><code>&lt;cfscript&gt; &nbsp;<br />
 &nbsp;logger = new log('LogTestDeleteMe'); &nbsp;<br />
 &nbsp;logger.write(&quot;Testing out the new logger.&quot;); &nbsp;<br />
&lt;/cfscript&gt;</code></pre><p>Let&#8217;s explore how to execute a database query from ColdFusion 9&#8242;s new CFScript engine. If you&#8217;re a Java developer, you&#8217;ll see how similar the structure of the code is to writing Java code for querying SQL databases via JDBC. The argument passed in the method <code>setDataSource</code> is a named reference to an SQL database that can be set up in ColdFusion&#8217;s administration tool:</p><pre><code>&lt;cfscript&gt; &nbsp;<br />
 &nbsp;query = new Query(); &nbsp;<br />
 &nbsp;query.setDataSource('cfartgallery'); &nbsp;<br />
 &nbsp;query.setSQL(&quot;SELECT * from artists&quot;) ; &nbsp;<br />
 &nbsp;results = query.Execute().getResult(); &nbsp;<br />
&lt;/cfscript&gt; &nbsp;<br />
 &nbsp;<br />
&lt;cfdump var=&quot;#results#&quot;&gt;</code></pre><p>Other language enhancements include <a
class="sublink" href="http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-74dd.html">a <code>cffinally</code> tag</a> for exception handling, the ability to nest <a
class="sublink" href="http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c6b.html"><code>cftransaction</code> tags</a>, assignment chaining (<code>a=b=c=d</code>, and so on), and support for ternary operators such as <code>a = (b&lt;c)?b:c</code>.</p><p>ColdFusion 9 also offers new integration with PDF documents and spreadsheets. <a
class="sublink" href="http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-70da.html">The updated PDF subsystem</a> provides new tools for extracting text from PDFs, and optimizing them. The latter is particularly interesting: PDF documents are often full of bookmarks, comments, JavaScript, and other information, but in many use cases it&#8217;s best to strip out this extra data.</p><p>Extracting text from a PDF document is as simple as using the <code>cfpdf</code> tag&#8217;s new action, <code>extracttext</code>. Here, we&#8217;ll extract the text from a test document:</p><pre><code>&lt;cfpdf action=&quot;extracttext&quot; &nbsp; <br />
 &nbsp;source=&quot;#ExpandPath('./testdocument1.pdf')#&quot; &nbsp; <br />
 &nbsp;name=&quot;xTestdoc&quot; &nbsp;/&gt;</code></pre><p>Similarly, using the new <code>optimize</code> action, we can remove the bookmarks and comments from a PDF, and write the results out to a new, optimized file:</p><pre><code>&lt;cfpdf action=&quot;optimize&quot; &nbsp; <br />
 &nbsp;source=&quot;#ExpandPath('./testdocument1.pdf')#&quot; &nbsp; <br />
 &nbsp;destination=&quot;#ExpandPath('./testdocument1_optimised.pdf')#&quot; &nbsp;<br />
 &nbsp;nobookmarks = true &nbsp;<br />
 &nbsp;nocomments = true /&gt;</code></pre><p><div
class="article-cms-pagebreak"></div></p><p>Another very interesting opportunity to integrate with external data formats has been created with the <code>cfspreadsheet</code> tag. It provides a way to interact with Excel documents of both .xls and .xlsx types, and enables developers to read data from and write data to spreadsheets. The code below reads data from an Excel 2007 document and outputs the content in a table:</p><pre><code> &nbsp; <br />
&lt;cfset XLSfile = &quot;#ExpandPath('.')#/authorData.xlsx&quot; /&gt; &nbsp; <br />
 &nbsp; <br />
&lt;cfspreadsheet action=&quot;read&quot; src=&quot;#XLSfile#&quot; &nbsp; <br />
 &nbsp; &nbsp;sheet=&quot;1&quot; query=&quot;excelQuery&quot; headerrow=&quot;1&quot; /&gt; &nbsp; <br />
 &nbsp; <br />
&lt;table&gt; &nbsp; <br />
 &nbsp;&lt;tr&gt; &nbsp; <br />
 &nbsp; &nbsp;&lt;th&gt;First Name&lt;/th&gt; &nbsp; <br />
 &nbsp; &nbsp;&lt;th&gt;Last Name&lt;/th&gt; &nbsp; <br />
 &nbsp; &nbsp;&lt;th&gt;Words written&lt;/th&gt; &nbsp; <br />
 &nbsp;&lt;/tr&gt; &nbsp; <br />
 &nbsp;&lt;cfoutput query=&quot;excelQuery&quot; startrow=&quot;2&quot;&gt; &nbsp; <br />
 &nbsp;&lt;tr&gt; &nbsp; <br />
 &nbsp; &nbsp;&lt;td&gt;#firstName#&lt;/td&gt; &nbsp; <br />
 &nbsp; &nbsp;&lt;td&gt;#lastName#&lt;/td&gt; &nbsp; <br />
 &nbsp; &nbsp;&lt;td&gt;#wordsWritten#&lt;/td&gt; &nbsp; <br />
 &nbsp;&lt;/tr&gt; &nbsp; <br />
 &nbsp;&lt;/cfoutput&gt; &nbsp; <br />
&lt;/table&gt;</code></pre><p>ColdFusion&#8217;s <code>SpreadsheetAddRow</code> function allows you to create a new entry in an Excel file. ColdFusion 9 also supports OpenOffice spreadsheets:</p><pre><code>&lt;cfset XLSfile = &quot;#ExpandPath('.')#/authorData.xlsx&quot; /&gt; &nbsp; <br />
&lt;cfspreadsheet action=&quot;read&quot; src=&quot;#XLSfile#&quot; name=&quot;excelObj&quot; /&gt; &nbsp; <br />
 &nbsp; <br />
&lt;cfset SpreadsheetAddRow(excelObj,&quot;Diane,Sieger,654,2&quot;,3,1) /&gt; &nbsp; <br />
&lt;cfspreadsheet action=&quot;write&quot; name=&quot;excelObj&quot; filename=&quot;#XLSfile#&quot; overwrite=&quot;true&quot; /&gt;</code></pre><div
id="adz" class="horizontal"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><h5>ColdFusion ORM</h5><p>One of the most exciting new features in ColdFusion 9 is <a
class="sublink" href="http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSD628ADC4-A5F7-4079-99E0-FD725BE9B4BD.html">ColdFusion ORM</a>. ORM stands for object-relational mapping &#8211; a concept in object oriented programming where code objects are mapped to relational database tables for persistent storage. The ORM lets you access and update data through the application using the object model, without you needing to know anything about the details of the underlying database structure. The idea is that the ORM takes care of all the mundane, rote tasks for the programmer: scripting tables, writing CRUD operations (create record, update, and delete &#8211; the basic building blocks of most applications) and the like, leaving them to focus on interesting and challenging programming tasks. Other advantages of an ORM include database vendor independence and built-in caching features. Sounds good, right?</p><p>ColdFusion developers writing object oriented applications have been able to use ORMs in the past with the help of external frameworks, <a
class="sublink" href="http://transfer-orm.com">Transfer</a> and <a
class="sublink" href="http://trac.reactorframework.com">Reactor</a> being the two best known. However, ColdFusion 9&#8242;s new built-in ORM features are based on <a
class="sublink" href="http://hibernate.org">Hibernate</a>, an open source ORM library that has been around in the Java world since around 2004. It&#8217;s popular, tried, and tested, and seeing as ColdFusion is based on Java, an obvious choice for the ColdFusion team.</p><p>So how does it work? There are two ways to work with ORM systems: either you create your data objects in code, and let the ORM create the database tables for you, or you start with the database, and have the data objects built for you. ColdFusion ORM lets you work in both of these ways.</p><p>As a very basic example, if you would like ColdFusion to create your tables for you, you&#8217;d enable ColdFusion ORM in your Application component by setting some basic variables. Let&#8217;s say you were using a MySQL data source that had been set up in the ColdFusion Administrator as <code>sampledb</code>:</p><pre><code>&lt;cfset this.ormenabled=&quot;true&quot;&gt; &nbsp; &nbsp;<br />
&lt;cfset this.datasource=&quot;sampledb&quot;&gt; &nbsp; &nbsp;<br />
&lt;cfset this.ormsettings={Dialect=&quot;MySQL&quot;}&gt;</code></pre><p>Next, you create your CFC, setting the value of <code>persistent</code> to <code>true</code> to map the CFC to a database table. This example CFC has two properties &#8211; <code>name</code> and <code>email</code>:</p><pre><code>&lt;cfcomponent persistent=&quot;true&quot;&gt; &nbsp; &nbsp;<br />
 &nbsp;&lt;cfproperty name=&quot;Name&quot;&gt; &nbsp; &nbsp;<br />
 &nbsp;&lt;cfproperty name=&quot;Email&quot;&gt; &nbsp; &nbsp;<br />
&lt;/cfcomponent&gt;</code></pre><p>Now, you can use the ORM functions such as <code>EntityLoad</code> and <code>EntitySave</code> to retrieve and update that data.</p><p>When your application is run, if that table does not exist in the database, it will be created. If, on the other hand, you already have a database structure and would like ColdFusion to generate your code, you&#8217;re going to need ColdFusion Builder to inspect your database and generate code. If you&#8217;d prefer to maintain some control over the way ColdFusion creates that code, that&#8217;s okay too &#8211; you can create your own base templates to dictate how the generated code should be arranged, or download and install another&#8217;s templates.</p><p><div
class="article-cms-pagebreak"></div></p><h5>Ajax Features</h5><p>One of the more exciting updates to ColdFusion 8 was the addition of new Ajax components, making the power of the ExtJS and YUI JavaScript libraries available to the ColdFusion programmer via a few simple tags. Now, in ColdFusion 9, the Adobe team has upped the ante, upgrading all of the libraries (including bringing ExtJS from version 1.0 to 3.0), which brings a number of enhancements across the board.</p><p>In particular, the datagrid and accordion components have been updated, and new components include a multiple file upload tool, a progress indicator widget, a media player control, and a Google Maps widget.</p><p>At its simplest, the multiple file upload component created with <a
class="sublink" href="http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec18238-7fd0.html">the new <code>cffileupload</code> tag</a> requires only the <code>url</code> attribute, which specifies the processing script that will handle the file upload on the server:</p><div
id="adz" class="horizontal"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><pre><code>&lt;cffileupload url=&quot;ProcessFiles.cfm&quot;&gt;</code></pre><p>Below, you&#8217;ll see how that upload component appears.</p><p><img
src="http://i2.sitepoint.com/graphics/1737_Image5.thumb.jpg"  height="266" width="400" alt="Multiple file upload tool" /></p><p>There are many configuration options available, including limiting the size, maximum number, and type of files to be uploaded, as well as the button labels, size, and color of the component.</p><p>The new <code>cfmediaplayer</code> tag plays video files in the now ubiquitous Flash video format (.flv). Again, a very simple implementation needs only one parameter: the location of the file to play:</p><pre><code>&lt;cfmediaplayer source=&quot;sample.flv&quot;&gt;</code></pre><p>Configuration options include height, width, the ability to define borders and a background color, choice to display video controls and allowing the video to be played full screen, and even JavaScript functions to be triggered on load, on start, and on complete. Here&#8217;s how a basic media player appears:</p><p><img
src="http://i2.sitepoint.com/graphics/1737_Image6.jpg"  height="240" width="320" alt="Media player" /></p><p>One very useful Ajax component is <a
class="sublink" href="http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c6b.html">the new <code>cfmap</code> widget</a>, which embeds a Google map. The Google Maps API key for the domain can be specified either in the ColdFusion Administrator, in the site&#8217;s Application.cfc file, or imported at runtime via the <code>cfajaximport</code> tag. It&#8217;s as easy as this:</p><pre><code>&lt;cfajaximport params=&quot;#{googlemapkey='YOUR API KEY'}#&quot;&gt; &nbsp; &nbsp;<br />
&lt;cfmap centeraddress=&quot;345 Park Avenue, San Jose, CA, USA&quot; zoomlevel=&quot;8&quot;&gt;&lt;/cfmap&gt; &nbsp; &nbsp;<br />
</code></pre><p>This produces the following map:</p><p><img
src="http://i2.sitepoint.com/graphics/1737_image7.thumb.jpg"  height="400" width="398" alt="A Google map" /></p><p>You&#8217;ll notice <code>cfmap</code> has an opening and closing tag. Inside the tag pair, you can place <code>cfmapitem</code> tags to represent other items. Let&#8217;s add one to point out Adobe&#8217;s head office:</p><pre><code>&lt;cfajaximport params=&quot;#{googlemapkey='YOUR API KEY'}#&quot;&gt; &nbsp; &nbsp;<br />
&lt;cfmap centeraddress=&quot;San Jose, CA, USA&quot; zoomlevel=&quot;6&quot;&gt; &nbsp; &nbsp;<br />
 &nbsp;&lt;cfmapitem name=&quot;marker01&quot; &nbsp; &nbsp;<br />
 &nbsp; address=&quot;345 Park Avenue, San Jose, CA, USA&quot; &nbsp; &nbsp;<br />
 &nbsp; tip=&quot;Adobe's Head Office&quot;/&gt; &nbsp; &nbsp;<br />
&lt;/cfmap&gt;</code></pre><p>Now, your map will display the additional marker, as shown below:</p><p><img
src="http://i2.sitepoint.com/graphics/1737_image8.thumb.jpg"  height="392" width="400" alt="A map with markers" /></p><p>Altogether, the preview release of ColdFusion promises to be a highly interesting piece of technology for web developers. There are so many more new features and improvements to the product that we found it impossible to discuss each in detail, or even mention them all here, but you&#8217;ll find plenty of information about ColdFusion 9 in the new <a
class="sublink" href="http://help.adobe.com/en_US/ColdFusion/9.0/Admin/index.html">Administrator&#8217;s Guide</a> and <a
class="sublink" href="http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/index.html">CFML reference documentation</a>. The <a
class="sublink" href="http://labs.adobe.com/technologies/coldfusion9/">ColdFusion 9</a> and <a
class="sublink" href="http://labs.adobe.com/technologies/coldfusionbuilder/">ColdFusion Builder</a> betas are available, too &#8211; now&#8217;s the time to start work!</p><p><strong>ColdFusion 9&#8242;s packed with new features and improvements. <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/whats-new-coldfusion-9/">Test your knowledge of what&#8217;s inside the new ColdFusion with our quiz!</a> Don&#8217;t forget, the first 200 participants who fill in their details will receive a shiny new ColdFusion evangelist&#8217;s kit &#8211; perfect for convincing your boss to give ColdFusion a try!</strong></p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/whats-new-coldfusion-9/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>The release of ColdFusion 9&#8230;</title><link>http://www.sitepoint.com/the-release-of-coldfusion-9/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-release-of-coldfusion-9</link> <comments>http://www.sitepoint.com/the-release-of-coldfusion-9/#comments</comments> <pubDate>Thu, 04 Sep 2008 15:43:13 +0000</pubDate> <dc:creator>Kay Smoljak</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/blogs/?p=2946</guid> <description><![CDATA[CF9 the shirt, that is. If you’re eagerly anticipating ColdFusion 9 – codenamed Centaur – you can now get the unofficial tshirt. As well as looking after your fashion woes, Kay wraps up the latest developments in the ColdFusion community from this week.]]></description> <content:encoded><![CDATA[<p></p><p>&#8230;well, the shirt anyway. If you’re eagerly anticipating ColdFusion 9 – codenamed Centaur – <a
href="http://www.centaurshirt.com/">you can now get the unofficial tshirt</a>. User groups can get bulk orders with their name on the back. Pity it’s white though! <a
href="http://www.forta.com/blog/index.cfm/2008/8/29/Get-Your-Unofficial-Centaur-TShirt">hat tip to Ben Forta</a>.</p><p>The biggest news this week was that Adobe have finalized their educational licensing and <a
href="http://www.webbschofield.com/index.cfm/2008/9/2/ColdFusion-8-Now-Available-to-Students-and-Educators-for-Free">ColdFusion 8 is now available to students and educators free of charge</a>. Government agencies in the US <a
href="http://www.webbschofield.com/index.cfm/2008/8/28/20-off-ColdFusion-8-for-Government-Agencies">can get a 20% discount on ColdFusion 8</a> at the moment as well.</p><p><strong>Coding</strong></p><p>A couple of security posts this week – <a
href="http://www.bryantwebconsulting.com/blog/index.cfm/2008/9/2/CFBlogPicks-September-2-2008">hat tip to Steve Bryant’s CF_BlogPicks</a> for these links:</p><ul><li><a
href="http://www.usefulconcept.com/index.cfm/2008/8/27/ColdFusion-Errors-and-Security">Joshua Cyr reminds us to make sure we’re not giving away too much information</a> on our production servers</li><li>Jason Dean continues his security series (9th installment) with <a
href="http://www.12robots.com/index.cfm/2008/8/25/Request-Forgeries-and-ColdFusion--Security-Series-9">Request Forgeries and ColdFusion</a></li></ul><p>In more general code-related news, Stephen Withington has out together <a
href="http://www.stephenwithington.com/blog/index.cfm/2008/8/26/CGI-Variables-and-Their-Respective-ColdFusionJava-Servlet-Alternative-Methods">a big list of Java Servlet equivalents to CGI scoped variables</a> – so instead of CGI.PATH_INFO for example, you can use getPageContext().getRequest().getPathInfo(). The comments on the post explain a little about why you might find the Java Servlet alternatives more useful.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>Paul Marcotte explains his approach to test driven development in detail – part 1 (<a
href="http://www.fancybread.com/blog/index.cfm/2008/8/27/My-Approach-to-Test-Driven-Development-Part-1--Application-Structure-and-Apache">Application Structure and Apache</a>) and part 2 (<a
href="http://www.fancybread.com/blog/index.cfm/2008/8/28/My-Approach-to-Test-Driven-Development-Part-2--MXUnit-Coldspring-and-ColdMock">MXUnit, ColdSpring and ColdMock</a>) are available.</p><p>Ben Nadel, always one to share his learning experiences, <a
href="http://www.bennadel.com/index.cfm?dax=blog:1337.view">has posted about his first experiences using ColdFusion 8 secure CFFTP</a>. <a
href="http://www.codersrevolution.com/index.cfm/2008/8/28/Delay-Evaluation-What-does-the-de-function-do-anyway">Brad Wood explains what the de() function actually does</a>. <a
href="http://www.coldfusionjedi.com/index.cfm/2008/8/29/CFFEED--You-have-failed-me-for-the-last-time">And Raymond Camden still hates CFFEED</a>.</p><p><strong>Frameworks</strong></p><p>Mach-II news: <a
href="http://www.mattwoodward.com/blog/index.cfm?event=showEntry&amp;entryId=FBE0A217-E0F5-4442-A6F96B5852644854">Matt Woodward reports that the alpha of the Mach-II Dashboard has been released</a>. According to Matt, the dashboard “gives you a ton of insight into and control over your Mach-II applications, letting you reload the application or individual modules, reload the base or child ColdSpring bean factories, manage logging, and manage caching.”</p><p>An on the Fusebox front: <a
href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/How_to_Drive_Fusebox_55">Sean Corfield reports that Jeff Peters’ book</a> <a
href="http://protonarts.com/index.cfm?fuseaction=Books.showBookDetails&amp;ISBN=0975264761">How to Drive Fusebox 5.5 is now available for purchase</a>. Being a Fuseboxer myself, I’ve ordered my copy already – Jeff’s previous Fusebook books were great.</p><p><strong>Community</strong></p><p>Brian Rinaldi took a week off his Open Source Update last week – I don’t know if you missed him, but I certainly did. <a
href="http://www.remotesynthesis.com/post.cfm/coldfusion-open-source-update-september-2-2008">This week he’s back with four new projects, 12 updates</a>, and a whole ton of announcements, tutorials, presentations and reviews.</p><p>After a bit of a hiatus, I’m getting back into the swing of my CF-TALK mailing list roundups. <a
href="http://www.fusionauthority.com/news/4765-coldfusion-talk-roundup-aug-28-2008.htm">Last week’s summary included discussion threads on SQL Injection, Web Services, Academic Licensing and Career Advice</a>.</p><p>A Wee Dram of Scotch – the mini Scotch On The Rocks conference being held in London on September 25 – <a
href="http://aweedram.com/ofScotch/">now has a full program and is open for registration</a> (hat tips to <a
href="http://www.creative-restraint.co.uk/blog/index.cfm/2008/9/1/A-Wee-Dram-of-Scotch--Registration-Open">Andy Allan</a> and <a
href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/A_Wee_Dram__location_and_more_details">Sean Corfield</a>). With the stars in the lineup and at only £10, I dare say it’s going to sell out quickly.</p><p><strong>Alternative CFML Engines</strong></p><p><a
href="http://www.garyrgilbert.com/blog/index.cfm/2008/8/29/Railo-30-Not-just-a-Pretty-Face">Gary Gilbert has posted his impressions of Railo 3</a>, after meeting Gert Franz and Michi Streit at the Munich CFUG. Gary was impressed by the “strict” variable scoping setting in the Administrator, the Amazon S3 resource, and the extension framework.</p><p><a
href="http://www.webtrenches.com/post.cfm/jquery-replacements-for-cfgride-cfwindowe-and-cftooltip">Michael Sprague has released a beta of CFjqAjax</a>, a library of custom tags to replicate ColdFusion 8’s Ajax UI controls CFGRID, CFWINDOW, and CFTOOLTIP with jQuery equivalents. This is great news, not only for people who prefer to work with the jQuery JavaScript than ExtJS or YUI… but also for those using alternative CFML engines like Railo and Open BlueDragon.</p><p>Okey dokes kids, that’s all for now. Got a tip? Email kay at smoljak dot com, leave a comment or tag at delicious.com with for:kay.smoljak. Til next time&#8230;</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/the-release-of-coldfusion-9/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>All&#8217;s Quiet on the CF Front&#8230;</title><link>http://www.sitepoint.com/alls-quiet-on-the-cf-front/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=alls-quiet-on-the-cf-front</link> <comments>http://www.sitepoint.com/alls-quiet-on-the-cf-front/#comments</comments> <pubDate>Thu, 28 Aug 2008 14:09:57 +0000</pubDate> <dc:creator>Kay Smoljak</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/blogs/?p=2916</guid> <description><![CDATA[This week was strangely quiet. Nothing much on the frameworks front; Open BlueDragon and Railo kept to themselves. Hmmm, looks like everyone is heads down coding&#8230; let’s see what they’ve got for us. Code n&#8217; Concepts Adobe have released a technote briefly demonstrating how images can be streamed. And if you’re working with CFIMAGE, Scott [...]]]></description> <content:encoded><![CDATA[<p></p><p>This week was strangely quiet. Nothing much on the frameworks front; Open BlueDragon and Railo kept to themselves. Hmmm, looks like everyone is heads down coding&#8230; let’s see what they’ve got for us.</p><p><strong>Code n&#8217; Concepts</strong></p><ul><li>Adobe have released <a
href="http://kb.adobe.com/selfservice/viewContent.do?externalId=kb405330&amp;sliceId=2">a technote briefly demonstrating how images can be streamed</a>. And if you’re working with CFIMAGE, <a
href="http://www.scottpinkston.org/blog/index.cfm/2008/8/20/Patch-for-CFImage-and-javaioFileNotFoundException">Scott Pinkston reminds you to make sure you apply all the patches</a> lest you find yourself pulling your hair out unnecessarily</li><li>Ben Nadel&#8217;s OOPhoto project is still progressing – the latest installment is <a
href="http://www.bennadel.com/index.cfm?dax=blog:1334.view">Encapsulating Form Processing In The Service / Facade Layer</a></li><li>Raymond Camden answers a reader&#8217;s query about <a
href="http://www.coldfusionjedi.com/index.cfm/2008/8/26/Using-a-CFC-to-drive-content-to-cftooltip">populating tooltips with a CFC</a> and <a
href="http://www.coldfusionjedi.com/index.cfm/2008/8/21/Yet-another-post-on-cffeed-and-columnMap">beats up on the CFFEED</a> tag</li><li>Following up from his <a
href="http://www.dougboude.com/blog/1/2008/03/What-IS-Business-Logic-Anyway.cfm">ruminations on Business Logic</a>, Doug Boude attempts to define just <a
href="http://www.dougboude.com/blog/1/2008/08/Just-What-Is-Application-Logic-Anyway.cfm">what is Application Logic</a></li><li>Doug Hughes introduces the <a
href="http://alagad.com/go/blog-entry/introducing-cfant">CFANT project, a toolkit for scripting remote CF deployments</a></li><li><a
href="http://mxunit.org/blog/2008/08/mxunit-102-now-available.html">The MXUnit unit testing framework has been updated to 1.0.2</a></li></ul><p>Are you a fan of nested sets to represent tree structures in your database? <a
href="http://nstree.riaforge.org/">Nested Set Trees</a> – a ColdFusion library for managing the various operations involved &#8211; has hit <a
href="http://stannard.net.au/blog/index.cfm/2008/8/25/Nested-Set-Trees-in-ColdFusion-v08">version 0.8</a>.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>SQL Injection attacks still bugging you? Simon Whatley has posted on <a
href="http://www.simonwhatley.co.uk/how-to-fix-a-sql-injection-attack">how to fix an SQL Injection hack</a>, and also how to <a
href="http://www.simonwhatley.co.uk/how-to-protect-your-website-from-a-malicious-attack">protect against a malicious attack in the first place</a> (hat tip to <a
href="http://www.bryantwebconsulting.com/blog/index.cfm/2008/8/25/CFBlogPicks-August-25-2008">Steve Bryant</a>). You know what they say about prevention being better than cure… <a
href="http://blog.bpsite.net/item/63/QueryParam%20Scanner%20-%20Eclipse%20Plugin.html">Peter Boughton has released an Eclipse IDE plugin</a> called <a
href="http://www.hybridchill.com/projects/qpscanner.html">QueryParam Scanner</a> which looks through code to find and report on queries with unprotected input parameters. No excuses now – lock down that code!</p><p><strong>Conferences</strong></p><p>Some bad news UK developers: <a
href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/CFDevCon_and_other_UK_news">UK conference CFDevCon has been canned</a>.</p><p>Some good news for UK developers: <a
href="http://www.aweedram.com/ofScotch/">A Wee Dram of Scotch</a> – a one day conference from the Scotch on the Rocks team &#8211; has been announced for September 25 in London (<a
href="http://andyjarrett.co.uk/andy/blog/index.cfm/2008/8/27/Who-is-up-for-a-wee-dram-on-the-25th-September">hat tip to Andy Jarrett</a>).</p><p>While we’re on conferences, the <a
href="http://www.cfobjective.com/sessions.cfm">four tracks for cf.Objective() 2009</a> have been announced (hat tip to <a
href="http://www.nictunney.com/index.cfm?mode=entry&amp;entry=FC027A0B-FF61-56C5-E959056671F7D9E0">Nic Tunney</a>).</p><p>So that&#8217;s it? Really? Tell me people, did I miss something? Leave a comment, tag for:kay.smoljak on delicious.com or email kay at smoljak dot com with all the juicy goss.</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/alls-quiet-on-the-cf-front/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item><div><div
class="post_box two_ads" style="float:left;padding-left:2px;"> <script>GA_googleFillSlot("Edit_728x90_3");</script> </div></div><div
class="clear">&nbsp;</div> <item><title>10 Questions for Isaac Dealey on the OnTap Framework</title><link>http://www.sitepoint.com/isaac-dealey-on-the-ontap-framework/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=isaac-dealey-on-the-ontap-framework</link> <comments>http://www.sitepoint.com/isaac-dealey-on-the-ontap-framework/#comments</comments> <pubDate>Sun, 24 Aug 2008 23:50:02 +0000</pubDate> <dc:creator>Kay Smoljak</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/blogs/?p=2883</guid> <description><![CDATA[Isaac Dealey is the author of two ColdFusion frameworks: onTap and an object relational mapper called DataFaucet.  SitePoint recently had the privilege of sitting down with him for a discussion about his frameworks.]]></description> <content:encoded><![CDATA[<p></p><p>Isaac Dealey is the author of two frameworks: onTap and more recently, an ORM (object relational mapper) called DataFaucet (subject of a future framework interview). Here&#8217;s his answers to my 10 framework questions.</p><p>See other framework interviews: <a
href="http://www.sitepoint.com/article/geoff-bowers-farcry-framework">Geoff Bowers on FarCry</a>, <a
href="http://www.sitepoint.com/article/coop-coldfusion-framework">John Farrar on COOP</a> and <a
href="http://www.sitepoint.com/blogs/2008/06/09/10-questions-for-mark-mandel-on-transfer-orm/">Mark Mandel on Transfer ORM</a>.</p><p><strong>1. Hi Ike! Give us your elevator pitch: summarize the essence of onTap in a sentence or two.</strong></p><p>Sales Pitchy Version: The onTap framework does for ColdFusion what ColdFusion did for the web: simplify a lot of powerful tools.</p><p>Not so Sales Pitchy Version: The onTap framework is an SOA approach to ColdFusion development.</p><p><strong>2. Let&#8217;s dig a little deeper: tell us more about the main features.</strong></p><p>Version 3.2 has converted all its config files from flat CFML includes now to CFCs and includes a new IoC Manager. The IoC Manager and the Plugin Manager provides a structure for developers to distribute or sell pluggable, smartly integrated applications and services that can be installed within a browser. In the not too distant future, the framework site will host a webservice which allows those &#8220;plugin&#8221; applications to be installed directly from within the framework in much the same way that add-ons can be installed in Eclipse or FireFox 3 without leaving the IDE.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>If that sounds intimidating, don&#8217;t worry. None of that is actually necessary for developing applications with the onTap framework. The framework itself is agnostic about OO, the same way that the Fusebox framework is agnostic. You can choose to develop your application in an &#8220;extreme OO&#8221; manner, using an IoC framework, etc. or you can just build pages if that&#8217;s your preference. My preference is for the OO/SOA approach.</p><p>The framework includes a powerful XHTML library: a powerful and extensible templating engine which gives you access to a variety of form building and Ajax tools.</p><p>I use these XHTML tools in combination with a unique core architecture I&#8217;ve been calling &#8220;tiered inclusion&#8221;. Where Fusebox has circuits and fuseactions, the onTap framework has a &#8220;process&#8221;, which resembles and actually maps to both a URL and a file path. This tiered inclusion also provides some additional directory-based hooks for powerful branding/customization features as well as a host of very comprehensive internationalization (i18n) features for anyone who needs or wants them.</p><p>And that&#8217;s not even getting into a variety of other odds and ends you&#8217;ll find in the framework like content caching, section-508 compliant Ajax widgets, an XML-based rule-manager tool for providing powerfully configurable business logic that users can manage (not found in other frameworks), etc.</p><p><strong>3. How did onTap come about and what was the reason for creating it? How are you involved?</strong></p><p>I&#8217;m the original author. About the time I started working on the tiered inclusion technique, I had been doing a lot of work with Fusebox 3. Sure it was a decent framework, and initially I was a big fan of it&#8230; over time I found myself growing increasingly disenchanted by the amount of repetition involved in the switch files in Fusebox 3.</p><p>The tiered inclusion concept was something that just occurred to me spur of the moment one day and I worked on it for a long time to perfect it. For myself, it&#8217;s always provided an excellent way of reducing the amount of code I write. The rest of the framework came later and has always just been an endless pursuit of tools to make my own development work easier &#8211; if I found a way to create a generic tool that would be useful later, I included it in the distribution.</p><p><strong>4. When should a developer seek out onTap? What has it got going for it?</strong></p><p>The onTap framework&#8217;s biggest strength is in its ability to allow seamless branding and customization as well as seamless, automated integration between plugin applications (both using the same techniques).</p><p>I worked for a lot of ASP companies over the years and one thing that has been a consistent problem at every ASP I&#8217;ve worked for has been client customization requests. Clients invariably want tools the system wasn&#8217;t designed to provide and then finding a way to provide them is consistently problematic for the company providing the service, often actually hurting the company financially. The onTap framework provides a comprehensive set of tools that work very well for mitigating the problems caused by implementing client customization requests.</p><p><strong>5. What are the pre-requisites for using onTap? Is there any prior knowledge that would help new users? Does it use any other frameworks that could simplify or complicate things?</strong></p><p>Knowing some ColdFusion obviously would help! The only real requirement is ColdFusion 7 and it should run on both Windows and Unix operating systems. I haven&#8217;t tried with more recent versions of BlueDragon or with Railo yet. It doesn&#8217;t require any additional frameworks, although it does include built-in integration for ColdSpring or Lightwire if that&#8217;s your preference.</p><p>The core architecture behind the onTap framework is honestly not very complicated and is intentionally designed to be very simple to use, however it is unlike most other ColdFusion frameworks in its approach. So if you come to it expecting it to behave just like Mach-II, Model-Glue, ColdBox or even FuseBox you might have to unlearn some complexity to understand how simple and powerful the onTap framework is.</p><p>When I work on my own projects, I spend no more than a few minutes on things that normally, even with a good framework like ColdBox, would take several hours of my time. I spend those extra hours working on new problems instead of working on problems that I&#8217;ve already solved a bazillion times, like laying out or validating a form. And when I work on projects at my day job I essentially consider much of my time spent working as &#8220;time wasted&#8221; because I know how much faster things could be done.</p><p><strong>6. What sets onTap apart from other frameworks?</strong></p><p>Three things especially:<br
/> - Its SOA Approach to ColdFusion development<br
/> - Powerful tools for customization and branding (very useful for ASPs)<br
/> - Its simplicity</p><p>Actually something I find interesting is that several years ago I had done a comparison of several ColdFusion frameworks &#8211; there weren&#8217;t very many at the time, so I had just Fusebox 3 and 4, Mach-II and the onTap framework. At the time I was really disenchanted by the extra work required by the other frameworks, particularly the many, many lines of XML required for Mach-II.</p><p>In the intervening years, not just Mach-II and Fusebox have adopted my approaches, but other frameworks like ColdBox have cropped up in various places all touting as their advantages techniques that I&#8217;d been using for a long time. I&#8217;m not just saying this to pat myself on the back (in spite of the fact that I do take pride in it), but to point out that nearly everything that&#8217;s in the onTap framework has always been &#8220;ahead of its time&#8221;. I think that should speak to the longevity of the framework, which I know a few people have worried about.</p><p>In truth I like to think that the onTap framework functions in many ways a lot more like ColdFusion than most of the other ColdFusion frameworks that have been created in recent years.</p><p><strong>7. Are there any great examples of onTap &#8220;in the wild&#8221;? </strong></p><p>I have to be honest here and say nobody&#8217;s informed me of any yet. I really wish I could say &#8220;ahh yeah, XXX Bank is using it&#8221;, but I can&#8217;t.</p><p>Several years ago I implemented a solution using it for a defense contractor called Raytheon. I hesitate to say that&#8217;s an example of the framework in the wild because it was such an early version.</p><p>I&#8217;m excited to get the news though!</p><p><strong>8. What about licensing, community, support and documentation? </strong></p><p>It&#8217;s released with an OpenBSD style license, which is a little less restrictive than LGPL2 in that, not only are you allowed to create commercial software using it (lord knows I&#8217;ve had my own plans), but you can also encrypt your own software based on the onTap framework if you want to. It only requires that you include the notice that your distribution includes the onTap framework and that it&#8217;s not endorsed by the framework authors (which as of today is just me).</p><p>I&#8217;m currently working rather hard to try and grow the framework community. I&#8217;m trying to find better ways to encourage feedback and participation. I&#8217;m just not good at the marketing and people skills. I am however very interested in growing a more active community around this framework like the Fusebox or FarCry communities which have actual dev. teams and active forums and mailing lists. I&#8217;d like the framework to have a dev team at some point, not just me. I&#8217;d like for it to include code reviews / critiques and code contributions from other members of the community. I just recently published a blog about this specifically asking for people to write about their experiences with the framework, good bad or ugly.</p><p>Documentation for the framework has always been&#8230; well, verbose. I have actually removed some of the documentation in this latest release because I found that not only was a lot of it not read, but I&#8217;d had a number of developers over the years voice &#8230; well they weren&#8217;t complaints, but they would say things like Jeff Peters from the Fusebox community when I met him at cf.Objective had related an anecdote about having looked at the documentation a few days before and having a conversation with someone else in which the phrase &#8220;Do I have to read ALL this?!&#8221; was used.</p><p>The author of Model-Glue, Joe Rinehart once made a comment on the cf-talk list to the effect of &#8220;thanks for setting the bar so high for documentation&#8221; because he found my documentation to be so thorough (read LONG).</p><p><strong>9. What&#8217;s coming up in the future for onTap?</strong></p><p>Right now I&#8217;m working on getting it back onto its own domain. I just registered tapogee.com &#8230; Soon I hope it will be hosting the webservice I mentioned before for instantly finding and downloading plugin applications. My hope is that with a more active community there will be many plugin-based services and applications that can all work together to create a suite that truly leverages the collective talents of the ColdFusion community at large in a way that&#8217;s not been seen with other frameworks thus far (yes even FarCry, I&#8217;m that bold). Work less, accomplish more.</p><p>To that end I&#8217;m also considering self-publishing a small book on how to develop applications using the framework, and possibly t-shirts and other guerilla-marketing techniques.</p><p><strong>10. Where can people find more information about onTap?</strong></p><p><a
href="http://on.tapogee.com">http://on.tapogee.com</a> and check out the <a
href="http://ontap.riaforge.org/">framework blog on RIAForge</a>.</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/isaac-dealey-on-the-ontap-framework/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>The Week In ColdFusion: 13-19 Aug: And amongst the Gurus, an ArgumentCollection did break out</title><link>http://www.sitepoint.com/the-week-in-coldfusion-13-19-aug-and-amongst-the-gurus-an-argumentcollection-did-break-out/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-week-in-coldfusion-13-19-aug-and-amongst-the-gurus-an-argumentcollection-did-break-out</link> <comments>http://www.sitepoint.com/the-week-in-coldfusion-13-19-aug-and-amongst-the-gurus-an-argumentcollection-did-break-out/#comments</comments> <pubDate>Thu, 21 Aug 2008 15:50:01 +0000</pubDate> <dc:creator>Kay Smoljak</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/blogs/?p=2872</guid> <description><![CDATA[So… did ya miss me? I had an awesome holiday, and have come back to an overflowing feed reader. Although I may touch on some of the big things that happened while I was away, I’m going to concentrate on the current week – otherwise this post would take you an hour to read and [...]]]></description> <content:encoded><![CDATA[<p></p><p>So… did ya miss me? I had an awesome holiday, and have come back to an overflowing feed reader. Although I may touch on some of the big things that happened while I was away, I’m going to concentrate on the current week – otherwise this post would take you an hour to read and me all day to write!</p><p><strong>Community</strong></p><p>It was quite a while ago now that Adobe announced that ColdFusion would become free for educational institutions. <a
href="http://www.codersrevolution.com/index.cfm/2008/8/19/ColdFusion-Academic-Version-Curriculum-Needed">Brad Wood has posted a call to the community</a> to help make that push successful by helping to develop curriculum for teaching ColdFusion. There’s some things already happening by the sound of it, so If you have an interest in the academic sphere check Brian’s post out.</p><p><strong>Conferences</strong></p><p>Although conference season seems to be slowing down, one of the biggest conferences – Adobe MAX US, to be held this year in San Francisco – is till on the horizon. <a
href="http://www.forta.com/blog/index.cfm/2008/8/19/MAX-Early-Bird-Pricing-Ends-August-31st">Ben Forta warns that early bird pricing ends on August 31st</a>.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>Just because the big conferences are over doesn’t mean that conference-style learning can’t continue. I’m a big fan of <a
href="http://en.wikipedia.org/wiki/Barcamp">BarCamp</a> – user-generated “unconferences” – which are held in hundreds of locations around the world. <a
href="http://www.henke.ws/machblog/index.cfm?event=showEntry&amp;entryId=D0FB2B85%2D19B9%2DBA51%2DEE855524057D3EBA">Mike Henke attended his first ever BarCamp recently</a> and wrote about the experience. If there’s a BarCamp on your area, it’s definitely worth getting along – and if there’s not one close to you, maybe that’s an opportunity to start one!</p><p><strong>Resources</strong></p><p>A new article has been published in Adobe’s ColdFusion Developer Center on <a
href="http://www.adobe.com/devnet/coldfusion/articles/clustering_cf8.html">High availability clustering in ColdFusion</a>. Mike Brunt explains how enterprise developers need to consider clustering right from the start when planning applications.</p><p>One of the things that happened while I was on holiday was that US-based marketing services company <a
href="http://www.broadchoice.com/">Broadchoice</a> expanded their engineering team, already overflowing with CF gurus such as Sean Corfield, Raymond Camden and Nicolas Lierman, to include both Brian Kotek and Joe Rinehart. This super star team has started a new collaborative blog called <a
href="http://blog.broadchoice.com/">ArgumentCollection</a>. There’s already a whole stack of posts including ones on Transfer, ColdSpring and Model-Glue, so I expect big things from this corner of the web.</p><p><strong>Frameworks</strong></p><p>The big news for Fusebox right now is that <a
href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/Adam_Haskell_takes_over_Fusebox">Sean Corfield has officially passed the reins over to Adam Haskell</a> for development of the Fusebox core files. Thanks are due to Sean for the phenomenal job he has done with the Fusebox 5 releases thus far despite his no-doubt massive workload. I’ll look forward to seeing the core files develop further <a
href="http://cfrant.blogspot.com/">under Adam’s stewardship</a>.</p><ul><li>Alex Lloyd has released <a
href="http://talkwebsolutions.co.uk/blog/index.cfm/2008/8/8/New-Transfer-Lexicon">a Fusebox lexicon for Transfer</a> (hat tip to <a
href="http://www.succor.co.uk/index.cfm/2008/8/13/New-transfer-lexicon-listByPropertyMap">Nick Tong</a>).</li><li><a
href="http://www.luismajano.com/blog/index.cfm/2008/8/16/ColdBox-261-Final-Release-is-now-available">ColdBox 2.6.1 (final release) is available for download</a> (<a
href="http://angry-fly.com/index.cfm/2008/8/18/ColdBox-261-Available-For-Download">hat tip to Russ Johnson</a>).</li><li><a
href="http://www.cfwheels.com/blog/index.cfm/2008/8/18/Released-ColdFuson-on-Wheels-Version-08">ColdFusion on Wheels, the CF community’s response to Ruby on Rails</a>, has been updated to 0.8, adding Oracle support amongst other features and bug fixes (<a
href="http://www.forta.com/blog/index.cfm/2008/8/18/ColdFusion-On-Wheels-08-Released">hat tip to Ben Forta</a>).</li><li>On the FarCry CMS and framework: <a
href="http://www.codersrevolution.com/index.cfm/2008/8/19/Installed-FarCry-Tonight-First-Impressions">Brad Wood has posted about his first impressions of version 5</a>, and Geoff Bowers writes an explanation of how meta-data is used to define configs in <a
href="http://blog.daemon.com.au/index.cfm?objectid=C159F028-9F9B-AC0C-2DFD8D82A4DFB38F">XML Configs Suck</a>. <a
href="http://www.mattwoodward.com/blog/index.cfm?event=showEntry&amp;entryId=6C47237B-F2D3-4CD9-A4590E041C98CD52">Matt Woodward confirms that FarCry will run on Open BlueDragon</a>, and <a
href="http://www.chapter31.com/2008/08/16/farcry-5-running-on-railo-3-windows/">Michael Sharman posts about the process he used to get FarCry running on Railo 3</a> (<a
href="http://www.chapter31.com/2008/08/16/2-cool-things-about-railo/">Michael also gets enthusiastic about Railo generally</a>).</li></ul><p><strong>Code</strong></p><p>Ben Nadel has been busy exploring the world of object-oriented ColdFusion. I’ve missed a whole stack of great posts but you can always <a
href="http://www.bennadel.com/resources/oophoto/application/">view where the OOPhoto application</a> is up to on Ben’s site. He doesn’t have a separate category just for OOPhoto posts (hey Ben, how about it?), but it’s not too hard to find them working back from the homepage. Also catching my eye on Ben’s blog is his tip on <a
href="http://www.bennadel.com/index.cfm?dax=blog:1322.view">extending the functionality of encrypted Application.cfm files</a>.</p><ul><li><a
href="http://www.anujgakhar.com/2008/08/14/crud-with-cfgrid-html-format-part-2/">Anuj Gakhar has updated his CRUD application using ColdFusion 8’s ExtJS-driven CFGRID</a>. There are a number of enhancements based on reader feedback.</li><li>Scott Stroz has demonstrated <a
href="http://www.alagad.com/go/blog-entry/queryconvertforgrid---its-not-just-for-andlt-cfgridandgt-anymore">a cool use for CF8’s QueryConvertForGrid() function</a>… a use that doesn’t involve grids at all.</li></ul><p>Whew, that wasn’t so bad, was it? Posting will resume as normal now – and I have a new framework interview almost ready to post &#8211; so if you have any tips, please email me (kay at smoljak dot com), flag your bookmarks in <a
href="http://www.delicious.com/">Delicious</a> (which has recently undergone a major and very cool redesign) with for:kay.smoljak or leave a comment here. Until next time!</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/the-week-in-coldfusion-13-19-aug-and-amongst-the-gurus-an-argumentcollection-did-break-out/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>The Week in ColdFusion, 2-8 July: Object-oriented CFML for fun and profit</title><link>http://www.sitepoint.com/the-week-in-coldfusion-2-8-july-object-oriented-cfml-for-fun-and-profit/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-week-in-coldfusion-2-8-july-object-oriented-cfml-for-fun-and-profit</link> <comments>http://www.sitepoint.com/the-week-in-coldfusion-2-8-july-object-oriented-cfml-for-fun-and-profit/#comments</comments> <pubDate>Fri, 11 Jul 2008 00:33:22 +0000</pubDate> <dc:creator>Kay Smoljak</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/blogs/?p=2625</guid> <description><![CDATA[In the last few weeks, the number of code-related blog posts in the ‘ole CFBlogosphere has skyrocketed – which is just the way I like it. This week I found lots of good material on writing object oriented code. This bumper roundup will be the last that I’ll be posting this month – I’m off [...]]]></description> <content:encoded><![CDATA[<p></p><p>In the last few weeks, the number of code-related blog posts in the ‘ole CFBlogosphere has skyrocketed – which is just the way I like it. This week I found lots of good material on writing object oriented code.</p><p>This bumper roundup will be the last that I’ll be posting this month – I’m off to Europe for a three week holiday in Poland, Slovenia, Italy and Germany. It’s my first time away in nearly 7 years – but of course, I’ll be thinking of you all… and many thanks to <a
href="http://www.henke.ws/">Mike Henke</a> for sending me something to read on the plane!</p><p><strong>Code &#8211; objects ahoy</strong></p><p>Ben Nadel continues his adventure into learning object oriented programming with <a
href="http://www.bennadel.com/index.cfm?dax=blog:1278.view">More Thoughts On MVC, OOP, And Form Submissions In ColdFusion</a> and then <a
href="http://www.bennadel.com/index.cfm?dax=blog:1279.view">OOPhoto Prototype &#8211; Understanding The Interface Before Defining The Domain Model</a>. If you’re interested in OO, you will probably want to look into an ORM or object relational mapper framework to take some of the tedium out of creating objects. Bob Silverberg has written a series of posts on how he uses Transfer ORM. There’s now six parts, and they make an excellent read (hat tip to <a
href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/Bob_Silverberg_on_Transfer_ORM_and_Architecture">Sean Corfield</a>):<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><ul><li><a
href="http://www.silverwareconsulting.com/index.cfm/2008/6/23/How-I-Use-Transfer--Part-I--Introduction">How I Use Transfer &#8211; Part I – Introduction</a></li><li><a
href="http://www.silverwareconsulting.com/index.cfm/2008/6/24/How-I-Use-Transfer--Part-II--Model-Architecture">How I Use Transfer &#8211; Part II &#8211; Model Architecture</a></li><li><a
href="http://www.silverwareconsulting.com/index.cfm/2008/6/30/How-I-Do-Transfer--Part-III--Abstract-Objects">How I Use Transfer &#8211; Part III &#8211; Abstract Objects</a></li><li><a
href="http://www.silverwareconsulting.com/index.cfm/2008/7/3/How-I-Use-Transfer--Part-IV--My-Abstract-Service-Object">How I Use Transfer &#8211; Part IV &#8211; My Abstract Service Object</a></li><li><a
href="http://www.silverwareconsulting.com/index.cfm/2008/7/8/How-I-Use-Transfer--Part-V--A-Concrete-Service-Object">How I Use Transfer &#8211; Part V &#8211; A Concrete Service Object</a></li><li><a
href="http://www.silverwareconsulting.com/index.cfm/2008/7/8/How-I-Use-Transfer--Part-V1--A-Comment-and-Response">How I Use Transfer &#8211; Part V.1 &#8211; A Comment and Response</a></li></ul><p>If you’re writing OO code already or are using a CFC-heavy framework, you may have been affected by the ColdFusion 8/Java 6 “classLoader” bug, which can affect startup times. <a
href="http://www.ghidinelli.com/about/">Brian Ghidinelli</a> did some experiments on a model-glue application and suggests that the bug is less prevalent on “cold” restarts (restart of CF completely) versus “warm” application reinitialization. Useful information for anyone having issues with this bug!</p><p>But wait, there’s more… a TON more:</p><ul><li>The cfSearching blog includes a handy code snippet for <a
href="http://cfsearching.blogspot.com/2008/07/what-fonts-are-available-in-myjvm.html">generating sample images of all the fonts available in your JVM</a> – meaning fonts that are available for use in CFDOCUMENT, CFREPORT and in image generation functions. Good to know!</li><li>Interested in Lucene, the open source Java search engine? Sami Hoda has written two posts on using the Seeker wrapper for Lucene &#8211; <a
href="http://www.bytestopshere.com/post.cfm/coldfusion-lucene-installing-seeker">ColdFusion &amp; Lucene: Installing Seeker</a>, which slipped under the radar last week, and now <a
href="http://www.bytestopshere.com/post.cfm/coldfusion-lucene-running-the-demos">ColdFusion &amp; Lucene: Running the Demos</a>. Lucene is an Apache project and makes a good alternative to Verity for powering CFML site search</li><li>Doug Boude (rhymes with loud, ok?) explores <a
href="http://www.dougboude.com/blog/1/2008/07/Basic-Security-in-Fusebox-55x-sans-XML.cfm">basic security in Fusebox 5.5 – the flavor without XML controllers</a>. As is often true of blogs posts, there are a couple of interesting comments on the post.</li><li>Raymond Camden’s “Ask a Jedi” series this week includes answers to questions about <a
href="http://www.coldfusionjedi.com/index.cfm/2008/7/5/Ask-a-Jedi-Sorting-a-2D-Array">sorting a multi-dimensional array</a>, <a
href="http://www.coldfusionjedi.com/index.cfm/2008/7/2/Ask-a-Jedi-Issue-with-datefield-and-mask">datefields and masks</a>, and <a
href="http://www.coldfusionjedi.com/index.cfm/2008/7/3/Ask-a-Jedi-Trouble-with-ColdFusionAjaxSubmitForm">ColdFusion.Ajax.SubmitForm</a></li><li>Nic Tunney and Mike Henke both posted lists last week of “under-utilized” features – this week Simon Horwith adds an extra <a
href="http://www.horwith.com/index.cfm/2008/7/2/frequently-under-implemented-cf-functions">two underutilised CFML functions: setVariable and structAppend</a></li><li>Steve Bryant has posted <a
href="http://www.bryantwebconsulting.com/blog/index.cfm/2008/7/2/An-Introduction-to-Writing-Unit-Tests-with-CFUnit">an introduction to writing unit tests with CFUnit</a></li><li>Kai Koenig often writes and presents about internationalization issues – this week <a
href="http://www.bloginblack.de/archives/000984.cfm">he explains away the mystery behind some characters specific to the German language</a></li><li>Michael Sharman reminds us <a
href="http://www.chapter31.com/2008/07/08/dont-forget-the-coldfusion-site-wide-error-handler/">Don’t forget the ColdFusion site-wide error handler</a></li><li>Sami Hoda&#160; posts information on <a
href="http://www.bytestopshere.com/post.cfm/session-info-new-tools-for-session-scope-lovers">new tools for session scope lovers</a> &#8211; I didn’t realize people were so passionate about scopes!</li><li><a
href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/Explaining_StructCopy">Sean Corfield explains StructCopy</a></li></ul><p><strong>Community</strong></p><p>A heads-up from <a
href="http://www.webbschofield.com/index.cfm/2008/7/3/ColdFusion-free-eseminars">Kristin Schofield, Adobe ColdFusion product manager about the online eSeminars</a> that Adobe run each week. As well as those run from the US office, <a
href="http://events.adobe.co.uk/cgi-bin/main.cgi?country=pa">Adobe also run eSeminars from the Asia Pacific office</a>, which anyone can attend.</p><p>Raymond Camden has had a lot to say &#8211; and mostly not positive things &#8211; about the Adobe ColdFusion certification process in recent weeks. This week he has posted what he says is his last post on the topic: <a
href="http://www.coldfusionjedi.com/index.cfm/2008/7/2/My-last-post-on-Adobe-Certification">My last post on Adobe Certification</a>. <a
href="http://www.creative-restraint.co.uk/blog/index.cfm/2008/7/5/Adobe-ColdFusion-Certification-and-Training">Andy Allan has also posted his views as an Adobe certified instructor</a>.</p><p>CFConversations, the new podcast put together by Brian Meloche, has now hit <a
href="http://www.brianmeloche.com/blog/index.cfm/2008/7/5/CFConversations-6-Interview-2--Michael-Smith-of-Teratech--070508">episode 6, an interview with Michael Smith of Teratech</a>.</p><p>And for something totally bad-ass: <a
href="http://critterscode.com/2008/06/29/old-school-coldfusion-the-bolt-has-been-inked/">Critter Gewlas has gotten an old-school ColdFusion logo tattoo</a> – now that’s commitment!</p><p><strong>Alternative CFML engines</strong></p><p>From Matt Woodward over at the Open BlueDragon camp comes a screencast on <a
href="http://www.mattwoodward.com/blog/index.cfm?event=showEntry&amp;entryId=EAC9C159-D4AA-C025-5FA0A6850E6E86E8">how to integrate BlazeDS into OpenBD to allow Flex remoting</a>.</p><p>The licensing of open source projects is a huge topic, and one that has only recently become relevant to much of the CFML community. <a
href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/Open_Source_Licenses__Two_useful_summaries">Sean Corfield points to two helpful summaries of open source licenses</a>, one written by <a
href="http://www.petefreitag.com/item/533.cfm">Pete Freitag some time ago</a> and another <a
href="http://www.gskinner.com/blog/archives/2008/07/source_code_lic_1.html">more recent (and more in-depth) article by Grant Skinner</a>. There’s been a bit of discussion about new licensing for the ExtJS libraries that are included in ColdFusion 8. Sami <a
href="http://www.bytestopshere.com/post.cfm/brewing-controversy-surround-extjs">Hoda has posted about the issue</a> – and there are some excellent explanations in the comments.</p><p>However, not everyone is jumping to open source alternatives: David Tucker has written an article for O’Reilly’s Inside RIA about why, after evaluating all the options available to him, he <a
href="http://www.insideria.com/2008/07/why-i-just-purchased-an-adobe.html">chose to purchase a license of Adobe ColdFusion</a> (hat tip to <a
href="http://www.forta.com/blog/index.cfm/2008/7/2/David-Tucker-Bought-ColdFusion-And-Tells-Why">Ben Forta</a>). He makes some good points!</p><p>Finally, if news of my upcoming trip makes you envious, how about a ColdFusion cruise? <a
href="http://www.riadventure.com/">RIA Adventure</a> is billed as networking event – a cruise through the Bahamas with like-minded ColdFusion, Flex and RIA developers, but without speakers or sessions. Organised for February 2009 by <a
href="http://www.usefulconcept.com">Joshua Cyr</a>, this cruise looks like a ton of geeky fun – and <a
href="http://www.thecrumb.com/2008/07/07/riadventure-geek-cruise/">Jim Priest has even written a theme song</a>.</p><p>That’s all for now, folks… keep coding and I’ll talk to you all in August.</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/the-week-in-coldfusion-2-8-july-object-oriented-cfml-for-fun-and-profit/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>The Week In ColdFusion: June 25-July 1: An unconference, a new book and a boatload of code</title><link>http://www.sitepoint.com/the-week-in-coldfusion-june-25-july-1-an-unconference-a-new-book-and-a-boatload-of-code/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-week-in-coldfusion-june-25-july-1-an-unconference-a-new-book-and-a-boatload-of-code</link> <comments>http://www.sitepoint.com/the-week-in-coldfusion-june-25-july-1-an-unconference-a-new-book-and-a-boatload-of-code/#comments</comments> <pubDate>Thu, 03 Jul 2008 15:07:01 +0000</pubDate> <dc:creator>Kay Smoljak</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/blogs/?p=2594</guid> <description><![CDATA[Last week there were lots of announcements and the odd bit of controversy in the ‘ol CFML blogosphere… this week, not so much. However, I do have some tasty code posts for you and some even tastier open source news – bon appetit! Code Interested in learning object-oriented programming? Join Ben Nadel as he builds [...]]]></description> <content:encoded><![CDATA[<p></p><p>Last week there were lots of announcements and the odd bit of controversy in the ‘ol CFML blogosphere… this week, not so much. However, I do have some tasty code posts for you and some even tastier open source news – <em>bon appetit</em>!</p><p><strong>Code</strong></p><ul><li>Interested in learning object-oriented programming? <a
href="http://www.bennadel.com/index.cfm?dax=blog:1275.view">Join Ben Nadel as he builds a photo gallery application using OO techniques</a> – and knowing Ben’s hands-on learn-as-you-go blogging style, this will be comprehensive!</li><li>Nick Tong shares a code snippet to <a
href="http://www.succor.co.uk/index.cfm/2008/6/30/Quickly-exporting-a-table-into-a-CSV">export the contents of a table into a CSV file</a>, using the Java StringBuffer</li><li>Rupesh Kumar from Adobe’s engineering team in India <a
href="http://coldfused.blogspot.com/2008/06/new-attribute-in-cfdocumentitem.html">discusses the “EvalAtPrint’ attribute in the CFDocumentItem tag</a>, new in CF 8.0.1</li><li>Troy Pullis shares some helpful checks to <a
href="http://blog.webdh.com/index.cfm/2008/6/25/Useful-checks-to-test-for-XSS-attacks-on-your-ColdFusion-site">test your code’s vulnerability to XSS (cross site scripting) attacks</a> (hat tip to <a
href="http://www.bryantwebconsulting.com/blog/index.cfm/2008/6/30/CFBlogPicks-June-30-2008">Steve Bryant</a>)</li><li>Nic Tunney posts his <a
href="http://www.nictunney.com/index.cfm?mode=entry&amp;entry=E1E350D7-FF61-56C5-E94CA390F9B3D0F0">top 6 underused ColdFusion functions</a> (hat tip to <a
href="http://henke.ws/machblog/index.cfm?event=showEntry&amp;entryId=E6426A21-19B9-BA51-EE61D9CD9814C4F1">Mike Henke</a>) – ListQualify() anyone?</li></ul><p>Coding, debugging and testing tools is an important topic that all too often gets overlooked. The <a
href="https://secure.houseoffusion.com/vol2issue4.cfm">latest Fusion Authority Quarterly Report</a> is all about development environments, and has an excellent set of articles on setting up and using Subversion, as well as the various development platform and IDE options available to the CFML developer. In the same vein, <a
href="http://henke.ws/machblog/index.cfm?event=showEntry&amp;entryId=E6426A21-19B9-BA51-EE61D9CD9814C4F1">Mike Henke posts his top 6 underused shortcuts for CFEclipse</a>, and <a
href="http://www.mischefamily.com/nathan/index.cfm/2008/6/29/ColdFire-12-Released">Nathan Mische announces the release of ColdFire 1.2</a>, the ColdFusion extension for Firefox’s Firebux debugging extension. I’m embarrassed to say I haven’t used ColdFire yet, but that’s something I intend to remedy this week.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p><strong>Community</strong></p><p>The <a
href="http://max.adobe.com/na/experience/#?s=0&amp;p=0">Adobe MAX conference (US) web site has launched</a> (hat tips to <a
href="http://www.forta.com/blog/index.cfm/2008/6/25/MAX-2008-Sessions-Posted">Ben Forta</a>, <a
href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/MAX_2008_Sessions_and_Speakers">Sean Corfield</a> and <a
href="http://www.coldfusionjedi.com/index.cfm/2008/6/25/MAX-Website-up-Sessions-Listed-including-mine">Raymond Camden</a>) with 28 ColdFusion sessions – as Sean points out, that’s a good amount compared to the coverage that some of the other Adobe products get.</p><p>Raymond Camden is asking for <a
href="http://www.coldfusionjedi.com/index.cfm/2008/7/1/Bribery-for-the-ColdFusion-Cookbook-and-looking-for-a-grunt-or-two">help in fleshing out the ColdFusion Cookbook</a> web site. Do you have a question (preferably one with an answer)? Submit it and you could win a book. Ray also has posted <a
href="http://www.coldfusionjedi.com/index.cfm/2008/6/25/Ask-a-Jedi-Followup-on-Certification">some interesting comments on certification and memorization</a>. And, always one with his fingers in multiple pies, <a
href="http://www.coldfusionjedi.com/index.cfm/2008/6/26/Announcing-the-ColdFusion-Unconference-at-MAX">Ray has also announced that he will be leading a ColdFusion ‘unconference’ at the Adobe MAX conference</a>. That’s an interesting approach for Adobe to take and I think it could work out really well – we had a series of CFCAMP barcamp-style events with Adobe’s help in Australia last year, and they were a huge success.</p><ul><li><a
href="http://john.beynon.org.uk/2008/06/26/my-vote-for-a-cf-staging-license/">John Beynon thinks there should be a “staging” license</a> of Adobe’s ColdFusion server. What do you think?</li><li>Sammy Larbi has some more advice for the ambitious developer: <a
href="http://www.codeodor.com/index.cfm/2008/6/27/Save-Your-Job-Release-Your-Code/2320">if you want to be well known, release your code</a></li><li>John Farrar’s ColdFusion 8 book is now shipping! It’s available <a
href="http://www.packtpub.com/coldfusion-8-developer-tutorial/book">straight from the publishers</a> in paper or PDF format, or through <a
href="http://www.amazon.com/ColdFusion-Developer-Tutorial-John-Farrar/dp/1847194125/">Amazon</a></li></ul><p><strong>Open Source</strong></p><p><a
href="http://www.remotesynthesis.com/post.cfm/coldfusion-open-source-update-june-30-2008">Brian Rinaldi’s Open Source Update</a> has been going out weekly now for over 2 years! Congratulations Brian and thanks for keeping us up to date with all the good open source stuff. This week, two new projects and four updates, as well as some useful articles on Transfer, varScoper, and ColdFire. Also this week, <a
href="http://www.remotesynthesis.com/post.cfm/making-the-move-to-mango">Brian has moved his blog to Mango</a>, the fairly new <a
href="http://www.mangoblog.org/">open source blogging engine</a> from Laura Arguello. I’m using Mango in some commercial jobs right now and it’s a very sophisticated piece of software.</p><p>ColdBox announced earlier this year that they were going to move to a Professional Open Source Software project. Rob Gonda has announced that as part of that transition, <a
href="http://www.robgonda.com/blog/index.cfm/2008/6/26/ColdBox-Training-Partnership-with-Rachel-Queen-Services-Group-LLC-and-Ortus-Solutions-Corp">partnerships have been announced with several companies to offer ColdBox training and curriculum development</a>.</p><ul><li><a
href="http://www.railo.ch/blog/index.cfm/2008/6/27/Railo-30-Beta-2-300002">Railo 3.0 beta 2 has been released</a>, with several improvements which Michael Streit explains on the offical Railo blog. <a
href="http://www.barneyb.com/barneyblog/2008/06/27/railo-3-beta-2/">Barney Boisvert talks about the significance of the array and struct improvements</a>, and <a
href="http://www.coldfusionjedi.com/index.cfm/2008/6/27/Second-beta-of-Railo-3-out">Raymond Camden points out the new variable scope handling options</a>.</li><li>Matt Woodward has posted a seven minute <a
href="http://www.mattwoodward.com/blog/index.cfm?event=showEntry&amp;entryId=C0A2248E-ABD8-2546-C5612182F3A679E5">screencast which shows how to build an Open BlueDragon WAR from the source code on OSX</a>.</li></ul><p>That’s all for now. If you have a tip for me, email kay at smoljak dot com, leave a comment or tag your links in del.icio.us with for:kay.smoljak. And remember: a CFFUNCTION a day keeps the .NET away…</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/the-week-in-coldfusion-june-25-july-1-an-unconference-a-new-book-and-a-boatload-of-code/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>The Week in ColdFusion: 18-24 June: CFML, Fast and Furious</title><link>http://www.sitepoint.com/the-week-in-coldfusion-18-24-june-cfml-fast-and-furious/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-week-in-coldfusion-18-24-june-cfml-fast-and-furious</link> <comments>http://www.sitepoint.com/the-week-in-coldfusion-18-24-june-cfml-fast-and-furious/#comments</comments> <pubDate>Fri, 27 Jun 2008 01:58:25 +0000</pubDate> <dc:creator>Kay Smoljak</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/blogs/?p=2582</guid> <description><![CDATA[One of the big topics this week has been the announcement of the CFML Advisory Committee at CFUnited. This group, headed up by Sean Corfield, includes members of the Adobe ColdFusion community and the Railo community, but notably no one from the Open BlueDragon camp. Ben Forta has posted his thoughts on the committee, and [...]]]></description> <content:encoded><![CDATA[<p></p><p>One of the big topics this week has been the <a
href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/CFML_Advisory_Committee">announcement of the CFML Advisory Committee at CFUnited</a>. This group, headed up by Sean Corfield, includes members of the Adobe ColdFusion community and the Railo community, but notably no one from the Open BlueDragon camp. <a
href="http://www.forta.com/blog/index.cfm/2008/6/19/Thoughts-On-The-CFML-Language-Advisory-Committee">Ben Forta has posted his thoughts on the committee</a>, and a dialogue of sorts between Ben and Alan Williamson from Open BlueDragon resulted in the comments. <a
href="http://alan.blog-city.com/cfml_world.htm">Alan decided to introduce himself to the ColdFusion community</a> as well as address some of the controversy, <a
href="http://www.reybango.com/index.cfm/2008/6/19/The-OpenBD-Issue--My-Reply-to-Alan-Williamson">prompting a response from Rey Bango</a> (again with involved discussions in the comments). The soap opera will no doubt continue and I’m hesitant to devote any more column space to it, but I think the committee itself is a step in the right direction to ensure the CFML language stays consistent amongst multiple implementations, and hopefully whatever the outcome of the drama, it will be for the benefit of the CFML community.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>In fact, there’s already good signs that the community is serious about interoperability: Barney Boisvert reports that <a
href="http://www.barneyb.com/barneyblog/2008/06/23/railo-fixes-arrays-and-structs/">Railo has implemented the same underlying mechanisms for arrays and structs</a> as Adobe ColdFusion and Open BlueDragon.</p><p>On the flip side, David Shuck questions <a
href="http://daveshuck.instantspot.com/blog/2008/06/18/Adobes-actions-speak-loudly-about-their-lack-of-support-for-ColdFusion">why Adobe’s marketing department seems to be out of the ColdFusion loop</a>, omitting it from marketing materials related to Flex where it really should be pushed (<a
href="http://www.henke.ws/">hat tip and sincere thanks to Mike Henke</a>). From Adobe, Ben Forta (king of evangelists), Kristen Schofield (ColdFusion product manager) and Rachel Luxemburg (community manager) all responded in the comments.</p><p>Right, with that out the way, let’s get onto some information that’s actually useful!</p><p><strong>Code</strong></p><p>Feel like digging around in the internals of ColdFusion server? Inspired by Elliott Sprehn&#8217;s presentation at CFUnited (more on that conference is coming in a separate post), Dan Vega has been doing just that – check out what he found out about the <a
href="http://www.danvega.org/blog/index.cfm/2008/6/24/ColdFusion-Structures-under-the-hood">implementation of structures</a>, <a
href="http://www.danvega.org/blog/index.cfm/2008/6/25/ColdFusion-Array-Dimension-Size">how to find the number of dimensions in an array</a>, <a
href="http://www.danvega.org/blog/index.cfm/2008/6/23/Random-Right-on-your-page">random number generation</a> and <a
href="http://www.danvega.org/blog/index.cfm/2008/6/23/ColdFusion-Dump-All-Scopes-Utility">how to dump all scopes</a>.</p><p>ColdFusion Jedi Master Raymond Camden regularly posts answers to questions that readers ask him in his “Ask a Jedi” series. This week, he responds to a question about <a
href="http://www.coldfusionjedi.com/index.cfm/2008/6/23/Ask-a-Jedi-Mixing-ColdFusion-Ajax-and-CFCALENDAR">using ColdFusion Ajax with CFCALENDAR</a>, as well as a <a
href="http://www.coldfusionjedi.com/index.cfm/2008/6/23/Ask-a-Jedi-Complex-security-possible-in-ColdFusion">question about a complex security scenario</a>, a frequently asked question about <a
href="http://www.coldfusionjedi.com/index.cfm/2008/6/21/ColdFusion-8-Ajax-Browser-Support">browser support for ColdFusion Ajax components</a> and gives a <a
href="http://www.coldfusionjedi.com/index.cfm/2008/6/21/Aska--Jedi-URL-Rewriting-example">URL rewriting example</a>. He also posts on <a
href="http://www.coldfusionjedi.com/index.cfm/2008/6/19/Clearing-individual-filesfolders-from-ColdFusion-templates-cache">clearing individual files/folders from ColdFusion’s template cache</a>. Phew – Ray, you’re a blogging machine!</p><p>Also on code, briefly:</p><ul><li>Steve “Cutter” Blades discusses <a
href="http://blog.cutterscrossing.com/index.cfm/2008/6/22/Build-Applications-That-Scale">how to build applications that scale</a> in a very interesting case study format</li><li>Brian Ghidinelli shows us how to <a
href="Building reusable form views with Model-Glue">build reusable form views with Model-Glue</a></li><li>Ben Nadel warns us to <a
href="http://www.bennadel.com/index.cfm?dax=blog:1270.view">be careful when using # in DE() expressions</a></li><li>Mark Kruger talks about <a
href="http://www.coldfusionmuse.com/index.cfm/2008/6/21/portable-coldfusion-linux-and-windows">writing portable ColdFusion code</a> – for Windows and Linux/Mac servers</li><li>Oscar Arevalo tries out <a
href="http://www.oscararevalo.com/index.cfm/2008/6/20/Using-HomePortals-and-ColdBox-Together">HomePortals and ColdBox together</a> with interesting results</li><li>Madfella Justin Carter has released a <a
href="http://www.madfellas.com/blog/index.cfm/2008/6/20/ColdExt-Beta-2-Preview">preview of ColdExt Beta 2</a>, the ExtJS library for ColdFusion</li><li><a
href="http://www.succor.co.uk/index.cfm/2008/6/20/TQL-and-params-lexicon-update">Nick Tong has updated his Fusebox lexicon for Transfer ORM</a></li></ul><p>Charlie Griefer has written an article for Pakt Publishing on <a
href="http://www.packtpub.com/article/coldfusion-8-enhancements-you-may-have-missed">lesser-known features in ColdFusion 8</a> (<a
href="http://www.forta.com/blog/index.cfm/2008/6/19/Charlie-Griefer-On-Lesser-Known-CF8-Enhancements">hat tip to Ben Forta</a>). Pakt will be releasing <a
href="http://www.packtpub.com/coldfusion-8-developer-tutorial/book">John Farrar’s new book on ColdFusion</a> this month – good to see another niche tech publisher supporting the ColdFusion community. If you didn’t see it before, <a
href="http://www.sitepoint.com/article/coop-coldfusion-framework">read an interview with John Farrar about his COOP framework here on SitePoint</a>.</p><p><strong>Open Source</strong></p><p>Brian Rinalidi is out there combing through RIAForge and other sources so we don’t have to – this week, his <a
href="http://www.remotesynthesis.com/blog/index.cfm/2008/6/23/ColdFusion-OpenSource-Update--June-23-2008">Open Source Update</a> reports five new projects – including a Twitter client and a new event-driven model framework by Sean Corfield &#8211; and four updates as well as some announcements concerning frameworks and a ton of tutorials, presentations and reviews. Thanks Brian, and keep up the good work!</p><p>The <a
href="http://www.farcrycore.org/">FarCry Framework/CMS has a new web site</a> &#8211; looking good, guys! If you didn’t see it the first time around, read <a
href="http://www.sitepoint.com/article/geoff-bowers-farcry-framework">an interview with Geoff Bowers about FarCry on SitePoint</a> – hey, you didn’t mention then that a new site was in the works, Geoff…</p><p><strong>ColdFusion 9 Discussion</strong></p><p>After the CFUnited “sneak peak” of what the Adobe team are working on for ColdFusion 9, there’s been some discussion of one of the proposed new features: hibernate integration. Mark Mandel, author of the popular Transfer ORM framework (<a
href="http://www.sitepoint.com/blogs/2008/06/09/10-questions-for-mark-mandel-on-transfer-orm/">read 10 questions with Mark about his product here</a>) has written <a
href="http://www.compoundtheory.com/?action=displayPost&amp;ID=332">a pre-emptive post addressing concerns that CF9+Hibernate signals the end of Transfer</a>. After thinking on the topic, <a
href="http://cfsilence.com/blog/client/index.cfm/2008/6/23/More-On-CFHibernate--Do-We-Need-A-CFValidate-Tag">Todd Sharp suggests that a CFVALIDATE tag could be a useful enhancement</a> to Hibernate integration.</p><p><strong>Community</strong></p><p>The new CFConversations podcast is flying along – already, Brian Meloche has posted episodes 2, 3 <a
href="http://www.brianmeloche.com/blog/index.cfm/2008/6/23/Episode-4-of-CFConversations-is-out">and now 4, recorded on day 3 of CFUnited</a>. The main issue discussed is how to promote CFML outside of the ColdFusion community – and Brian has also <a
href="http://www.brianmeloche.com/blog/index.cfm/2008/6/23/Promoting-CFML-Outside-of-the-CFML-Community--Results">posted the results of his CFUnited ‘Community session’ on this topic</a>. Some good ideas there!</p><p>Related to last week’s outcry about code commenting practices, Sam Larbi posts about <a
href="http://www.codeodor.com/index.cfm/2008/6/18/Common-Excuses-Used-To-Comment-Code-and-What-To-Do-About-Them/2293">Common Excuses Used To Comment Code and What To Do About Them</a>.</p><p>Thanks for reading and keep coding CFML – it makes your hair curly! If you have a tip for me, email kay at smoljak dot com, leave a comment or tag the link in del.icio.us with for:kay.smoljak.</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/the-week-in-coldfusion-18-24-june-cfml-fast-and-furious/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>The Week in ColdFusion: 11–17 June: ColdFusion 9 sneak peak leaks</title><link>http://www.sitepoint.com/the-week-in-coldfusion-11%e2%80%9317-june-coldfusion-9-sneak-peak-leaks/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-week-in-coldfusion-11%25e2%2580%259317-june-coldfusion-9-sneak-peak-leaks</link> <comments>http://www.sitepoint.com/the-week-in-coldfusion-11%e2%80%9317-june-coldfusion-9-sneak-peak-leaks/#comments</comments> <pubDate>Thu, 19 Jun 2008 15:34:50 +0000</pubDate> <dc:creator>Kay Smoljak</dc:creator> <category><![CDATA[ColdFusion]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/blogs/?p=2572</guid> <description><![CDATA[Scotch on the Rocks and WebDU were last week (see my WebDU Day 1 post here) and CFUnited is now underway. It looks like CFUnited will generate heaps of blog posts, so I’ll probably have a separate conference round up after it’s over – but for now, a few advance details for ColdFusion 9 (coming [...]]]></description> <content:encoded><![CDATA[<p></p><p>Scotch on the Rocks and WebDU were last week (<a
href="http://www.sitepoint.com/blogs/2008/06/19/webdu-day-1-air-ajax-cs4-and-a-little-bit-of-usability/">see my WebDU Day 1 post here</a>) and CFUnited is now underway. It looks like CFUnited will generate heaps of blog posts, so I’ll probably have a separate conference round up after it’s over – but for now, <a
href="http://www.insideria.com/2008/06/coldfusion-9-details.html">a few advance details for ColdFusion 9</a> (coming sometime in 2009) were slipped out in the keynote address. Among these:</p><ul><li>Hibernate ORM will be “baked in”</li><li>AIR integration will allow online and offline applications</li><li>ColdFusion will be free for educational institutions</li><li>Language updates will include a LOCAL variables scope</li><li>a CFML Advisory Committee headed up by Sean Corfield will guide the development of the language</li></ul><p>I’ve said it before, and so have many others – it’s an exciting time to be a ColdFusion developer. I don’t think there’s been a period of growth and change like we’ve seen in the last six months in the entire 11 year history of the platform.</p><p>Back our regularly scheduled program!<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p><strong>Community </strong></p><p>First some sad news &#8211; the ColdFusion Weekly podcast has called it a day. <a
href="http://blog.maestropublishing.com/index.cfm?mode=entry&amp;entry=8CBFD882-1372-3F66-7094A4257D558496">Co-host Peter J. Farrell explains that the team simply didn’t have time to devote to the show</a>. The archives will remain available, so if you don’t have them all, collect the set! <a
href="http://blog.crankybit.com/favorite-coldfusion-weekly-episodes/">Josh Curtiss points to some of his favourite episodes</a>.</p><p>Then some good news – a <a
href="http://www.cfconversations.com/">new podcast called CFConversations</a> has been started by Brian Meloche. At the moment there are two roundtable episodes: the first a discussion of conference news, jobs, CF9 rumours, and open source, amongst other topics; and the second a summary of Day 1 at CFUnited. I’ve only listened to the first one so far, but it was worth the time invested and I’ll definitely be checking out future episodes.</p><p>With the Railo announcement, there has been a lot of discussion about the future of ColdFusion. Peter Bell has written a series of four articles (plus a couple of bonuses) on where he thinks the language might be heading.</p><ul><li><a
href="http://www.pbell.com/index.cfm/2008/6/10/The-Future-of-ColdFusion-Part-1--The-Changing-Landscape">Part 1 – The Changing Landscape</a></li><li><a
href="http://www.pbell.com/index.cfm/2008/6/11/The-Future-of-ColdFusion-Part-2--Adobe">Part 2 – Adobe</a></li><li><a
href="http://www.pbell.com/index.cfm/2008/6/16/The-Future-of-ColdFusion-Part-3--Railos-Release">Part 3 – Railo’s Release</a></li><li><a
href="http://www.pbell.com/index.cfm/2008/6/17/The-Future-of-ColdFusion-Part-4--Whither-ColdFusion">Part 4 – Whither ColdFusion</a></li><li><a
href="http://www.pbell.com/index.cfm/2008/6/17/The-Future-of-ColdFusion-What-about-Blue-Dragon">What about BlueDragon?</a></li><li><a
href="http://www.pbell.com/index.cfm/2008/6/18/The-Future-of-ColdFusion-Adobes-CF-United-Keynote">Adobe’s CFUnited Keynote</a></li></ul><p>Sammy Larbi posts an interesting philosophical piece on why <a
href="http://www.codeodor.com/index.cfm/2008/6/16/Making-Mistakes-Is-Fundamental-To-Understanding/2290">Making Mistakes Is Fundamental To Understanding</a>.</p><p><strong>Code</strong></p><p>There have been lots of juicy code posts this week:</p><ul><li><a
href="http://www.coldfusionmuse.com/index.cfm/2008/6/16/cfc.application.variables">Mark Kruger discusses issues with scoping of variables in CFCs</a> when using tags, such as CFHTTP, that create their own scope.</li><li>Steve Bryant talks about <a
href="http://www.bryantwebconsulting.com/blog/index.cfm/2008/6/13/Components-and-CFTHREAD">Components and CFTHREAD</a></li><li>Raymond Camden answers a question from a reader having a <a
href="http://www.coldfusionjedi.com/index.cfm/2008/6/13/Ask-a-Jedi-Problem-using-onMissingMethod-inside-a-CFC">problem with using onMissingMethod inside a CFC</a></li><li>Ben Nadel presents his <a
href="http://www.bennadel.com/index.cfm?dax=blog:1264.view">partial entry to Steve Levithan’s regular expression contest</a> and <a
href="http://www.bennadel.com/index.cfm?dax=blog:1262.view">posts about some of the intricacies of CFCATCH</a></li><li>Brian Kotek answers reader questions on <a
href="http://www.briankotek.com/blog/index.cfm/2008/6/16/Ask-Brian-Handling-Custom-Object-Behavior">Handling Custom Object Behavior</a> and <a
href="http://www.briankotek.com/blog/index.cfm/2008/6/12/Ask-Brian-How-to-Handle-Object-Composition">How to Handle Object Composition</a></li><li>Peter J Farrell points out that <a
href="http://blog.maestropublishing.com/index.cfm?mode=entry&amp;entry=744DD790-1372-3F66-70E9AB33EBEFE232">CreateUUID is slow, and tells us to use a Hash instead</a></li><li>Anuj Gakhar posts his thoughts about <a
href="http://www.anujgakhar.com/2008/06/15/transfer-first-thoughts/">giving Transfer a try</a></li><li>Kevan Stannard posts about <a
href="http://stannard.net.au/blog/index.cfm/2008/6/13/Nested-Set-Trees-in-ColdFusion-v02">Nested Set Trees in ColdFusion</a></li><li>SitePoint have published a <a
href="http://www.sitepoint.com/article/coldfusion-components">tutorial on ColdFusion Components by Ben Davies</a></li></ul><p>Finally, a copy of the latest <a
href="https://secure.houseoffusion.com/vol2issue4.cfm">Fusion Authority Quarterly Update</a> landed on my desk this week. Subtitled “Do More &#8211; Code Less!” this issue is dedicated to best practises and development environment tips. I’m only partway through but there’s a series of three articles on setting up and using Subversion that look very, very good.</p><p>I’m still recovering from WebDU – a wrap of the second day will be coming soon, as well as a summary of the very interesting final “speaker panel” session – interesting particularly because almost all of the questions asked were about ColdFusion, which only made up one quarter of the conference program.</p><p>Got a tip for me? Leave a comment, tag for:kay.smoljak in del.icio.us or send an email or carrier pigeon to kay at smoljak dot com. Otherwise, I’ll see you all next week – same time (approximately), but definitely same location!</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/the-week-in-coldfusion-11%e2%80%9317-june-coldfusion-9-sneak-peak-leaks/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 71/73 queries in 0.049 seconds using memcached
Object Caching 1413/1418 objects using memcached
Content Delivery Network via cdn.sitepoint.com

Served from: www.sitepoint.com @ 2012-02-08 22:25:24 -->
