<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>The Honey House Buzz - CFCs</title>
			<link>http://honeyhousedesigns.com/blog/index.cfm</link>
			<description>Musings about Life, Momy-hood, Teenagers, ColdFusion, and Being a GeekGirl in the South</description>
			<language>en-us</language>
			<pubDate>Thu, 02 Sep 2010 11:17:04 -0600</pubDate>
			<lastBuildDate>Tue, 03 Aug 2010 08:59:00 -0600</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>support@honeyhousedesigns.com</managingEditor>
			<webMaster>support@honeyhousedesigns.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>support@honeyhousedesigns.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			<itunes:image href="" />
			<image>
				<url></url>
				<title>The Honey House Buzz</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm</link>
			</image>
			<itunes:explicit>no</itunes:explicit>
			
			<item>
				<title>HHWD Hiring ColdFusion Developers - Updated</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm/2010/8/3/HHWD-Hiring-Experienced-ColdFusion-Developers</link>
				<description>
				
				WOW! What a year! Due to our expanding backlog of work, Honey House Web Designs is expanding our workforce. Update: We are looking for experienced CF coders, as well as subcontractors and Internet IT professionals.

If you are a Coldfusion developer who is proficient in&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;CF 8 or 9, &lt;/li&gt;
&lt;li&gt;CFC beans and Data Objects,&lt;/li&gt;
&lt;li&gt;CSS based designs, &lt;/li&gt;
&lt;li&gt;Java&lt;/li&gt;
&lt;li&gt;Server Management &lt;/li&gt;
&lt;/ul&gt;

If you are proficient in Flash/Flex, CFEclipse, FusionDebug, these are added bonus.

Candidates should live in the South East, (no relocation offered). Some telecommuting may be possible within a 150 mile radius in the beginning, but you must be an organized self-starter who can work without tons of oversight. 

Please send your resume and project sample links to hhd - at - honeyhousedesigns.com (you know the schpeal). 
				</description>
				
				<category>Adobe</category>				
				
				<category>Flash</category>				
				
				<category>Coldfusion Hosting</category>				
				
				<category>CFCs</category>				
				
				<category>CFEclipse</category>				
				
				<category>Java/Jrun</category>				
				
				<category>HHWD</category>				
				
				<category>HTML</category>				
				
				<category>ColdFusion</category>				
				
				<category>Small Business</category>				
				
				<pubDate>Tue, 03 Aug 2010 08:59:00 -0600</pubDate>
				<guid>http://honeyhousedesigns.com/blog/index.cfm/2010/8/3/HHWD-Hiring-Experienced-ColdFusion-Developers</guid>
				
			</item>
			
			<item>
				<title>Better way of Initializing from CFEclipse Bean Wizard</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm/2009/3/13/Better-way-of-Initializing-from-CFEclipse-Bean-Wizard</link>
				<description>
				
				I have been using the CFEclipse to create the Bean, DAO, and Gateway CFCs. Not because it is a perfect tool, but while I am still learning how to manage working in a Framework better (and faster), the CFEclipse provides a nice foundation to start from.

Also, in the Lynda.com tutorials, David Gassner uses these wizards and customizes get/set bean cfc to be able to reinitialize the bean variables from a form.  This is great and has helped me wrap my head around the easily confusing method of setter and getters. BUT! When the form doesn&apos;t have a variable that wants to be set by the bean, I have to pad cfif statements everywhere.... Not good and with large tables a real PITA. So I came up with a better way of doing it using StructKeyArrays....
&lt;more&gt;

Here is an example of a simple event table Bean created by CFEclipse:
&lt;code&gt;
&lt;cfcomponent alias=&quot;blahblah.cfc.events&quot;&gt;
	&lt;cfproperty name=&quot;eventid&quot; type=&quot;numeric&quot; default=&quot;0&quot;&gt;
	&lt;cfproperty name=&quot;event&quot; type=&quot;string&quot; default=&quot;&quot;&gt;
	&lt;cfproperty name=&quot;eventdesc&quot; type=&quot;string&quot; default=&quot;&quot;&gt;
	&lt;cfproperty name=&quot;eventtime&quot; type=&quot;string&quot; default=&quot;&quot;&gt;
	&lt;cfproperty name=&quot;displayme&quot; type=&quot;string&quot; default=&quot;&quot;&gt;
	&lt;cfscript&gt;
		//Initialize the CFC with the default properties values.
		this.eventid = 0;
		this.event = &quot;&quot;;
		this.eventdesc = &quot;&quot;;
		this.eventtime = &quot;&quot;;
		this.displayme = &quot;&quot;;
	&lt;/cfscript&gt;

	&lt;cffunction name=&quot;init&quot; output=&quot;false&quot; returntype=&quot;events&quot;&gt;
		&lt;cfreturn this&gt;
	&lt;/cffunction&gt;
