<?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 - Application Framework</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:16:01 -0600</pubDate>
			<lastBuildDate>Fri, 13 Mar 2009 10:35: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>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>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>
			</channel></rss>