<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>RSS feed for InstantSpot site Blog of Dave</title><link>http://daveshuck.instantspot.com</link><description>Dave Shuck&apos;s ramblings on - ColdFusion, Flex, and Java, and life.</description><language>en-us</language><copyright>This work is Copyright &#xA9; 2010 by Blog of Dave</copyright><generator>RSSVille ColdFusion FeedMaker, version 1.0</generator><pubDate>Thu, 11 Mar 2010 22:52:47 GMT</pubDate><item><title>Need a &quot;rock star&quot; ColdFusion speaker for 7/30/2010 event in Dallas</title><link>http://daveshuck.instantspot.com/blog/2010/03/03/Need-a-rock-star-ColdFusion-speaker-for-7302010-event-in-Dallas/</link><description>Last year was the second annual &lt;a href=&quot;http://www.dallastechfest.com&quot;&gt;Dallas TechFest&lt;/a&gt;, which is a 1-day multi-platform event centered around programming.&amp;nbsp; They approached me at that time about bringing ColdFusion into the event, and giving us a dedicated track in one of the rooms.&amp;nbsp; I made a optimistic claim that we could bring in 50+ CFML devs from the area, and low and behold, we ended up with 70+ people that registered with the discount code from &lt;a href=&quot;http://www.dfwcfug.org&quot;&gt;our user group&lt;/a&gt;.&amp;nbsp; It was very successful and had a good buzz with the local community.&amp;nbsp; Additionally, we blew the PHP and Ruby groups out of the water! :)&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;For 2010, the organizers have offered a travel and expenses budget to to each track (CF being one of those) to pay for travel and expenses to get one &quot;rock star&quot; from each of the technologies. Based on last year&apos;s attendees, I would say that a large percentage were beginner-intermediate, with our regular core of advanced guys around as well.&amp;nbsp; The event will be on Friday July 30, in Addison.&amp;nbsp; Unfortunately this falls during the same week as &lt;a href=&quot;http://cfunited.com/2010/&quot;&gt;CFUnited&lt;/a&gt;, which obviously zaps a number of speakers from the pool of availability, but if you are interested in speaking, please let me know!&amp;nbsp; I am dshuck pretty much everywhere... gmail, twitter, facebook, etc.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=a89de899-3fe6-8c45-8d90-066016cfdc53&quot; /&gt;&lt;/div&gt;</description><pubDate>Wed, 03 Mar 2010 17:24:55 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2010/03/03/Need-a-rock-star-ColdFusion-speaker-for-7302010-event-in-Dallas/</guid><category>ColdFusion,General,Technology,Conferences,CFML</category></item><item><title>UDF: pcase() - Captilize first letter of each word in a string</title><link>http://daveshuck.instantspot.com/blog/2010/02/25/UDF-pcase--Captilize-first-letter-of-each-word-in-a-string/</link><description>This is a UDF that I keep on hand for converting strings to &quot;proper case&quot;, such as a person&apos;s name.&amp;nbsp; For instance, in a database we might have a name stored like &lt;b&gt;DAVID B. SHUCK&lt;/b&gt;, but when they log into our site and we welcome them, we don&apos;t necessarily want to shout it at them!&amp;nbsp;&amp;nbsp; Saying &quot;Hello David B. Shuck...&quot; would hopefully be a bit less abrasive.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Enter the user-defined function pcase().&amp;nbsp; Through the use of regular expressions we are doing a search for word patterns and capitalizing the first letter in each word.&amp;nbsp; Enjoy!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;cffunction name=&quot;pcase&quot; access=&quot;public&quot; output=&quot;false&quot;  returntype=&quot;string&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfargument name=&quot;string&quot;  type=&quot;string&quot; required=&quot;true&quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfreturn  REReplaceNoCase(LCase(arguments.string),&quot;(^[a-z*]|[ *][a-z*])&quot;,&quot;\U\1\E&quot;,&quot;all&quot;)  /&amp;gt;&lt;br /&gt;&amp;lt;/cffunction&amp;gt;&lt;br /&gt;&lt;/code&gt;</description><pubDate>Thu, 25 Feb 2010 16:34:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2010/02/25/UDF-pcase--Captilize-first-letter-of-each-word-in-a-string/</guid><category>ColdFusion,Tips and Tricks,Technology,CFML,UDF</category></item><item><title>Implicit constructor and CF9 style implicit accessors without ColdFusion 9</title><link>http://daveshuck.instantspot.com/blog/2010/02/25/Implicit-constructor-and-CF9-style-implicit-accessors-without-ColdFusion-9/</link><description>One of the broadly welcomed features of ColdFusion 9 has been the addition of implicit getters and setters to CFCs.&amp;nbsp; What this means is that you no longer have to hand code the repetitive boiler plate getXXX() and setXXX() methods for each property in your model objects. However, you don&apos;t need ColdFusion 9, (or even ColdFusion for that matter) to enjoy the benefits of the new implicit accessors with the version 9 release.&amp;nbsp; Since ColdFusion 8, developers have had access to the OnMissingMethod() method which makes tasks like this very simple to implement on your own.&amp;nbsp; The OnMissingMethod is also available in current versions of OpenBlueDragon and Railo.&lt;br /&gt;&lt;br /&gt;For my implementation of this, I use a standard BaseBean class in a number of my projects which is extended by all of my model class objects.&amp;nbsp; By leveraging the OnMissingMethod() in this BaseBean, I create these implicit accessors, in addition to an implicit constructor &lt;b&gt;init()&lt;/b&gt; method as well.&lt;br /&gt;&lt;br /&gt;There are multiple examples on the internet that show how you can use OnMissingMethod(), but for the most part, the examples that I have come across do not protect the class from being having infinite previously undefined properties added to it from the outside.&amp;nbsp; For instance, I could have a class named Person.cfc with define properties of &quot;firstName&quot; and &quot;lastName&quot;, but nothing would stop someone from doing &lt;b&gt;Person.setThisIsNotAProperty(true)&lt;/b&gt; and that value would be dynamically added to the Person instance.&lt;b&gt;&amp;nbsp; &lt;/b&gt;While some might argue that the flexibility that this approach offers is a positive thing, I prefer to lock my classes down just a bit more.&amp;nbsp; For instance&lt;b&gt; &lt;/b&gt;I like the fact that I can open up a model class and see exactly what properties it can contain with clearly defined &amp;lt;cfproperty/&amp;gt; tags.&amp;nbsp;&amp;nbsp; From a maintainability standpoint the idea of &quot;mystery&quot; dynamic properties strike me as just wrong.&lt;br /&gt;&lt;br /&gt;For my implicit constructor, I take an approach where I loop through any named arguments that were passed, and if the name matches a property that I have defined with &amp;lt;cfproperty/&amp;gt;, then it will be passed to a setter method.&amp;nbsp; Any arguments that are passed that are not defined as a property are discarded.&lt;br /&gt;&lt;br /&gt;So let&apos;s take a look at what this looks like.&amp;nbsp; First I will paste the entire BaseBean, and below we will break it apart to discuss what is going on.&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cfcomponent output=&amp;quot;false&amp;quot;&amp;gt;       &amp;lt;cffunction name=&amp;quot;init&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;BaseBean&amp;quot;&amp;gt;   &amp;lt;cfset var i = &amp;quot;&amp;quot; /&amp;gt;   &amp;lt;cfset initializePropertyList() /&amp;gt;   &amp;lt;cfloop list=&amp;quot;#this.propertyList#&amp;quot; index=&amp;quot;i&amp;quot;&amp;gt;    &amp;lt;cfif StructKeyExists(arguments,i)&amp;gt;     &amp;lt;cfset set(i,arguments[i]) /&amp;gt;    &amp;lt;/cfif&amp;gt;   &amp;lt;/cfloop&amp;gt;     &amp;lt;cfreturn this /&amp;gt;  &amp;lt;/cffunction&amp;gt;      &amp;lt;cffunction name=&amp;quot;initializePropertyList&amp;quot; access=&amp;quot;private&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;void&amp;quot;&amp;gt;   &amp;lt;cfset var i = &amp;quot;&amp;quot; /&amp;gt;   &amp;lt;cfif NOT StructKeyExists(this,&amp;quot;propertyList&amp;quot;)&amp;gt;    &amp;lt;cfset this.propertyList = &amp;quot;&amp;quot; /&amp;gt;    &amp;lt;cfif ArrayLen(GetMetadata(this).properties)&amp;gt;     &amp;lt;cfloop from=&amp;quot;1&amp;quot; to=&amp;quot;#ArrayLen(GetMetadata(this).properties)#&amp;quot; index=&amp;quot;i&amp;quot;&amp;gt;      &amp;lt;cfset this.propertyList = ListAppend(this.propertyList,GetMetadata(this).properties[i].name)&amp;gt;     &amp;lt;/cfloop&amp;gt;    &amp;lt;/cfif&amp;gt;   &amp;lt;/cfif&amp;gt;     &amp;lt;cfreturn /&amp;gt;   &amp;lt;/cffunction&amp;gt;      &amp;lt;cffunction name=&amp;quot;onMissingMethod&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;any&amp;quot;&amp;gt;   &amp;lt;cfargument name=&amp;quot;missingMethodName&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;   &amp;lt;cfargument name=&amp;quot;missingMethodArguments&amp;quot; type=&amp;quot;struct&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;      &amp;lt;cfset var property = &amp;quot;&amp;quot; /&amp;gt;            &amp;lt;cfif ReFindNoCase(&amp;quot;^[gs](et)&amp;quot;,arguments.missingMethodName)&amp;gt;    &amp;lt;cfset property = ReReplaceNoCase(arguments.missingMethodName,&amp;quot;^[gs](et)&amp;quot;,&amp;quot;&amp;quot;) /&amp;gt;    &amp;lt;cfset initializePropertyList() /&amp;gt;     &amp;lt;cfif ListFindNoCase(this.propertyList,property)&amp;gt;     &amp;lt;cfif StructIsEmpty(arguments.missingMethodArguments)&amp;gt;      &amp;lt;cfreturn get(property) /&amp;gt;     &amp;lt;cfelse&amp;gt;      &amp;lt;cfset set(property,arguments.missingMethodArguments[1]) /&amp;gt;      &amp;lt;cfreturn this /&amp;gt;     &amp;lt;/cfif&amp;gt;     &amp;lt;cfelse&amp;gt;     &amp;lt;cfthrow message=&amp;quot;The class #GetMetadata(this).name# does not have a property named #property# so the implicit #arguments.missingMethodName#() method is not available.&amp;quot; /&amp;gt;      &amp;lt;/cfif&amp;gt;    &amp;lt;/cfif&amp;gt;    &amp;lt;cfreturn /&amp;gt;   &amp;lt;/cffunction&amp;gt;    &amp;lt;cffunction name=&amp;quot;get&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;any&amp;quot;&amp;gt;   &amp;lt;cfargument name=&amp;quot;property&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;   &amp;lt;cfset var value = &amp;quot;&amp;quot; /&amp;gt;        &amp;lt;cfset value = variables[arguments.property] /&amp;gt;       &amp;lt;cfreturn value /&amp;gt;   &amp;lt;/cffunction&amp;gt;    &amp;lt;cffunction name=&amp;quot;set&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;void&amp;quot;&amp;gt;   &amp;lt;cfargument name=&amp;quot;property&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;   &amp;lt;cfargument name=&amp;quot;value&amp;quot; type=&amp;quot;any&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;      &amp;lt;cfset variables[arguments.property] = arguments.value /&amp;gt;      &amp;lt;cfreturn /&amp;gt;  &amp;lt;/cffunction&amp;gt;   &amp;lt;/cfcomponent&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Before we walk through the actual flow, I would like to point out the method &lt;b&gt;initializePropertyList()&lt;/b&gt; that you see here:&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cffunction name=&amp;quot;initializePropertyList&amp;quot; access=&amp;quot;private&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;void&amp;quot;&amp;gt;  &amp;lt;cfset var i = &amp;quot;&amp;quot; /&amp;gt;  &amp;lt;cfif NOT StructKeyExists(this,&amp;quot;propertyList&amp;quot;)&amp;gt;   &amp;lt;cfset this.propertyList = &amp;quot;&amp;quot; /&amp;gt;   &amp;lt;cfif ArrayLen(GetMetadata(this).properties)&amp;gt;    &amp;lt;cfloop from=&amp;quot;1&amp;quot; to=&amp;quot;#ArrayLen(GetMetadata(this).properties)#&amp;quot; index=&amp;quot;i&amp;quot;&amp;gt;     &amp;lt;cfset this.propertyList = ListAppend(this.propertyList,GetMetadata(this).properties[i].name)&amp;gt;    &amp;lt;/cfloop&amp;gt;   &amp;lt;/cfif&amp;gt;  &amp;lt;/cfif&amp;gt;    &amp;lt;cfreturn /&amp;gt;  &amp;lt;/cffunction&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;By using the GetMetadata() function, we are able to introspect our instance and create a list of property names which we can reference in our other methods.&amp;nbsp; This is what enables us to enforce the rules that I described above in which we make sure that a property exists before setting it in the constructor or through an implicit accessor.&amp;nbsp; You will see in both the &lt;b&gt;init() &lt;/b&gt;and &lt;b&gt;OnMissingMethod()&lt;/b&gt; methods that we call this method to ensure the list of properties is available before testing against it.&lt;br /&gt;&lt;br /&gt;With that established, let&apos;s take a look at the &lt;b&gt;init()&lt;/b&gt; constructor method:&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cffunction name=&amp;quot;init&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;BaseBean&amp;quot;&amp;gt;  &amp;lt;cfset var i = &amp;quot;&amp;quot; /&amp;gt;  &amp;lt;cfset initializePropertyList() /&amp;gt;  &amp;lt;cfloop list=&amp;quot;#this.propertyList#&amp;quot; index=&amp;quot;i&amp;quot;&amp;gt;   &amp;lt;cfif StructKeyExists(arguments,i)&amp;gt;    &amp;lt;cfset set(i,arguments[i]) /&amp;gt;   &amp;lt;/cfif&amp;gt;  &amp;lt;/cfloop&amp;gt;    &amp;lt;cfreturn this /&amp;gt; &amp;lt;/cffunction&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;After making sure that our propertyList has been initialized, we loop through that list and if there is a matching named argument, we call the &lt;b&gt;set()&lt;/b&gt; method which sets that value into the variables scope.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;br /&gt;So with the object initialized, let&apos;s take a look at our accessors.&amp;nbsp; For our example, let&apos;s say that we have a &lt;b&gt;Person&lt;/b&gt; object and we are doing to set our &lt;b&gt;firstName&lt;/b&gt; property like this: &lt;b&gt;person.setFirstName(&quot;Dave&quot;)&lt;/b&gt;.&amp;nbsp; Since that setter method doesn&apos;t exist in our Person class, the OnMissingMethod() below will be invoked.&amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cffunction name=&amp;quot;onMissingMethod&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;any&amp;quot;&amp;gt;  &amp;lt;cfargument name=&amp;quot;missingMethodName&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;  &amp;lt;cfargument name=&amp;quot;missingMethodArguments&amp;quot; type=&amp;quot;struct&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;    &amp;lt;cfset var property = &amp;quot;&amp;quot; /&amp;gt;          &amp;lt;cfif ReFindNoCase(&amp;quot;^[gs](et)&amp;quot;,arguments.missingMethodName)&amp;gt;   &amp;lt;cfset property = ReReplaceNoCase(arguments.missingMethodName,&amp;quot;^[gs](et)&amp;quot;,&amp;quot;&amp;quot;) /&amp;gt;   &amp;lt;cfset initializePropertyList() /&amp;gt;    &amp;lt;cfif ListFindNoCase(this.propertyList,property)&amp;gt;    &amp;lt;cfif StructIsEmpty(arguments.missingMethodArguments)&amp;gt;     &amp;lt;cfreturn get(property) /&amp;gt;    &amp;lt;cfelse&amp;gt;     &amp;lt;cfset set(property,arguments.missingMethodArguments[1]) /&amp;gt;     &amp;lt;cfreturn this /&amp;gt;    &amp;lt;/cfif&amp;gt;    &amp;lt;cfelse&amp;gt;    &amp;lt;cfthrow message=&amp;quot;The class #GetMetadata(this).name# does not have a property named #property# so the implicit #arguments.missingMethodName#() method is not available.&amp;quot; /&amp;gt;     &amp;lt;/cfif&amp;gt;   &amp;lt;/cfif&amp;gt;   &amp;lt;cfreturn /&amp;gt;  &amp;lt;/cffunction&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;We are then doing a regular expression test to see if the missing method names starts with either &quot;get&quot; or &quot;set&quot;.&amp;nbsp; If so, we derive the name of the target property by stripping the &quot;get&quot; or &quot;set&quot; off of the string.&amp;nbsp; After making sure that our propertyList has been defined, we then look in that list to see if the target property actually exists in the instance.&amp;nbsp; If it does, the request is then routed on to either the getter or the setter depending on whether arguments were passed to it.&amp;nbsp; Otherwise an exception will be thrown to let the developer know that he or she has attempted to access an undefined property.&lt;br /&gt;&lt;br /&gt;One thing you might notice is that when our conditional block routes the request to the setter, we return an instance of the class itself.&amp;nbsp; This allows us to do method chaining like this:&amp;nbsp; &lt;b&gt;person.setFirstName(&quot;Dave&quot;).setLastName(&quot;Shuck&quot;)&lt;/b&gt;.&amp;nbsp; it should be noted that this is not the approach that Adobe took with ColdFusion 9.&lt;br /&gt;&lt;br /&gt;So let&apos;s take a look at it in action.&amp;nbsp; Here is our Person.cfc class.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cfcomponent output=&amp;quot;false&amp;quot; extends=&amp;quot;BaseBean&amp;quot;&amp;gt;    &amp;lt;cfproperty name=&amp;quot;id&amp;quot; type=&amp;quot;string&amp;quot; /&amp;gt;  &amp;lt;cfproperty name=&amp;quot;firstName&amp;quot; type=&amp;quot;string&amp;quot; /&amp;gt;  &amp;lt;cfproperty name=&amp;quot;lastName&amp;quot; type=&amp;quot;string&amp;quot; /&amp;gt;   &amp;lt;/cfcomponent&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;As you can see in the &amp;lt;cfcomponent/&amp;gt; tag, we are extending our BaseBean which is all that we need to have a workable domain class object. &lt;br /&gt;&lt;br /&gt;When we put this together and access it in our code, we can do this:&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cfset person = CreateObject(&amp;quot;component&amp;quot;,&amp;quot;Person&amp;quot;).init(id=7,firstName=&amp;quot;Dave&amp;quot;, lastName=&amp;quot;Shuck&amp;quot;) /&amp;gt;  &amp;lt;cfdump var=&amp;quot;#person#&amp;quot; /&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/100225/implicit-accessors/person_dump_1.png&quot; /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;br /&gt;Once we have an instance, we can modify those properties like so:&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cfset person.setId(8).setFirstName(&amp;quot;Johnny&amp;quot;).setLastName(&amp;quot;Rotten&amp;quot;) /&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/100225/implicit-accessors/person_dump_2.png&quot; /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;br /&gt;I have not actually tested this on Railo, but I can confirm that it works in OpenBlueDragon (including GAE version), and ColdFusion versions 8 and 9.&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=2c92c98f-15c9-815f-9118-37ac4f41aacc&quot; /&gt;&lt;/div&gt;</description><pubDate>Thu, 25 Feb 2010 11:56:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2010/02/25/Implicit-constructor-and-CF9-style-implicit-accessors-without-ColdFusion-9/</guid><category>ColdFusion,Tips and Tricks,Technology,CFML</category></item><item><title>Link to the HFDP 4 CF Connect recordings</title><link>http://daveshuck.instantspot.com/blog/2010/02/09/Link-to-the-HFDP-4-CF-Connect-recordings/</link><description>I have been asked more times than I would like to admit to put together a list of the meeting recordings that we have archived for our &quot;Head First Design Patterns for ColdFusion Developers&quot; series that the &lt;a href=&quot;http://dfwcfug.instantspot.com&quot;&gt;DFWCFUG&lt;/a&gt; has been doing since September of last year.&amp;nbsp; I will be appending to that entry in the next couple of months as we near the end, so you may want to bookmark it for future reference if you are interested in following.&lt;br /&gt;&lt;br /&gt;The entire archive &lt;a href=&quot;http://www.dfwcfug.org/blog/2010/02/09/Recording-list-for-Head-First-Design-Patterns-for-CFML-presentations&quot;&gt;can be found here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=3c151189-0ee2-8354-b84e-67e00f57cc10&quot; /&gt;&lt;/div&gt;</description><pubDate>Wed, 10 Feb 2010 03:00:15 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2010/02/09/Link-to-the-HFDP-4-CF-Connect-recordings/</guid><category>ColdFusion,Technology</category></item><item><title>Remaking Prodigy&apos;s Smack My B**** Up using Ableton</title><link>http://daveshuck.instantspot.com/blog/2009/12/17/Remaking-Prodigys-Smack-My-B-Up-using-Ableton/</link><description>Very cool video showing a producer named &lt;span class=&quot;description&quot;&gt;Jim Pavloff re-creating this Prodigy classic using Ableton music production software, bringing in the samples one at a time and modifying them eventually building the entire track.&amp;nbsp;&amp;nbsp; I need me some Ableton! .... and some talent. :(&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;youtube-video&quot;&gt;&lt;object height=&quot;355&quot; width=&quot;425&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/eU5Dn-WaElI&amp;amp;feature=youtube_gdata&quot;&gt; &lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt; &lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/eU5Dn-WaElI&amp;amp;feature=youtube_gdata&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; height=&quot;355&quot; width=&quot;425&quot;&gt; &lt;/embed&gt;  &lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Making Prodigy&apos;s &quot;Smack My Bitch Up&quot; in Ableton by Jim Pavloff&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=0bf7e9e0-0a1d-8a84-a9d8-16e5fd83a3bc&quot; /&gt;&lt;/div&gt;</description><pubDate>Thu, 17 Dec 2009 12:53:23 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/12/17/Remaking-Prodigys-Smack-My-B-Up-using-Ableton/</guid><category>Technology,Music</category></item><item><title>Naked Domains in Google App Engine with GoDaddy</title><link>http://daveshuck.instantspot.com/blog/2009/12/16/Naked-Domains-in-Google-App-Engine-with-GoDaddy/</link><description>I recently set up a new site (&lt;a href=&quot;http://www.hikethecanyon.org&quot;&gt;hikethecanyon.org&lt;/a&gt;) on the &lt;a href=&quot;http://appengine.google.com/&quot;&gt;Google App Engine&lt;/a&gt; running &lt;a href=&quot;http://www.openbluedragon.org&quot;&gt;OpenBlueDragon&lt;/a&gt;.&amp;nbsp; By default when you set up a new site on GAE (Google App Engine), you choose an ID for your application, which must be unique on their system as it also serves as the hostname of the URL like this: http://[your ID].appspot.com.&amp;nbsp;&amp;nbsp; For those that would like to use a different domain name, Google App Engine has mechanisms for doing so.&amp;nbsp; In the administration panel of your application, you can add a domain and then choose hostnames from that domain that the application should respond to.&amp;nbsp; However, it makes no provisions for serving the &quot;naked domain&quot;.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;What does this mean?&amp;nbsp; For my example of hikethecanyon.org, I originally set the site up with an id of &lt;b&gt;hikethecanyon-org &lt;/b&gt;which was initially served as &lt;b&gt;http://hikethecanyon-org.appspot.com&lt;/b&gt;.&amp;nbsp; After adding the domain hikethecanyon.org, I was able to add the host &quot;www&quot; so that it would respond to &lt;b&gt;http://www.hikethecanyon.org&lt;/b&gt;.&amp;nbsp; However, since GAE doesn&apos;t support naked domains, I was unable to set it up to respond to &lt;b&gt;http://hikethecanyon.org&lt;/b&gt;.&amp;nbsp; I was able find a workaround using GoDaddy&apos;s domain forwarding functionality.&amp;nbsp; While walking fellow CFML developer &lt;a href=&quot;http://blog.kukiel.net/&quot;&gt;Paul Kukiel&lt;/a&gt; through the process today, he mentioned that someone should blog this, so here it is with screenshots along the way &lt;i&gt;(edit - it appears that he decided to blog it himself as well!)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;For my example, I am going to use a domain I have had sitting around doing nothing for a few years (j4n.org) and walk through the process with some screenshots and explanations along the way.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;First, you need to create your application in the GAE dashboard and deploy your application.&amp;nbsp; Many people have covered this topic in our community including Paul Kukiel and &lt;a href=&quot;http://www.aaronjlynch.com&quot;&gt;Aaron Lynch&lt;/a&gt;, so I will skip to the next step and assume that you have a running application on Google App Engine. As you can see below, I have set up an app with an ID of &lt;b&gt;j4n-org&lt;/b&gt; that is answering on &lt;b&gt;http://j4n-org.appspot.com&lt;/b&gt; which is just running a Mach-II skeleton application.&lt;br /&gt;&lt;div align=&quot;left&quot;&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/mach_ii_skeleton.png&quot; height=&quot;514&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;The next thing that we want to do is add the &lt;b&gt;j4n.org&lt;/b&gt; domain to this application.&amp;nbsp; When you go into the GAE dashboard, you will see that option under the &quot;Application Settings&quot; section labeled &quot;Domain Setup&quot;&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/gae_admin_add_domain_button.png&quot; height=&quot;502&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;On this page you will see a note that tells you that the domain you add must be set up for Google Apps, a service that allows all sorts of functionality, including email services and more.&amp;nbsp; NOTE:&amp;nbsp; You do not have to use any of those services, you simply need to sign up!&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/gae_google_app_required.png&quot; height=&quot;390&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;By clicking the link that says &lt;b&gt;Sign up for Google Apps&lt;/b&gt;, you will be taken to a page like this:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/google_app_enter_domain.png&quot; height=&quot;459&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Walk through the process filling out your personal information and you will come to a screen that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/google_app_create_cname_1.png&quot; height=&quot;455&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For our example, we are going to choose to create a new CNAME record in DNS to prove to Google that we own the domain.&amp;nbsp; By choosing that option&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/google_app_create_cname_2.png&quot; height=&quot;418&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;At this point we need to go to the GoDaddy DNS manager and create a host name &lt;b&gt;google46353a9a2d07a035&lt;/b&gt; and point it to &lt;b&gt;google.com&lt;/b&gt;.&amp;nbsp; You can see what that looks like below:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/godaddy_cname.png&quot; height=&quot;387&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once that record is in place we can go back to the Google Apps page and click the button labeled &lt;b&gt;I&apos;ve completed the steps above&lt;/b&gt;.&amp;nbsp; If all goes well, you will see a page directing you through additional setup.&amp;nbsp; For our purposes in this example, we are done with Google Apps for the time being.&amp;nbsp; Now we want to go back to the GAE dashboard and tell it that we want to use the &lt;b&gt;j4n.org&lt;/b&gt; domain.&lt;br /&gt;&lt;br /&gt;When you enter that domain you should see a message that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/gae_admin_add_domain_confirm.png&quot; height=&quot;480&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;This will bring us back into the Google Apps control panel for the &lt;b&gt;j4n.org&lt;/b&gt; domain and we can add hostnames to our application like this:&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/google_app_add_www.png&quot; height=&quot;344&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;When you click add you will see an page like the one below instructing you to add another CNAME to GoDaddy for the host &quot;www&quot;.&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/google_app_add_www_2.png&quot; height=&quot;445&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;In the screen below you will see that we have successfully added the &quot;www&quot; host and while we were in there I went ahead and deleted the temporary CNAME that we had to create earlier to validate the ownership of the domain. &lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/godaddy_add_www.png&quot; height=&quot;482&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;At this point we can actually reach our application with the address &lt;b&gt;http://www.j4n.org&lt;/b&gt; as you see below:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/www.j4n.org.png&quot; height=&quot;300&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;While this is pretty cool and all, we still can&apos;t access our application with &lt;b&gt;http://j4n.org&lt;/b&gt;.&amp;nbsp; For this, we will count on GoDaddy to do the rest.&amp;nbsp; Go back into the GoDaddy domain manager look for this link:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/godaddy_forward_manage.png&quot; height=&quot;376&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;On the next page, you will want to fill out the field like you see before.&amp;nbsp; However, before you do, click the &quot;learn more&quot; link in the bottom left corner.&amp;nbsp; On that page there is a very important note:&amp;nbsp; &lt;u&gt;&lt;b&gt;For your domain to forward, your domain&apos;s A record must be &lt;code&gt;64.202.189.170&lt;/code&gt;.&lt;/b&gt;&amp;nbsp;&lt;/u&gt; If you note my DNS information above, that is not what the default parked domain IP is.&amp;nbsp; I won&apos;t bore you with yet another screen shot, but make sure you alter your domain&apos;s A record.&amp;nbsp; Now when we ping &lt;b&gt;j4n.org&lt;/b&gt; we get a response from 64.202.189.170.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Once we enter in &lt;b&gt;www.j4n.org&lt;/b&gt; you can see that our plan is going to work by hitting the &quot;Preview&quot; link to the right and seeing a snapshot of our app!&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/naked_domains_gae/godaddy_forward_add.png&quot; height=&quot;417&quot; width=&quot;600&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You will notice that we accepted the default settings which actually does a 301 redirect from &lt;b&gt;http://j4n.org&lt;/b&gt; to &lt;b&gt;http://www.j4n.org&lt;/b&gt;.&amp;nbsp; This means that we will never actually see &lt;b&gt;http://j4n.org&lt;/b&gt; in the address bar after the page has loaded.&amp;nbsp; If you click on the advanced settings you can select &quot;masking&quot; which allows the url to remain in the address bar as http://j4n.org.&amp;nbsp; Each option has its own advantages.&amp;nbsp; Select what is right for your application and choose OK.&lt;br /&gt;&lt;br /&gt;That is all you need to do!&amp;nbsp; Now, a word of warning... we have all gotten spoiled by the seemingly instant DNS changes in recent years.&amp;nbsp; You will find that when you make this forwarding change, you may need to wait up to half an hour or so before you can see the finished product (your mileage may vary).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=384d57d8-afd1-8848-ba2b-41b2e1f9d6ba&quot; /&gt;&lt;/div&gt;</description><pubDate>Thu, 17 Dec 2009 03:11:47 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/12/16/Naked-Domains-in-Google-App-Engine-with-GoDaddy/</guid><category>ColdFusion,Servers,Technology,Java</category></item><item><title>Relaunched HikeTheCanyon.org on OpenBD and GAE</title><link>http://daveshuck.instantspot.com/blog/2009/12/15/Relaunched-HikeTheCanyonorg-on-OpenBD-and-GAE/</link><description>Around a year or so ago, I inadvertently took &lt;a href=&quot;http://www.hikethecanyon.org&quot;&gt;hikethecanyon.org&lt;/a&gt; offline in a server move.&amp;nbsp; Considering that it is a very low traffic site that is little more than a scrapbook of hiking pictures and descriptions, there is no active user community to send me nasty messages begging for me to bring it back online.&amp;nbsp; Finally this past weekend, I spent a bit of time and revived the code base off an old server, moved all the images out to Amazon S3 and brought the site up running under OpenBlueDragon on the Google App Engine.&amp;nbsp; Other than a very rudimentary Lightbox drop-in I did on the gallery to replace a no-longer functioning Flash image gallery, I didn&apos;t actually touch the codebase or the design.&amp;nbsp; So if it looks dated to you, that is because it is!&amp;nbsp; &lt;br /&gt;&lt;br /&gt;For those interested in hiking, you may want to give it a look.&amp;nbsp; It documents a hike of the Grand Canyon that I took with my dad in 2005 with a very detailed trip report and over 300 pictures.&amp;nbsp; Enjoy!&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.hikethecanyon.org&quot;&gt;&lt;big&gt;&lt;b&gt;HikeTheCanyon.org&lt;/b&gt; - Rim-to-Rim through the Grand Canyon on North Kaibab and the Bright Angel Trail&lt;/big&gt;&lt;/a&gt;&lt;br /&gt;&lt;div align=&quot;center&quot;&gt;&lt;a href=&quot;http://www.hikethecanyon.org&quot;&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://daveshuck.instantspot.com/userfiles/073006/91/hikethecanyon.org.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=c80c897b-b851-8081-af34-eee406ccd4f8&quot; /&gt;&lt;/div&gt;</description><pubDate>Tue, 15 Dec 2009 16:44:05 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/12/15/Relaunched-HikeTheCanyonorg-on-OpenBD-and-GAE/</guid><category>ColdFusion,Technology</category></item><item><title>Setting up ColdSpring AOP and interesting behavior with return types</title><link>http://daveshuck.instantspot.com/blog/2009/12/07/Setting-up-ColdSpring-AOP-and-interesting-behavior-with-return-types/</link><description>This weekend I had a task in which I needed to add a behavior onto a method in an existing production method in a service object.&amp;nbsp; The new behavior is more or less notifying a 3rd party application whenever a particular method was being called.&amp;nbsp; Considering that it is not really an essential part of the process, it didn&apos;t really belong inline as part of that method, nor did I really want to affect existing &quot;sealed&quot; production code.&amp;nbsp; Although I understood that the AOP functionality of ColdSpring was designed for exactly that type of work, I had never actually used it before this task.&amp;nbsp; I put together a little proof-of-concept application that validated what I wanted to do, then applied it to my application.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;My goal was to set up an &quot;afterReturningAdvice&quot; object/method - that being a method which will be called at the completion of the target method, which is Member.saveMember() - where I could externalize the new behavior without touching the service itself.&amp;nbsp; While I did get it to perform essentially how I expected, there were a couple of gotchas about this process. One of which makes good sense, the other... not so much.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;For starters, my MemberService was defined in ColdSpring like this...&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;[codeblock 450]&lt;br /&gt;&lt;br /&gt;In order to make this change without causing broad sweeping changes throughout the application (in theory!), we are going to create a proxy object that masquerades as the MemberService that will pass requests onto the original MemberService.&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;[codeblock 451]&lt;br /&gt;&lt;br /&gt;As you can see, our &lt;b&gt;MemberService&lt;/b&gt; is now actually of type &lt;b&gt;coldspring.aop.framework.ProxyFactoryBean&lt;/b&gt;. &amp;nbsp; We have defined its target as a bean named &lt;b&gt;MemberServiceTarget&lt;/b&gt; which points to our original &lt;b&gt;MemberService&lt;/b&gt; that has been renamed.&amp;nbsp; it now has an &quot;interceptors&quot; property that basically wires in a new bean named &lt;b&gt;RecordUpdatedMemberAfterReturningAdvisor&lt;/b&gt; that will serve as an interceptor anytime the &lt;b&gt;&quot;MemberService&quot;&lt;/b&gt; is accessed.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;So lets take a look at our interceptor definition:&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;[codeblock 452]&lt;br /&gt;&lt;br /&gt;You can see that the&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;b&gt;RecordUpdatedMemberAfterReturningAdvisor&lt;/b&gt; that we declared in our previous snippet is defined here as type &lt;b&gt;coldspring.aop.support.NamedMethodPointcutAdvisor&lt;/b&gt;, which is a another built-in type in the ColdSpring framework.&amp;nbsp; We have defined a property &quot;mappedNames&quot; which will list any methods in our target object that we would like this interceptor to act on.&amp;nbsp; In our case we are only wanting to act on the &lt;b&gt;saveMember()&lt;/b&gt; method, which you see in the &lt;value&gt; property.&amp;nbsp; The &quot;advice&quot; property tells the interceptor that whenever our &lt;b&gt;saveMember()&lt;/b&gt; method is called, that we need to notify our &lt;b&gt;RecordUpdatedMemberAfterReturningAdvice&lt;/b&gt;. This is an object at we create that extends the &lt;b&gt;coldspring.aop.AfterReturningAdvice &lt;/b&gt;abstract class that is included with the framework.&amp;nbsp; When you use this advice, you must have a concrete implementation of the &lt;b&gt;afterReturning()&lt;/b&gt; method, which is were we will actually put our code that notifies the 3rd party application.&amp;nbsp; That method will contain the arguments: returnVal, method, args, and target, which will let you know all about the target method that was just called.&amp;nbsp; Pretty cool huh?&lt;br /&gt;&lt;br /&gt;Here is what that &lt;/value&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;b&gt;RecordUpdatedMemberAfterReturningAdvice&lt;/b&gt; looks like:&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;[codeblock 453]&lt;br /&gt;&lt;br /&gt;You can see that our required &lt;b&gt;afterReturning()&lt;/b&gt; method is what finally does the work that we were trying to implement.&amp;nbsp; And all of this with no changes to our original application!&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;big&gt;Well.... not exactly.&amp;nbsp; &lt;/big&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;While this is certainly a pretty low impact change to our application, the idea that it would not affect any existing code wasn&apos;t the actual reality for a couple of reasons.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;MemberService&lt;/b&gt; is no longer a &lt;b&gt;MemberService!&lt;/b&gt;&amp;nbsp; In about eleventy thousand places in my application, I had services that were wired with a dependency of our MemberService.&amp;nbsp; Each of these had a getter/setter that looked something like this:&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;[codeblock 454]&lt;br /&gt;&lt;br /&gt;With the changes that we have implemented, our MemberService&lt;/span&gt; is a completely different animal!&amp;nbsp; Every single one of my getters and setters failed since my MemberService is now actually of type &lt;b&gt;coldspring.aop.framework.ProxyFactoryBean&lt;/b&gt;.&amp;nbsp; I altered them all to have type &quot;any&quot; (in case I remove this AOP piece later!) and all works.&amp;nbsp; I suppose it is a worthwhile change, but it would be nicer if this change was truly transparent to my application. &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;This one is the head scratcher, and as of the time of this blog posting I have no explanation whatsoever.... but a &lt;b&gt;Member&lt;/b&gt; isn&apos;t always a &lt;b&gt;Member&lt;/b&gt;?!?&amp;nbsp; In my &lt;b&gt;MemberService&lt;/b&gt;, I have a &lt;b&gt;getMember()&lt;/b&gt; method which returns a type &lt;b&gt;my.objects.Member&lt;/b&gt;.&amp;nbsp; In my initial testing I had no problems with this at all.&amp;nbsp; However, once I rolled it into production, there was a process that called the &lt;b&gt;MemberService.getMember() &lt;/b&gt;method that I had not hit in my initial tests.&amp;nbsp; When it was called I received the following exception:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;Message:The value returned from function fnct_&lt;/b&gt;&lt;div id=&quot;:1it&quot; class=&quot;ii gt&quot;&gt;&lt;wbr/&gt;&lt;b&gt;673EC50CBDBD5294E06289EE40D44A&lt;/b&gt;&lt;wbr/&gt;&lt;b&gt;BE() is not of type Member&lt;br /&gt;&lt;/b&gt;Our proxy MemberService creates a dynamic method that forwards requests onto the original target &lt;b&gt;getMember()&lt;/b&gt; method.&amp;nbsp; For whatever reason, in this one case, it was unable to validate that the returned object was indeed a &lt;b&gt;Member&lt;/b&gt;.&amp;nbsp; I modified my original &lt;b&gt;MemberService&lt;/b&gt; to make the returntype of &lt;b&gt;getMember()&lt;/b&gt; &quot;any&quot; an all is now working well.&amp;nbsp; If anyone has an explanation for that one I am all ears!&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;Aside from those two issues, my new AOP functionality is now in production and working exactly as I had hoped.&amp;nbsp; Overall, I think that this is a very cool feature of ColdSpring, and one that I will definitely be making more use of moving forward.&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=d2c0dcd3-0b5e-8640-8495-903100f55a7f&quot; /&gt;&lt;/div&gt;</description><pubDate>Mon, 07 Dec 2009 15:00:07 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/12/07/Setting-up-ColdSpring-AOP-and-interesting-behavior-with-return-types/</guid><category>ColdFusion,Technology</category></item><item><title>Create SSL sites in Apache on Windows with OpenSSL</title><link>http://daveshuck.instantspot.com/blog/2009/11/12/Create-SSL-sites-in-Apache-on-Windows-with-OpenSSL/</link><description>To get a secure SSL site up and running on Apache under Windows, there are a few hoops to jump through that are not very intuitive.&amp;nbsp; To that end, I am going to document my approach to setting up SSL using OpenSSL.&amp;nbsp; This approach assumes that you already have Apache up and running on your machine, so if you have not done that, head over to the &lt;a href=&quot;http://httpd.apache.org/download.cgi&quot;&gt;HTTPD download page&lt;/a&gt; and set that up before continuing.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Setting up OpenSSL&lt;br /&gt;&lt;/b&gt;First we need to get &lt;a href=&quot;http://www.openssl.org&quot;&gt;OpenSSL&lt;/a&gt; setup on our system, which is not included with the Apache Windows binaries.&amp;nbsp; In fact the OpenSSL project doesn&apos;t even provide the binaries themselves, but you can find them at &lt;a href=&quot;http://www.slproweb.com/products/Win32OpenSSL.html&quot;&gt;Shining Light Productions&lt;/a&gt;.&amp;nbsp; For this example, I will be choosing the &lt;a href=&quot;http://www.slproweb.com/download/Win32OpenSSL_Light-0_9_8k.exe&quot;&gt;Win32 OpenSSL v0.9.8k Light&lt;/a&gt; version.&amp;nbsp; If you see a message like the one below, you will need to install the &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&amp;amp;displaylang=en&quot;&gt;Microsoft Visual C++ 2008 Redistributable Package&lt;/a&gt; and then attempt the OpenSSL installation again.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://daveshuck.instantspot.com/userfiles/073006/91/c++error.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Once you have it installed, you can do a quick test to make sure that it is set up properly:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://daveshuck.instantspot.com/userfiles/073006/91/openssltest.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Creating Certificates&lt;br /&gt;&lt;/b&gt;Next, we will use the OpenSSL terminal interface to create our self-signed certificates.&amp;nbsp; To explain a bit about what is going on below, I have a site already existing on my system that can be reached at http://scribble.&amp;nbsp; What we are doing is creating a secure subdomain of https://secure.scribble. &amp;nbsp; Typically when I create certificates, I name the files with the host/domain obvious so that they can be easily identified later.&amp;nbsp; Obviously you will want to replace the domain name to match your setup, but type the following in the terminal in the OpenSSL/bin directory:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;[codeblock 433]&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;That will generate what you see below.&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/ssl_on_apache/create-cert1.png&quot; height=&quot;420&quot; width=&quot;650&quot; /&gt;&lt;br /&gt;&lt;br /&gt;You may notice that I left a lot of the prompts blank.&amp;nbsp; Considering this is a dummy certificate in a development environment, that approach makes sense.&amp;nbsp; You may choose to be more explicit based on your needs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If we were to use this key as it is, we would be prompted for the password every time that Apache starts.&amp;nbsp; Since that is less than ideal, we will now generate a non-protected key from the one we created in the previous step by typing the following:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;[codeblock 434]&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/ssl_on_apache/create-cert2.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can see that I was prompted for a pass phrase.&amp;nbsp; This is the same password that you created when we generated the certificate above.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we need to need to build the certificate that we will actually import into Apache.&amp;nbsp; You can do so by typing:&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;br /&gt;[codeblock 435]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will result in the following output:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/ssl_on_apache/create-cert3.png&quot; height=&quot;443&quot; width=&quot;650&quot; /&gt;&lt;br /&gt;&lt;br /&gt;You can see that we now have a .cert, .csr, .key, and .pem file for our domain.&amp;nbsp; We will use a combination of the .key and the .cert&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Configuring Apache&lt;br /&gt;&lt;/b&gt;Now we need to make sure that your Apache server is ready to serve SSL requests.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;First, let&apos;s put the .key and .cert files that we created above into a directory under Apache.&amp;nbsp; In your &quot;conf&quot; directory, create a subdirectory named &quot;ssl&quot; and move secure.scribble.key and secure.scribble.cert into that new directory.&lt;br /&gt;&lt;br /&gt;Next we need to make sure that the mod_ssl module is enabled.&amp;nbsp; Open up the httpd.conf file for your Apache webserver.&amp;nbsp; Search for &quot;mod_ssl&quot; and you should find a line that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://daveshuck.instantspot.com/userfiles/073006/91/mod_sso.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Yours will likely be commented out with a &apos;#&apos; sign in front of the line.&amp;nbsp; You will want to delete that &apos;#&apos; so that it looks like the highlighted line above.&lt;br /&gt;&lt;br /&gt;Next you will need to make sure that you have uncommented the line that includes the httpd-ssl.conf file like you see below:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://daveshuck.instantspot.com/userfiles/073006/91/conf_ssl.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;The last thing we need to do is configure our site.&amp;nbsp; Open up the conf/extra/httpd-ssl.conf file in an editor.&amp;nbsp; You will see that there is an amazingly huge and complex site definition in there already that starts with &lt;virtualhost _default_:443=&quot;&quot;&gt; and ends about 150 lines later with &lt;/virtualhost&gt;.&amp;nbsp; We need to disable this site.&amp;nbsp; If you are feeling bold, you can simply delete it.&amp;nbsp; However, I take the approach of commenting it out entirely so that I still have it as a reference, which is my recommendation as well.&amp;nbsp;&amp;nbsp; Starting with the line &lt;virtualhost _default_:443=&quot;&quot;&gt;, put a &apos;#&apos; at the start of every line that doesn&apos;t already have one and continue until you comment out the &lt;/virtualhost&gt; line.&lt;br /&gt;&lt;br /&gt;Now it is finally time for us to create the site definition for our https://secure.scribble site.&amp;nbsp; We will use some of the concepts in the example, but eliminate most of them.&amp;nbsp; Here is what mine looks like after paring down all the excess:&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;[codeblock 436]&lt;br /&gt;&lt;br /&gt;In that code you can see where we are pointing to the .key and .cert files that we created above.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Now, restart your Apache server and you are now serving up securely! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=9d1b1403-fab2-8595-83d6-897a928c54c5&quot; /&gt;&lt;/div&gt;</description><pubDate>Fri, 13 Nov 2009 03:47:33 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/11/12/Create-SSL-sites-in-Apache-on-Windows-with-OpenSSL/</guid><category>Tips and Tricks,Servers,Windows,Technology</category></item><item><title>Talking through some current issues with ColdFusion Event Gateways</title><link>http://daveshuck.instantspot.com/blog/2009/11/09/Talking-through-some-current-issues-with-ColdFusion-Event-Gateways/</link><description>Normally on my blog I attempt to throw out some tip, trick, or nugget of some sort.&amp;nbsp; This time?&amp;nbsp; Not so!&amp;nbsp;&amp;nbsp; I am currently trying to find a solution to a problem at hand and am brainstorming the best way to handle a few things.&amp;nbsp; I am really just talking this out for my own benefit, but I would love to hear thoughts from others that have perhaps solved similar issues.&lt;br /&gt;&lt;br /&gt;On a project that I am currently engaged in I am leveraging ColdFusion Event Gateways which work as a subscriber to a SonicMQ JMS server.&amp;nbsp; My gateway instance listens for messages on the ESB (Enterprise Service Bus) on a particular destination name (topic/queue).&amp;nbsp; When it receives a message, it parses the XML that it received, and plays traffic cop pushing data into various services that need it.&amp;nbsp; I have this working flawlessly in my small development environment.&amp;nbsp; However, I have a couple of complexities ahead of me that I am having difficulty coming up with a good solution.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Running in the cloud - &lt;/b&gt;Our production environment will have any number of CF instances, not clustered, but rather running as isolated applications with a load balancer directing the requests using sticky sessions.&amp;nbsp; Our system will be bringing new instances on/off line as traffic traffic dictates.&amp;nbsp; I have yet to solve the issue of how to set up my JMS Event Gateway in this environment.&amp;nbsp; I definitely don&apos;t want 20 different listeners out there all doing the same work.&amp;nbsp; I have considered the idea of having some sort of a support database where a listener can insert a row with a specific JMS message ID and when any other server picks up a message with that ID it will see that it is already being acted upon and it can safely ignore it. There are a couple of negatives that I can see right off the bat.&amp;nbsp; First is that every single subscribed instance will have to pull in the same message and test to see whether or not it should be acted upon.&amp;nbsp; It just seems like a little bit of redundancy that shouldn&apos;t be there.&amp;nbsp; Secondly, there is a chance that two servers could pick up the same request within milliseconds of each other and both could end up doing the work.&amp;nbsp; Duplicate processing could not only be wasteful, but could also create some data integrity issues.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Different environments have different settings (dynamic config)&lt;/b&gt; - Right now in our development phase, we have a single config file with setting specific to our development JMS server (credentials, domain, URL, Initial Context Factory, etc).&amp;nbsp; However, soon I will need to have this process support a number of different environments: multiple dev environments, multiple integration environments, multiple QA environments, and eventually production.&amp;nbsp; Ideally it would be wonderful if I could find some way to load a specific config into the event gateway at server init time, but as of today I have _NO_ idea how to solve this one.&amp;nbsp; First, there is no real intrinsic indicator at the server level that lets it know what environment is currently running (yet anyway...) and secondly, ColdFusion event gateway architecture isn&apos;t conducive in any way to dynamically loading a specific config.&amp;nbsp; &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;So now I am counting on you CFML community.&amp;nbsp; Help me brain storm on this!&amp;nbsp; Do you have any thoughts/ideas that might help me here?&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=acb39c0d-d2f4-8647-b4f4-44e30f8e673e&quot; /&gt;&lt;/div&gt;</description><pubDate>Mon, 09 Nov 2009 16:28:07 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/11/09/Talking-through-some-current-issues-with-ColdFusion-Event-Gateways/</guid><category>ColdFusion,Technology,Java</category></item><item><title>A linux guy&apos;s experience with Windows 7</title><link>http://daveshuck.instantspot.com/blog/2009/10/19/A-linux-guys-experience-with-Windows-7/</link><description>&lt;p&gt;Anyone who knows me well knows that I am typically somewhat of an anti-Windows guy. I absolutely love linux, and get very frustrated by Windows in general. The only thing that I really dislike about linux is the lack of application support by a number of companies (ahem&amp;hellip;. Adobe).&amp;nbsp; Before going to the Adobe MAX conference, I decided I should swap out OSes on my personal laptop so that I could run all the stuff I would need for labs without constantly cursing about being stuck in a VM, limited functionality, etc.&amp;nbsp; A friend had just bought a package of Windows 7 licenses and sold me one for 5 bucks, which I considered to be a pretty reasonable risk.&amp;nbsp; I opted for installing Windows 7 on my laptop.&lt;br /&gt; &lt;br /&gt; Given that background and my previous feelings about Windows, I have to say that it is a pretty dang nice operating system.&amp;nbsp; It is by far the best offering to date by MS in my opinion.&amp;nbsp; There are a few things that they still haven&apos;t managed to get right (native file copy still makes me want to stick forks in my eyes), but by and large they have done a great job with Windows 7.&amp;nbsp; Other than having to track down a few drivers for my laptop, the installation was painless &amp;ndash; if not fast.&amp;nbsp; This is still an area that linux, and especially Ubuntu, wins hands down though.&amp;nbsp; Apps run extremely stable, and with the addition of a new concept of &amp;quot;Libraries&amp;quot;, directories that I need access to regularly are right at hand instead of having to tree down through big hierarchies.&amp;nbsp; I am also not finding what I expected would be an immediate degradation of performance after installing all the servers and development tools that I use on a daily basis.&amp;nbsp; Over all, so far so good.&lt;br /&gt; &lt;br /&gt; &lt;strong&gt;A few things that I think are a *must* for the way that I use it. &lt;/strong&gt;&lt;/p&gt; &lt;ul&gt;     &lt;li&gt;I found a &amp;quot;sudo&amp;quot; program called &lt;a href=&quot;http://brandontools.com/content/StartPlusPlus.aspx&quot;&gt;Start++&lt;/a&gt; that allows me to open applications from the terminal or start menu as Administrator by typing &lt;strong&gt;sudo notepad&lt;/strong&gt; [or some other program].&amp;nbsp; It will prompt you for the UAC stuff and the program will open as administrator.&amp;nbsp; I use this regularly for editing system files like hosts, apache configs, and use it to open a terminal to fire off j2ee servers.&amp;nbsp;&lt;/li&gt;     &lt;li&gt;Install &lt;a href=&quot;http://www.codesector.com/teracopy.php&quot;&gt;Teracopy&lt;/a&gt; which is a replacement for the Windows copy program.&amp;nbsp; While certainly not as fast/efficient as a linux terminal, it greatly increases file copy speed over the native windows GUI file copy.&amp;nbsp; No more &amp;quot;preparing to copy&amp;quot; waits while your system bogs down.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Things that annoy me&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt;     &lt;li&gt;I still wish I could have a real terminal and be able to use VI in sudo, but that is just something I will have to get over I guess.&lt;/li&gt;     &lt;li&gt;I hate that I now have to be so careful with regard to viruses and spyware.&amp;nbsp; I love the protection that linux offers in that area, and having to go out of my to stay protected seems a bit cumbersome.&lt;/li&gt;     &lt;li&gt;I miss being able to easily try out software with the ease of the synaptic package manager.&amp;nbsp; It seems foreign now to have to download an exe run an installer and have settings being obscurely written all over a &amp;quot;black box&amp;quot; registry.&lt;/li&gt;     &lt;li&gt;I miss built-in networking tools.&amp;nbsp; Even simply things like being able to run &amp;quot;whois&amp;quot; from the teminal.&lt;/li&gt;     &lt;li&gt;My drive is getting fragmented far faster than with linux, and I find that I am running the defrag tool fairly often.&amp;nbsp; Linux just manages this under the covers and I never have to worry about it.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;All said, after using it for about the past 4 weeks, I can honestly say that I am surprised (and perhaps even a bit disappointed) that I like it as much as I do.&amp;nbsp; I planned on just running it while I was at the Adobe MAX conference and going back to linux when I got home, but it looks like I will be keeping it for a while longer.&lt;/p&gt; &lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img src=&quot;http://img.zemanta.com/pixy.gif?x-id=8f740e60-f3eb-8f02-a041-715c13c72d2d&quot; alt=&quot;&quot; class=&quot;zemanta-pixie-img&quot; /&gt;&lt;/div&gt;</description><pubDate>Mon, 19 Oct 2009 13:58:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/10/19/A-linux-guys-experience-with-Windows-7/</guid><category>Windows,Technology,Linux</category></item><item><title>Strange behavior with ColdFusion ExpandPath() when using Symbolic Links</title><link>http://daveshuck.instantspot.com/blog/2009/09/23/Strange-behavior-with-ColdFusion-ExpandPath-when-using-Symbolic-Links/</link><description>&lt;p&gt;I was playing around with the Quicksilver framework last night, and for some reason it was unable to find and instantiate my CFCs properly.&amp;nbsp; After digging into the framework a bit and determining where it was breaking, I discovered something strange about the way that ColdFusion interprets ExpandPath() when it exists in a directory that is defined as a symbolic link.&amp;nbsp; I am not sure if the same behavior exists on Macs, but I would imagine it does.&amp;nbsp; If someone could confirm that to be the case, I would be interested.&lt;br /&gt; &lt;br /&gt; For starters, I usually have a &apos;www&apos; directory in my user home directory. This way when I pass my user profile around from distro to distro, my development work is included in my home directory.&amp;nbsp; For ease of configuration I typically have a symbolic link in my OS that points &lt;strong&gt;/www/&lt;/strong&gt; ---&amp;gt; &lt;strong&gt;/home/dshuck/www/&lt;/strong&gt;.&amp;nbsp; Then when I am creating a new web project called &apos;davescode&apos;, I would put it in &lt;strong&gt;/home/dshuck/www/davescode&lt;/strong&gt;, but my Apache config would usually point to &lt;strong&gt;/www/davescode&lt;/strong&gt;.&amp;nbsp; For the past several years, this approach has worked will for me.&amp;nbsp; That is until last night when experimenting with Quicksilver.&amp;nbsp; &lt;br /&gt; &lt;br /&gt; When Quicksilver loads, it creates a list of service CFCs in the the application in such a way that if I had Foo.cfc in a directory &lt;strong&gt;&apos;com&apos; &lt;/strong&gt;in the root of my davescode site, it would look like &lt;strong&gt;/home/dshuck/www/davescode/com/Foo.cfc&lt;/strong&gt;.&amp;nbsp; When I initted the application, I was getting an error that&amp;nbsp; it couldn&apos;t find the CFC &lt;strong&gt;home/dshuckcom/Foo.cfc&lt;/strong&gt;.&amp;nbsp; Essentially what was happening is that it was getting the full path of the CFC and replacing the path to the root of the site with &amp;quot;&amp;quot;.&amp;nbsp; In a perfect world the value of the path after the string replace would have looked like &lt;strong&gt;com/Foo.cfc.&amp;nbsp; &lt;/strong&gt;Unfortunately that was not so.&amp;nbsp; Here&apos;s why!&lt;br /&gt; &lt;br /&gt; I put a test file called path.cfm in the root of my davescode site that considted of the following:&lt;br /&gt; &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cfoutput&amp;gt;#ExpandPath(&amp;quot;./&amp;quot;)#&amp;lt;/cfoutput&amp;gt; &amp;lt;br/&amp;gt; &amp;lt;cfoutput&amp;gt;#ExpandPath(&amp;quot;/&amp;quot;)#&amp;lt;/cfoutput&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt; &lt;br /&gt; The result was &lt;em&gt;very&lt;/em&gt; surprising!&lt;br /&gt; &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;/home/dshuck/www/davescode/ /www/davescode/&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt; &lt;br /&gt; For some reason when you do ExpandPath(&amp;quot;/&amp;quot;) it looks at the symbolic link path, but when you do ExpandPath(&amp;quot;./&amp;quot;), it looks at the true file path.&amp;nbsp; For the life of me, I can&apos;t think of why that would be.&amp;nbsp; If anyone has an explanation, I would be all ears!&lt;/p&gt; &lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=49729c7f-e4fe-8ce3-a08f-2bd5d5e173f3&quot; /&gt;&lt;/div&gt;</description><pubDate>Wed, 23 Sep 2009 14:11:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/09/23/Strange-behavior-with-ColdFusion-ExpandPath-when-using-Symbolic-Links/</guid><category>ColdFusion,Technology,Linux</category></item><item><title>Usability - It&apos;s not just for websites!</title><link>http://daveshuck.instantspot.com/blog/2007/07/02/Usability--Its-not-just-for-websites/</link><description>&lt;p&gt;  As a web developer, usability is something that we consider on a daily basis.&amp;nbsp; When it comes to functionality that has become a standard, we don&amp;#39;t jack with it!&amp;nbsp; For instance, we have long established that when you mouseover a link the cursor turns into a pointy finger.&amp;nbsp; Can we alter that?&amp;nbsp; Sure!&amp;nbsp; But people would be confused and would likely miss some content in your application.&amp;nbsp; See that navigation bar at the top of my page?&amp;nbsp; I could easily move to align with the bottom of my site, but the result would lead to more confusion.  &lt;/p&gt;  &lt;p&gt;  This leads me to a mini-rant about my new phone.&amp;nbsp; A couple weeks ago I dropped my LG phone one too many times.&amp;nbsp; It seemed to always think I had a headset plugged in, although I have never actually owned a phone headset.&amp;nbsp; In addition, when I turned it on, it would randomly call my Mom and Dad.&amp;nbsp; That one I still can&amp;#39;t figure out!  &lt;/p&gt;  &lt;p&gt;  So, being a generally cheap guy, I stopped by the Cingular store to pick up the the next-to-the-bottom-line model for about 60 bucks and was on my way without paying too much attention.&amp;nbsp;&amp;nbsp;&amp;nbsp; After unwrapping it and charging for the first time, I discovered something that baffles me.&amp;nbsp; Check out this keypad!  &lt;/p&gt;  &lt;p&gt;  &lt;img style=&quot;border: 1px solid black&quot; src=&quot;http://img259.imageshack.us/img259/8396/phonepo8.jpg&quot; alt=&quot;Sony Ericsson flip phone keypad&quot; title=&quot;Sony Ericsson flip phone keypad&quot; width=&quot;500&quot; height=&quot;400&quot; /&gt;  &lt;/p&gt;  &lt;p&gt;  What genius thought it would be a good idea to design the keys like that?&amp;nbsp; After about 35 years of a consistent and well-defined pattern of telephone keypads, Sony/Ericsson decided it would be a good idea to alter that by offsetting the middle column. &amp;nbsp; This serves no functional purpose either.&amp;nbsp; You can see they could have quite easily shifted the middle column of buttons up so that they would be aligned.&amp;nbsp; I am sure my fingers will get used to it, but dialing without looking at my fingers presents a new challenge.&amp;nbsp; I suppose that is one of the costs of being cheap.&amp;nbsp; :)   &lt;/p&gt;  </description><pubDate>Mon, 02 Jul 2007 12:55:26 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2007/07/02/Usability--Its-not-just-for-websites/</guid><category>Technology</category></item><item><title>Cyber attack us eh? How about a counter attack IRL!</title><link>http://daveshuck.instantspot.com/blog/2007/02/08/Cyber-attack-us-eh-How-about-a-counter-attack-IRL/</link><description>&lt;p&gt;  This is pretty interesting, especially in light of this week&amp;#39;s rampant DoS attacks.&amp;nbsp;&amp;nbsp; From the article:  &lt;/p&gt;  &lt;p&gt;  &lt;em&gt;If the United States found itself under a major cyberattack aimed at  undermining the nation&amp;rsquo;s critical information infrastructure, the  Department of Defense is prepared, based on the authority of the  president, to launch a cyber counterattack or an actual bombing of an  attack source&lt;/em&gt;.&amp;nbsp;    &lt;/p&gt;  &lt;p&gt;  Apparently  if the nation&amp;#39;s networks come under a severe attack, there is a group  called the National &lt;span class=&quot;hm&quot;&gt;Cyber&lt;/span&gt; Response Coordination Group (&lt;span class=&quot;hm&quot;&gt;NCRCG&lt;/span&gt;) that is  responsible for coordinating a defense/retaliation strategy. &amp;nbsp; Members  of the &lt;span class=&quot;hm&quot;&gt;NCRCG&lt;/span&gt; include experts from the US-CERT computer-readiness  team, the Department of Justice and the Defense Department.&amp;nbsp; They are  actually playing out &amp;quot;war games&amp;quot; in order to prepare for an attack.&amp;nbsp;  Where it gets especially interesting to me is the fact that the  strategy potentially could include a physical bombing attack. &amp;nbsp; I am  certainly glad to see them protecting my career as an &lt;span class=&quot;hm&quot;&gt;internet&lt;/span&gt;  developer! :)  &lt;/p&gt;  &lt;p&gt;  &lt;a href=&quot;http://www.networkworld.com/news/2007/020807-rsa-cyber-attacks.html&quot;&gt;Read the complete article...&lt;/a&gt;   &lt;/p&gt;  &lt;p&gt;  &amp;nbsp;  &lt;/p&gt;  &lt;p&gt;  &lt;span class=&quot;hm&quot;&gt;ps&lt;/span&gt;.&amp;nbsp;  Make sure you keep those Windows Updates current&amp;nbsp; We sure would miss  you if your computer was commandeered and was preforming an attack from  your house!   &lt;/p&gt;  </description><pubDate>Thu, 08 Feb 2007 20:25:59 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2007/02/08/Cyber-attack-us-eh-How-about-a-counter-attack-IRL/</guid><category>Technology</category></item><item><title>Cool video showing an iPhone in action - and a question to web developers</title><link>http://daveshuck.instantspot.com/blog/2007/01/31/Cool-video-showing-an-iPhone-in-action--and-a-question-to-web-developers/</link><description>&lt;p&gt;  I have been kind of passively watching the iPhone news go by the past month knowing I am far too cheap to actually buy one until they are no longer cool and people have moved on to the next flash in the pan at which point I will be stuck with the old and busted iPhone.    &lt;/p&gt;  &lt;p&gt;  This morning a coworker sent me this video demonstrating the features.  There is some really sweet stuff in there!  As I watched it I could hear a future conversation my kids will be having their kids.    &lt;/p&gt;  &lt;p&gt;  &lt;em&gt;&amp;quot;Son, when I was a little boy we had these big noisy metal boxes under our desks and *those* were our computers.  Can you believe that?&amp;quot;&lt;/em&gt;  &lt;/p&gt;  &lt;p&gt;  So to the web development community -- What do you think we need to be doing today in order to be prepared for the future in such a way that we remain viable as developers?   I don&amp;#39;t want to end up staring at the same fate as client-server Windows application developers, watching my corner of the development world get smaller and smaller!   &lt;/p&gt;  &lt;p&gt;  Does it really change much for us?  What what should we be learning now?  &lt;/p&gt;  &lt;p&gt;  [youtube YgW7or1TuFk]&lt;a href=&quot;http://www.youtube.com/watch?v=YgW7or1TuFk&amp;amp;eurl&quot;&gt;&lt;/a&gt;  &lt;/p&gt;  </description><pubDate>Wed, 31 Jan 2007 16:50:43 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2007/01/31/Cool-video-showing-an-iPhone-in-action--and-a-question-to-web-developers/</guid><category>Technology</category></item><item><title>Grand Canyon... It&apos;s on!</title><link>http://daveshuck.instantspot.com/blog/2005/07/11/Grand-Canyon-Its-on/</link><description>My father and I decided that this was the year that we would hike the North Rim to the South Rim of the Grand Canyon.   I know this seems crazy, but it is actually a paperwork challenge to be able to hike the Grand Canyon.  There is an application process in which you have to fax your request in the 1st day of the month 6 months before the intended date of your trip with a detailed itinerary, including where you will be sleeping and when.  We sent faxed our paperwork in and held our breath on the 1st of April, 6 months before we hoped to go in September.  After no word for a month we finally contacted them, only to find out that we had been rejected.  Discouraged, but not beaten, we laid out the calendar to see if there was another time that would work.  We decided that November would be acceptable, albeit a little colder.  It should be in the 60s in the bottom of the canyon though where we will spend the majority of our time.  Once again, we laid out our itinerary and faxed in on July 1.  My dad received a letter today dated July 6, 2005 telling him that they were sorry, but they were unable to accept out application.  He spent a good hour walking around the house cussing and feeling terribly disappointed.  A bit later my mom noticed there was another letter from the Grand Canyon dated July 7, 2005.  &lt;br /&gt;  &lt;br /&gt;  &lt;div class=&quot;note&quot;&gt;  Dear Mr. Shuck, we have accepted your request to hike the Grand Canyon on the dates of November 1, 2 and 3, 2005.  Enlcosed are your passes, which you will need to affix to your backpack and carry with you in the canyon.  There is no need to stop by the back country headquarters before departing on the trail.  &lt;/div&gt;  So in 3.5 months, I will be taking this in....&lt;br /&gt;  &lt;div style=&quot;text-align: center&quot;&gt;  &lt;img src=&quot;/images/GrandCanyon.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;  &lt;/div&gt;      </description><pubDate>Mon, 11 Jul 2005 05:00:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2005/07/11/Grand-Canyon-Its-on/</guid><category>Outdoors</category></item></channel></rss>