&lt;!--- getters and setters not shown here ---&gt;
&lt;/code&gt;

David customizes the code a bit to accept a form structure and reset the values:
&lt;code&gt;
&lt;cfcomponent alias=&quot;blahblah.cfc.events&quot;&gt;
&lt;!--- skipped over component cfproperty ---&gt;

&lt;cffunction name=&quot;init&quot; output=&quot;false&quot; returntype=&quot;events&quot;&gt;
&lt;cfargument name=&quot;stValues&quot; required=&quot;no&quot; type=&quot;struct&quot;&gt;
     &lt;cfif isdefined(&apos;arguments.stValues&apos;)&gt;
	 &lt;cfset this.eventid = arguments.stValues.eventid  &gt;
         &lt;cfset this.event  = arguments.stValues.event  &gt;
         &lt;cfset this.eventdesc  = eventdesc  &gt;
         &lt;cfset this.eventtime  = arguments.stValues.eventtime &gt;
	 &lt;cfset this.displayme  = arguments.stValues.displayme  &gt;
     &lt;/cfif&gt;
&lt;cfreturn this&gt;
&lt;/cffunction&gt;
&lt;!---setters and getters not shown again ---&gt;
&lt;/code&gt; 
   
This is great... except in real practice, if the form variable doesn&apos;t exists, like for checkboxes that are unchecked, or pulldowns now selected, an error gets thrown, wanting each instance of a form variable to be checked for existence first. Not good with large tables or complex forms.

So to fix it, instead of manually picking through and adding cfif isdefined&apos;s for each variable that may not be there, I used the form structures &quot;FIELDNAMES&quot; to pick out the columns that exist and assign them.

&lt;code&gt;
&lt;cfcomponent alias=&quot;blahblah.cfc.events&quot;&gt;
	&lt;cfproperty name=&quot;eventid&quot; type=&quot;numeric&quot; default=&quot;0&quot;&gt;
	&lt;cfproperty name=&quot;event&quot; type=&quot;string&quot; default=&quot;&quot;&gt;
	&lt;cfproperty name=&quot;eventdesc&quot; type=&quot;string&quot; default=&quot;&quot;&gt;
	&lt;cfproperty name=&quot;eventtime&quot; type=&quot;string&quot; default=&quot;&quot;&gt;
	&lt;cfproperty name=&quot;displayme&quot; type=&quot;string&quot; default=&quot;&quot;&gt;
	&lt;cfscript&gt;
	//Initialize the CFC with the default properties values.
	this.eventid = 0;
	this.event = &quot;&quot;;
	this.eventdesc = &quot;&quot;;
	this.eventtime = &quot;&quot;;
	this.displayme = &quot;&quot;;
	&lt;/cfscript&gt;

&lt;cffunction name=&quot;init&quot; output=&quot;false&quot; returntype=&quot;events&quot;&gt;
     &lt;cfargument name=&quot;stValues&quot; required=&quot;no&quot; type=&quot;struct&quot;&gt;
	&lt;cfset var fieldarray = arraynew(1)&gt; &lt;!--- to hold form structure fieldnames ---&gt;
     
	&lt;cfif isdefined(&apos;arguments.stValues&apos;)&gt;
           &lt;!--- form has fields ---&gt;
	   &lt;cfif arraylen(structkeyarray(arguments.stValues) ) gt 0&gt;  
              &lt;cfset fieldarray = structkeyarray(arguments.stValues)&gt;
              &lt;cfloop from=&apos;1&apos; to=&apos;#arraylen(fieldarray)#&apos; index=&apos;i&apos;&gt;
                   &lt;!--- skip the &quot;submit&quot; button and the &quot;fieldnames&quot; column---&gt;
                  &lt;cfif findnocase(&apos;fieldnames&apos;,fieldarray[i]) eq 0 and findnocase(&apos;submit&apos;,fieldarray[i]) eq 0&gt;
                  &lt;cfset &quot;this.#fieldarray[i]#&quot; = evaluate(fieldarray[i]) &gt;
                  &lt;/cfif&gt;
               &lt;/cfloop&gt;
            &lt;/cfif&gt;
	  &lt;/cfif&gt;
	&lt;cfreturn this&gt;
	&lt;/cffunction&gt;
&lt;!--- setters and getters not shown (duh) ----&gt;
&lt;/code&gt;

