HHWD Hiring ColdFusion Developers - Updated

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

  • CF 8 or 9,
  • CFC beans and Data Objects,
  • CSS based designs,
  • Java
  • Server Management

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).

Better way of Initializing from CFEclipse Bean Wizard

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'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....

Here is an example of a simple event table Bean created by CFEclipse:


<cfcomponent alias="blahblah.cfc.events">
    <cfproperty name="eventid" type="numeric" default="0">
    <cfproperty name="event" type="string" default="">
    <cfproperty name="eventdesc" type="string" default="">
    <cfproperty name="eventtime" type="string" default="">
    <cfproperty name="displayme" type="string" default="">
    <cfscript>
        //Initialize the CFC with the default properties values.
        this.eventid = 0;
        this.event = "";
        this.eventdesc = "";
        this.eventtime = "";
        this.displayme = "";
    
</cfscript>

    <cffunction name="init" output="false" returntype="events">
        <cfreturn this>
    </cffunction>
<!--- getters and setters not shown here --->

David customizes the code a bit to accept a form structure and reset the values:


<cfcomponent alias="blahblah.cfc.events">
<!--- skipped over component cfproperty --->

<cffunction name="init" output="false" returntype="events">
<cfargument name="stValues" required="no" type="struct">
<cfif isdefined('arguments.stValues')>
     <cfset this.eventid = arguments.stValues.eventid >
<cfset this.event = arguments.stValues.event >
<cfset this.eventdesc = eventdesc >
<cfset this.eventtime = arguments.stValues.eventtime >
     <cfset this.displayme = arguments.stValues.displayme >
</cfif>
<cfreturn this>
</cffunction>
<!---setters and getters not shown again --->
This is great... except in real practice, if the form variable doesn'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's for each variable that may not be there, I used the form structures "FIELDNAMES" to pick out the columns that exist and assign them.


<cfcomponent alias="blahblah.cfc.events">
    <cfproperty name="eventid" type="numeric" default="0">
    <cfproperty name="event" type="string" default="">
    <cfproperty name="eventdesc" type="string" default="">
    <cfproperty name="eventtime" type="string" default="">
    <cfproperty name="displayme" type="string" default="">
    <cfscript>
    //Initialize the CFC with the default properties values.
    this.eventid = 0;
    this.event = "";
    this.eventdesc = "";
    this.eventtime = "";
    this.displayme = "";
    
</cfscript>

<cffunction name="init" output="false" returntype="events">
<cfargument name="stValues" required="no" type="struct">
    <cfset var fieldarray = arraynew(1)> <!--- to hold form structure fieldnames --->

    <cfif isdefined('arguments.stValues')>
<!--- form has fields --->
     <cfif arraylen(structkeyarray(arguments.stValues) ) gt 0>
<cfset fieldarray = structkeyarray(arguments.stValues)>
<cfloop from='1' to='#arraylen(fieldarray)#' index='i'>
<!--- skip the "submit" button and the "fieldnames" column--->
<cfif findnocase('fieldnames',fieldarray[i]) eq 0 and findnocase('submit',fieldarray[i]) eq 0>
<cfset "this.#fieldarray[i]#" = evaluate(fieldarray[i]) >
</cfif>
</cfloop>
</cfif>
     </cfif>
    <cfreturn this>
    </cffunction>
<!--- setters and getters not shown (duh) ---->

The results is a concise package that eliminates the need to re-evaluate each form field for existance.

From the Fields: Framework Newbie.... WOW!

WOW! My head is exploding AND I am impressed, motivated, and hungry for more. After watching Peter Bell'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 .... Bruce Phillips Grade School Blog, which is geared towards "Coldspring 3rd graders" 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's tutorial on the CFEclipse. A kindergarten version. Using the CFEclipse's RDS Dataview, a right-click > Coldfusion Wizard > 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)!

Application Framework Newbie Thoughts

Last week I sat in on Peter Bell'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'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 'getting started' documents as well as going through some video tutorials. I have installed Coldspring to learn by so this will be my first framework endeavor. :)

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact HHWD