The results is a concise package that eliminates the need to re-evaluate each form field for existance. 
				</description>
				
				<category>Application Framework</category>				
				
				<category>CF Debugger</category>				
				
				<category>CFEclipse</category>				
				
				<category>CFCs</category>				
				
				<pubDate>Fri, 13 Mar 2009 10:35:00 -0600</pubDate>
				<guid>http://honeyhousedesigns.com/blog/index.cfm/2009/3/13/Better-way-of-Initializing-from-CFEclipse-Bean-Wizard</guid>
				
			</item>
			
			<item>
				<title>CFCs When you must use explicit naming -- Frameworks Potential Gotcha</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm/2009/2/19/CFCs-When-you-must-use-explicit-naming--Frameworks-Potential-Gotcha</link>
				<description>
				
				Since HHWD often uses test databases and testing areas for internal development servers, and online client sandboxes, we set up our application.cfc to refer to many items by reference.

Instead of using 
&lt;code&gt;datasource=&apos;databasefoo&apos;&lt;/scode&gt;

We will have an application.cfc entry:
&lt;code&gt;&lt;cfset application.dsn = &apos;databasefoo&apos;&gt;&lt;/code&gt;

then in the CFC cfquery use
&lt;code&gt;&lt;cfquery datasource=&apos;#application.dsn#&apos;... &lt;/code&gt;
since the testing database and sandbox database aren&apos;t our production databases, we want to be able to quickly update just the application.cfc and have it point to the correct database without having to do  perform a find/replace across our site.

Similarly, We do the similar setups for CFCs. Since the testing server and sandboxes a different directory structure than our production area, we normally use:
&lt;cfset application.cfc = &apos;databasefoo.cfc.&apos;&gt;

and then refer to it in our code as:
&lt;cfset foo = creatobject(&apos;component&apos;, &apos;#application.cfc#datagateway&apos;)&gt;

This all works great .... EXCEPT when your framework/OO needs and wants an explicit reference. This would be cases where you are establishing a bean or using a returntype:

in DAOs:
 &lt;code&gt;&lt;cffunction name=&quot;read&quot; output=&quot;false&quot; access=&quot;public&quot; returntype=&quot;datafoo.cfc.data&quot;&gt;&lt;/code&gt;
You must enter the &lt;strong&gt;explicit returntype&lt;/strong&gt;. Putting the #application.cfc# in the returntype field throws a generic 500 &quot;Server busy or starting&quot; error. Cryptic and not particularly useful in the measure. 

The same situation occurs when you declare a bean argument with the cfc as its type:
&lt;code&gt;&lt;cfargument name=&quot;bean&quot; required=&quot;true&quot; type=&quot;datafoo.cfc.data&quot;&gt;&lt;/code&gt;

You must use the explicit reference here as well.

As you can tell, I just spent a few hours in the school of head-bangers figuring out the issue... after I did a sitewide replacement of all &quot;datafoo.cfc.&quot; with &quot;#application.cfc#&quot;. 
				</description>
				
				<category>Application Framework</category>				
				
				<category>CFCs</category>				
				
				<pubDate>Thu, 19 Feb 2009 11:24:00 -0600</pubDate>
				<guid>http://honeyhousedesigns.com/blog/index.cfm/2009/2/19/CFCs-When-you-must-use-explicit-naming--Frameworks-Potential-Gotcha</guid>
				
			</item>
			
			<item>
				<title>Better way to set Dynamic Directory References?</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm/2009/1/15/Better-way-to-set-Dynamic-Directory-References</link>
				<description>
				
				I have several projects set up in the following directory structure:

&lt;code&gt;

\        (contains index.cfm and application.cfc)
\cfc     (contains all CFCs)
\html    (contains all non home page files)
\images  
\includes
\config
(and so on)....
&lt;/code&gt;

The application.cfc uses REQUEST variables to reference the page location to link to based on where the location is. This is not very good practice, but is an ancient holdover from CF5 when I first started in Coldfusion.

Here is an example:
&lt;code&gt;
&lt;!--- if page location anywhere but root---&gt;
&lt;cfif findnocase(&apos;html/&apos;,cgi.script_name) gt 0 or 
     findnocase(&apos;includes/&apos;, cgi.script_name)  &gt; 
  &lt;cfset request.includes=&apos;../includes/&apos;&gt;
  &lt;cfset request.html=&quot;../html/&quot;&gt;
  &lt;!---(... and so on )---&gt;
&lt;cfelse&gt;
   &lt;cfset request.includes=&apos;includes/&apos;&gt;
   &lt;cfset request.html=&quot;html/&quot;&gt;
  &lt;!---(... and so on )---&gt;
&lt;/cfif&gt;

&lt;/code&gt;

Then I use the reference:
&lt;code&gt;

&lt;a href=&apos;#request.html#page.cfm&apos;&gt;NavLink1&lt;/a&gt;

&lt;/code&gt;
in my includes and pages to reference given page. 

&lt;strong&gt;There has got to be a better way &lt;/strong&gt; to skin this animal. While I am plowing through beans and configs, in the meantime I have several projects that I just want to perform some simple cleanup on.

Anyone got any better suggestions? The settings would need to change based on a page by page basis but aren&apos;t updated or reset by the user .

A 
				</description>
				
				<category>CFCs</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Thu, 15 Jan 2009 12:11:00 -0600</pubDate>
				<guid>http://honeyhousedesigns.com/blog/index.cfm/2009/1/15/Better-way-to-set-Dynamic-Directory-References</guid>
				
			</item>
			
			<item>
				<title>From the Fields:  Framework Newbie.... WOW!</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm/2008/11/19/From-the-Fields--Framework-Newbie-WOW</link>
				<description>
				
				WOW! My head is exploding AND I am impressed, motivated, and hungry for more. After watching Peter Bell&apos;s Business Object meetup, downloading ColdSpring, and reading the (cough) somewhat sterile and dry getting started guide, I feel overwhelmed. I understand beans and encapsulation, but I find that the code examples there over my head. Even .... &lt;a href=&apos;http://www.brucephillips.name/blog/index.cfm/2007/12/29/The-Grade-Schoolers-Guide-To-ColdSpring--Part-1-Naked-ColdSpring&apos;&gt;Bruce Phillips Grade School Blog&lt;/a&gt;, which is geared towards &quot;Coldspring 3rd graders&quot; was too much. (I must still be in 1st grade).

Before I gave up however, I logged back into the Lynda site and watched David Gassner&apos;s tutorial on the CFEclipse. A kindergarten version. Using the CFEclipse&apos;s RDS Dataview, a right-click &gt; Coldfusion Wizard &gt; Create CFC creates a CFC, DAO, and Gateway components. I was able to use these and compare them to the setup in my own CFC to see just how it worked. 

Now, as I completed the tutorial and tested how the get and set methods work, I am amazed. The complexity is kindergarten level, the objects are encapsulated, and the code generated was fast and very effecient, without me having to do anything extra.  Granted, the sample code I was working with is very elementary, but now I am beginning to see how it fits together and how versatile it will be.

Thanks to David Gassner, Bruce Phillips, Peter Bell, and to Dan Wilson (for his posts and tutes, which I will be working through as well, when I get past the first grade)! 
				</description>
				
				<category>Application Framework</category>				
				
				<category>CFEclipse</category>				
				
				<category>CFCs</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Wed, 19 Nov 2008 17:01:00 -0600</pubDate>
				<guid>http://honeyhousedesigns.com/blog/index.cfm/2008/11/19/From-the-Fields--Framework-Newbie-WOW</guid>
				
			</item>
			
			<item>
				<title>Framework CRUD vs. Dynamic SQL</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm/2008/11/19/Framework-CRUD-vs-Dynamic-SQL</link>
				<description>
				
				Day 2 of Framework learning curve and I want to throw out this question.

Historically, I have passed arguments to a CFC function that performs a read based on a variety of conditions and created a dynamic SQL query inside my &apos;READ&apos; or sometimes inside my &apos;get&apos; object. 

Here is an example:
&lt;code&gt;
&lt;cfquery name=&apos;getFoo&apos; datasource=&apos;#...#&apos;&gt;
select * from Foo where true
&lt;cfif len(arguments.id)&gt;
   and id=&lt;cfqueryparam... value=&apos;#arguments.id#&apos;&gt;
&lt;/cfif&gt;
&lt;cfif isdefined(&apos;arguments.activeonly&apos;)&gt;
   and isactive=&lt;cfqueryparm... value=&apos;#argument.activeonly#&apos;)&gt;
&lt;/cfif&gt;
&lt;cfif  .....
  and ....condition....
&lt;/cfif&gt; &lt;!--- you get the picture ---&gt;
&lt;/cfquery&gt;
&lt;/code&gt;

Can I continue to create a  &apos;read&apos;ish query that is fluid in nature and be able to retrieve data on a variety of conditions or... would it be better form to have different objects created and called for each different instance of needing to retrieve information? 
				</description>
				
				<category>Application Framework</category>				
				
				<category>CFCs</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Wed, 19 Nov 2008 06:32:00 -0600</pubDate>
				<guid>http://honeyhousedesigns.com/blog/index.cfm/2008/11/19/Framework-CRUD-vs-Dynamic-SQL</guid>
				
			</item>
			
			<item>
				<title>Application Framework Newbie Thoughts</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm/2008/11/17/Application-Framework-Newbie-Thoughts</link>
				<description>
				
				Last week I sat in on Peter Bell&apos;s online CFUG and realized that the way business objects and Coldfusion framework was much more  powerful and expansive than I have been using it. 

So, inspired, I am working to redo some small projects, and see if my own productivity increases. I&apos;ll report on the boo-boos, and uh-ohs I bump into along the way. I am sure I am not the only one to hit snags, but maybe by documenting them, I can help the next newb along.

To start, I am reading and reviewing &apos;getting started&apos; documents as well as going through some video tutorials. I have installed Coldspring to learn by so this will be my first framework endeavor. :) 
				</description>
				
				<category>Application Framework</category>				
				
				<category>CFEclipse</category>				
				
				<category>CFCs</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Mon, 17 Nov 2008 16:36:00 -0600</pubDate>
				<guid>http://honeyhousedesigns.com/blog/index.cfm/2008/11/17/Application-Framework-Newbie-Thoughts</guid>
				
			</item>
			
			<item>
				<title>Quick &amp; Dirty Tricks -- Using CFDUMP inside CFC -- Viewing All Methods, Pt. 2</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm/2008/7/2/Quick--Dirty-Trricks--Viewing-Entire-CFC-using-CFDUMP-Pt-2</link>
				<description>
				
				In the second part of CFDump Q&amp;D tricks, you can view the entire methods and settings for a CFC, just like you would see in the &apos;Live Data View&apos; from inside Dreamweaver.

Placing
&lt;cfdump var=&apos;#this#&apos;&gt;
in a CFC outside a function, but inside the &lt;cfcomponent&gt; tags starts the setup and produces a runtime dump that looks like this:

&lt;img src=&quot;http://honeyhousedesigns.com/blog/images//cfcdump.gif&quot; &gt;

Clicking on the linked &apos;component&apos; in that dump will open up the Live data View (note, you&apos;ll need administrator privileges to view the methods).

&lt;img src=&quot;http://honeyhousedesigns.com/blog/images//cfcdmp2.gif&quot;&gt;

And, in keeping with Adobe&apos;s color coding, CFC Dumps are red :). 
				</description>
				
				<category>snippets</category>				
				
				<category>Adobe</category>				
				
				<category>Dreamweaver</category>				
				
				<category>CFCs</category>				
				
				<category>Quick &amp;amp; Dirty Tricks</category>				
				
				<category>ColdFusion</category>				
				
				<category>browsers</category>				
				
				<pubDate>Wed, 02 Jul 2008 19:24:00 -0600</pubDate>
				<guid>http://honeyhousedesigns.com/blog/index.cfm/2008/7/2/Quick--Dirty-Trricks--Viewing-Entire-CFC-using-CFDUMP-Pt-2</guid>
				
			</item>
			
			<item>
				<title>Quick &amp; Dirty -- Using CFDUMP To View CFC Functions</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm/2008/7/2/Using-CFDUMP-To-View-CFC-Functions</link>
				<description>
				
				CFDUMP is a quick way to see the contents of variables, structures, arrays, even queries. But it can also be used to quickly see at runtime the parameters and setup of a called CFC Function.

If a &lt;cfdump var=&apos;#functionname#&apos;&gt; is placed inside a CFC Function, then at runtime, the dump generated shows the user quick information regarding the function itself.

&lt;img src=&quot;http://honeyhousedesigns.com/blog/images//fndump.jpg&quot; hspace=&apos;3&apos; vspace=&apos;3&apos;&gt; 

Side Note: Adobe color codes cfdumps (if not overridden by CSS settings). variable and structure dumps are blue, arrays green, queries purple-ish, CFC Methods are red,and CFC functions are brown. Nice tough to pick out types of dumps. 
				</description>
				
				<category>snippets</category>				
				
				<category>Internet</category>				
				
				<category>CFCs</category>				
				
				<category>Quick &amp;amp; Dirty Tricks</category>				
				
				<category>ColdFusion</category>				
				
				<category>browsers</category>				
				
				<pubDate>Wed, 02 Jul 2008 19:06:00 -0600</pubDate>
				<guid>http://honeyhousedesigns.com/blog/index.cfm/2008/7/2/Using-CFDUMP-To-View-CFC-Functions</guid>
				
			</item>
			</channel></rss>