NO MORE CAREER
POLITICIANS!
Get Out Of Our House: Replacing congress with TRUE citizens!
Contact Doug!
Learn About Doug!
View Doug Boude's online resume
updated 11/18/2009

View Doug Boude's profile on LinkedIn
Link to me!

Follow Doug Boude on Twitter
Follow me!

Be Doug's friend on Facebook
Befriend me!
(I promise not to follow you home)
OO Lexicon
Chat with Doug!
Recent Entries
You may also be interested in...
Web Hosting

best web hosting - top web hosting sites, thetop10bestwebhosting.com

Czech your Page Rank!
Check Page Rank of any web site pages instantly:
This free page rank checking tool is powered by Page Rank Checker service
Surf's Up!
Visit Egosurf.org and massage YOUR web ego!
My Score: 9,001
Doug's Books

Read (and recommend)

  • Men are from Mars, Women are from Venus
  • The Wisdom of Crowds: Why the Many Are Smarter Than the Few and How Collective Wisdom Shapes Business, Economies, Societies and Nations
  • Blink: The Power of Thinking Without Thinking
  • Head First Design Patterns
  • Transact-SQL Programming
  • What's So Amazing About Grace?
  • Just So Stories (Rudyard Kipling collection)

Reading

  • Prayer: Does it Make Any Difference?
  • Data Mining (Practical Machine Learning Tools and Techniques)
<< March, 2008 >>
SMTWTFS
1
2345678
9101112131415
16171819202122
23242526272829
3031
Search Blog

Recent Comments
Re: Railo 3.1 on Windows Server 2008 and IIS7 - Part 3 of 3 (by Jon at 8/27 2:04 PM)
Re: Hosts File Changes Not Acknowledged on Vista 64 (by Spacy at 8/24 3:46 PM)
Re: THE DAY CFUNITED DIED (by ComboFusion at 8/23 10:50 AM)
Re: My Grandpa (by Tasha at 8/10 4:29 PM)
Re: Just What IS a 'Service Layer', Anyway? (by dougboude at 8/02 10:10 AM)
Re: Just What IS a 'Service Layer', Anyway? (by Isaac at 8/02 2:25 AM)
Re: PayPal IPN Coldfusion CFC (by Soyestudiambre at 7/25 6:12 PM)
Re: PHP vs COLDFUSION (by Tony Garcia at 7/17 11:24 AM)
Re: PHP vs COLDFUSION (by dougboude at 7/14 8:45 AM)
Re: PHP vs COLDFUSION (by Lola LB at 7/14 5:51 AM)
Categories
Archives
Photo Albums
Funnies (5)
Family (3)
RSS

Powered by
BlogCFM v1.11

11 March 2008
Letter from a Frustrated Patron to their Bank
Just wondering, but has anybody else ever gotten to the point in their banking experiences where they felt like trying to deposit a third party check was like rolling the dice or shaking the magic 8 ball as to whether or not they were going to hold or release your funds to you? Well, it's been that way for me for some time now at my bank, and last Friday morning was the last straw. The experience was so frustrating that I wrote a formal letter to the board of directors informing them of the details. What follows is the letter I sent, which might at least provide a good starter draft for anyone else who feels the need to write to their bank. Oh, and the names of the guilty have NOT been omitted so as to NOT protect their guiltiness. :)

The Letter


Lucille H. Herndon

CHAIRMAN OF THE BOARD

FIRSTMARK FEDERAL CREDIT UNION

P.O. Box 701650

San Antonio, TX 78270-1650

 

Dear Madame;

 

It is with great pleasure that I write to tell you how much of a true joy it is banking with Firstmark Credit Union. I have been banking for many years and with many different institutions, and have found yours to be one in a million in its no-nonsense approach to customer service and product line. For the past two and a half years, Firstmark has not only been my financial friend, but also the ONLY institution which I readily recommend to my friends and family.

 

Unfortunately, my experience this morning, Friday, March 7th, 2008, was far from pleasant. So far from pleasant, in fact, that I feel compelled to relay the events to you.

 

I arrived at the branch on Huebner Road to deposit a payroll check so that I could pay some bills and run some errands. The normal routine is that I present my ID, endorsed check, and deposit slip; the teller examines the integrity of the documentation, stamps the check, and gives me my receipt. This day, however, the teller (Keia) did not follow the routine I was accustomed to. After several minutes of examining his screen and re-reading the check and deposit slip, he excused himself to the back office. After several more minutes of waiting, he emerged to tell me that my check would be placed on hold pending its clearance. I inquired as to why, since this check was within the same range as a previous check I had deposited from this same company, and was told that it was “bank policy”. Now, I fully understand the policy of holding funds when judgment dictates, but I certainly did not expect this action in my case due to reasons cited previously. I began to inquire as to why then, if this was bank policy, had my previous check, or nearly ALL previous checks, never been subject to this hold. We quickly exhausted his supply of information, and so I asked to speak to his manager (Betsy Stavinoha), the person in the back room who had arrived at the judgment that my payroll check should be held. She emerged and politely asked how she could help me. Maintaining my pleasantness, I asked her the same questions regarding the judgment to place a hold on the funds. What followed for the next several minutes was a dialogue between she and I in which I attempted to understand her reasoning process so that, if possible, I could convince her to take into account my nearly impeccable banking record as well as the fact that this same company’s check, not thirty days prior and at nearly the same amount, had no problems clearing. It was at this point that she ceased to be reasonable and began to repetitiously chant the mantra, “it’s bank policy”. She did offer the “courtesy” of releasing $500 of the funds (not enough to be of use to me today), but refused to take into consideration the history associated with my account with regard to her own personal judgment to hold my funds. She attempted to console me by telling me she was trying to protect me from the possibility of the check not clearing, and that she was only executing stated bank policy (physically pointing out to me multiple times the plastic sign posted at the teller window). Following her line of reasoning then, I asked her why it was that “bank policy” was not consistent, and that in nearly identical circumstances on numerous occasions my funds had been released to me immediately, with never a problem to follow. The only response I received from her that even bordered on being reasonable was her “offer” to go back into her office and do detailed research on the history of my account, which she assured me would take at LEAST an hour to accomplish. Without a doubt this randomly applied timeframe was intended to dissuade me from accepting her offer, which I did decline since I didn’t have an hour to waste on this matter. It was at this point in the dialogue that her responses became so robotic, pre-recorded, and rehearsed that I thanked her for her time, took my check and left that branch.

 

I immediately drove to the Bandera branch, walked up to the first available teller with my check and deposit slip, and within five minutes had cash in my hand and all of my funds deposited and available.

 

The purpose of my letter then is to first commend you on the outstanding job Firstmark Credit Union does on a daily basis at setting themselves apart as “the People’s Bank”, treating its clientele like humans (not numbers) and being intelligent enough to use true judgment when making decisions. The alternate purpose of this letter then, is to report what I consider to be a true blot on Firstmark’s reputation in my eyes (and thus in the eyes of EVERYBODY I will ever speak to about Firstmark) due to the blatant lack of judgment shown me and true inconvenience placed on me in my attempts to conduct my usual banking business. It should NOT be that an individual has to role the dice or shake the magic 8 ball when they go to their bank, their financial friend, to conduct the same business they always do, wondering whether or not the particular teller or manager on duty woke up on the right side of the bed that day and would be capable of rational, intelligent decision-making. I should be able to rest ASSURED that I will ALWAYS receive the same level of customer care, consistent predictable application of “bank policy”, and the same quality of intelligent judgment every time I walk into any branch. If I wanted inconsistency, if I wanted to be abused, if I wanted to be treated unfairly, I would bank with Bank of America or Security Service Federal Credit Union. But I don’t want those things; all I want is what it is that set Firstmark Credit Union apart from all the rest of them in the first place to me: I want to be treated fairly and to deal with professionals of integrity, intelligence, and good judgment.

 

I could have understood the manager making the summary, back-room judgment she did having only skimmed the apparent immediate facts; but when the customer requests the time to reason with her and points out valid items that should also be taken into account, only to have those reasons dismissed and ignored with no regard whatsoever to their relevance in the matter, THAT I cannot and will not attempt to understand.

 

I sincerely appreciate you taking the time to read my letter and hear my grievances. I have no expectations as to the results this letter might bring, except for the hope that those with the proper level of authority to make policy decisions and mandate managerial supplementary training will truly hear my words and consider them, as Firstmark Credit Union continues to thrive and set itself far, far apart from the competition.

 

Sincerely and Faithfully,

DOUG BOUDE

Posted by dougboude at 11:10 AM | PRINT THIS POST! | Link | 4 comments



Missouri Issues Official Proclamation - That I Drafted!

I just wanted to share the latest on the efforts to establish the country's first truly Deaf Friendly Certified city: Branson, Missouri.

Signed Entertainment Enterprises engaged Missouri Governor Matt Blunt in a dialogue regarding their efforts to make Branson deaf and hard of hearing friendly, and what resulted was the invitation to submit a proclamation for the Governor to review. Signed Entertainment then asked little ol' ME to draft the proclamation, which I did, which was reviewed, which was approved and SIGNED! The official declaration is April 9th in Jefferson City.

Here is the link to the final proclamation, with my original draft included below:

WHEREAS, the great state of Missouri is home to approximately 255,000 citizens who are deaf or hard of hearing, and

WHEREAS, the self-evident and inalienable rights of the deaf and hard of hearing to equal access and opportunity have been nationally recognized by the passing of legislation such as the Americans with Disabilities Act and the establishment of a National Deaf Awareness Week, and

WHEREAS, Branson, Missouri has been ranked as the third most popular vacation destination in the U.S. and hosted more than 7.5 million visitors and guests last year, and

WHEREAS, it is not only the legal but also the civic duty of establishments to provide equal access to goods and services to their patrons who are deaf or hard of hearing on a continual basis, and

WHEREAS, every Missouri citizen and visitor to Missouri, without regard to race, religion, or handicap, is entitled to be able to equally enjoy and benefit from the plethora of entertainment and recreation that the great state of Missouri provides, and

WHEREAS, it is in keeping with Missouri's own state motto 'Salus populi suprema lex esto' (The Welfare of the People is the Highest Law) and in the best interest of state commerce and society for all businesses and facilities
to be able to differentiate between misconception and fact about deafness, deaf culture, and deaf communication, and

WHEREAS, the nickname "The Show Me State" was not bestowed on Missouri without good cause, it behooves this state to "show the way" in assimilating, educating, and uniting its business community across all public fronts,

NOW THEREFORE, I, Matt Blunt, GOVERNOR OF THE STATE OF MISSOURI, do hereby proclaim April, 2008 as

CORPORATE DEAF AND HARD OF HEARING AWARENESS MONTH

IN TESTIMONY WHEREOF, I have hereunto set my hand and caused to be affixed the Great Seal of the State of Missouri, in the City of Jefferson, this 2nd day of April, 2008.

Posted by dougboude at 11:00 AM | PRINT THIS POST! | Link | 0 comments
09 March 2008
Client-Side Drilldowns Made Easy
Last September I shared a post on an alternative to Ajax for client-side interactivity leveraging Coldfusion's WDDX. I'd like to take it a step further now and share an approach (and corresponding code) I often use in my Model-Glue apps when needing to create tiered or drilldown-type select lists withOUT having to make numerous calls to the server. The gist of this methodology is the same as in my previous post:
  1. Retrieve all needed data sets for populating the drilldowns;
  2. Convert those CF queries to a form that Javascript can manipulate;
  3. Write the necessary functions to populate the dropdowns based on previous options selected.

Here is the working sample. Go ahead, play with it!





The main difference in this example is the fact that I'm not utilizing WDDX, but rather JSON to make the data Javascript friendly.

Let me show you what the queries look like for each tier of this particular drilldown:
Tier 1Tier 2Tier 3

An important item of note here is that the data set for a given tier must include the parent ID of the previous tier in order to perform the filtering operations you'll see soon.

Okay, so how to get the queries into a format Javascript can manipulate. The route I chose to go was to convert the queries to JSON via one of two methods, depending on what version of CF you're using. Since not everyone is using version 8 yet, I made this example compatible with anything 6 or higher (versions previous to 8 are dependent on outside conversion; I chose to use JSON.CFC. Version 8 can utilize the built in function "serializeJSON"). Here's the statement where the queries are transformed (using the commonly known custom tag "QuerySim" to create the data for this example):

<cf_querysim>
    level_1
    level_1_id,name
    1|Colors
    2|Shapes
    3|Foods
</cf_querysim>
<cf_querysim>
    level_2
    level_2_id,level_1_id,name
    1|1|Red
    2|1|Blue
    3|1|Yellow
    4|2|Triangle
    5|2|Square
    6|2|Circle
    7|3|Bread
    8|3|Meat
    9|3|Fruit
</cf_querysim>
<cf_querysim>
    level_3
    level_3_id,level_2_id,name
    1|1|Fuschia
    2|1|Brick Red
    3|1|InfraRed
    4|2|Teal
    5|2|Cyan
    6|2|Navy Blue
    7|3|Light Yellow
    8|3|Dark Yellow
    9|4|Isosceles
    10|4|Equilateral
    11|4|Right Triangle
    12|5|Rectangle
    13|5|Parallelogram
    14|6|Ellipse
    15|6|Oval
    16|7|Matzah
    17|7|Hot Cross Buns
    18|7|Brioche
    19|8|Steak
    20|8|Fajitas
    21|8|Hamburger
    22|9|Kiwi
    23|9|Grapes
    24|9|Oranges
</cf_querysim>

<!--- convert our query data to JSON strings...mind the second parameter to the serializeJSON function... --->

<cfif listfirst(SERVER.ColdFusion.ProductVersion) gt 7>
    <cfset level_2_json = serializeJSON(level_2, true) />
    <cfset level_3_json = serializeJSON(level_3, true) />
<cfelse><!--- we're on less than version 8. use json.cfc --->
    <cfset objJSON = createobject("component","json") />
    <cfset level_2_json = replace(objJSON.encode(level_2),"data","DATA","all") />
    <cfset level_3_json = replace(objJSON.encode(level_3),"data","DATA","all") />
</cfif>

<script>
    //set our json data into Javascript objects
    var lev2data = <cfoutput>#level_2_json#</cfoutput>;
    var lev3data = <cfoutput>#level_3_json#</cfoutput>;
</script>

You'll notice in the section where I rely on JSON.CFC, I am doing a replace on the lower case word "data" to make it upper case. This is to make the JSON string produced consistent with the one produced utilizing serializeJSON. Since Javascript is case sensitive, case consistency in the JSON is required if you wish to utilize only one javascript function to perform the select list population. You'll also notice the use of the optional secondary parameter in the serializeJSON function call. This is needed in order to produce a JSON string that can be accessed by Javascript exactly the same as the JSON.CFC string.

MG NOTE: Regarding the fact that I utilize this approach in Model-Glue apps...I have my controller return an already formatted JSON string to my view rather than return a query and then perform the transformation there. Many of my controller methods have an optional "returnJSON" argument that I use when I need a JSON string back rather than a query.

Okay, data sets are available to Javascript. Now to write a few Javascript functions that can spin through that data and populate the appropriate select list. Here are the functions needed to perform the necessary tasks:

<script>
    //function to repopulate targeted select list
    function repopulate(targetObjID,targetDataSet,selectedIDVal, idColName, valColName, optionValColName){
        /*
         parameters:
         targetObjID - the ID of the select list we want to populate;
         targetDataSet - the actual Javascript data object we created previously;
         selectedIDVal - the name of the column in this data set that contains the parent record ID
         idColName - the name of the column that contains THIS tier's own record ID
         valColName - the name of the column that contains the data we want to display as the option text in the dropdown;
         optionValColName - the name of the column that contains the value we want to use as the new options's VALUE value;
        */
       
        //loop over the data object. for every object with a keyname of idval, add it to the dropdown
        var objTarget = document.getElementById(targetObjID);
        ResetObject(objTarget);
        for(i=0;i<targetDataSet.DATA[idColName].length;i++){
            if(targetDataSet.DATA[idColName][i] == selectedIDVal){
                objTarget[objTarget.options.length] = new Option(targetDataSet.DATA[valColName][i].substring(0,45),targetDataSet.DATA[optionValColName][i],false,false);
            }
        }
    }
    //function to clear a dropdown
    function ResetObject(objTarget){
            objTarget.options.length=0;
            objTarget.options[0] = new Option("---------------","",false,false);
            return;
    }

function resetAll(objIDList){//empty out all of the dropdowns specified in objIDList
        var idlist = objIDList.split(",");
        for (i=0;i<idlist.length;i++){
                ResetObject(document.getElementById(idlist[i]));
        }
        return;
}
    
</script>


Of note is the fact that we are working with three select lists. The first select list is always populated at load time and needs no Javascript intervention at all. Select lists "level_2" and "level_3", however, are being completely manipulated by the JS calls by one generically written function.

Last but not least, the HTML with the Javascript calls embedded in the select lists' onChange event:

<body>
    <h2>Client-Side Drilldown Example</h2>
    Level 1: <select name="level_1" id="level_1" onChange="resetAll('level_2,level_3');repopulate('level_2',lev2data,this.options[this.selectedIndex].value,'level_1_id','name','level_2_id');">
        <option value=""><cfoutput>#repeatstring("-",15)#</cfoutput></option>
        <cfoutput query="level_1">
            <option value="#level_1_id#">#name#</option>
        </cfoutput>
    </select>
    <hr width="25%" align="left">
    Level 2:
    <select name="level_2" id="level_2" onChange="resetAll('level_3');repopulate('level_3',lev3data,this.options[this.selectedIndex].value,'level_2_id','name','level_3_id');">
        <option value=""><cfoutput>#repeatstring("-",15)#</cfoutput></option>
    </select>
    <input type="button" value="show ID" onClick="alert(document.getElementById('level_2').options[document.getElementById('level_2').selectedIndex].value);">
    <hr width="25%" align="left">
    Level 3:
    <select name="level_3" id="level_3" >
        <option value=""><cfoutput>#repeatstring("-",15)#</cfoutput></option>
    </select>
    <input type="button" value="show ID" onClick="alert(document.getElementById('level_3').options[document.getElementById('level_3').selectedIndex].value);">
</body>

Voila! That's it! instant, client-side drilldown with only a single call to the server!

Hope it saves someone a little time. ;)

Doug out.
Posted by dougboude at 10:46 PM | PRINT THIS POST! | Link | 0 comments
07 March 2008
For Your Entertainment Only: CF is Dead Dialogue
The following post is for entertainment purposes only and is not intended to prompt any real responses from anyone. In addition, if you're truly tired of the topic of "Coldfusion is Dead", don't even waste your time reading this post. I just received a comment from a Javaphyte on an older post I had done and couldn't resist digging him a little bit, so thought I'd share it.

Javaphyte's Comment:

Re: COLDFUSION IS DEAD! So says Dave Lowe
All coldfusion is now is an oldschool scripting language being interpreted by a Java server. If you are one of those unlucky companies that wasted your money on a Coldfusion server, hire Java developers and move away from CF to Java, because you can program in Java on a CF server and it makes more sense to do so since Java is more powerful. Sure you can go the highschool programmer way and use a CFScript tag and put cheesy javascriptized java in it, but that's just asinine.
Posted by rey on March 5, 2008 at 7:40 PM

My Comment:
Re: COLDFUSION IS DEAD! So says Dave Lowe
Ah, spoken like a true Javaphyte! Perhaps there IS some hint of validity in saying that because a language is more cryptic,requires years of schooling, and more actual lines of code to accomplish a task, that it is more powerful. Or IS there validity in that observation???? Perhaps, too, the Pony Express was a more "powerful" means of disseminating the mail than is, say, email, because it required such extreme logistical prowess and sheer number of bodies to accomplish its mission? The truth is, the people who cling to the myth that their language is "more powerful" are the same kind of people who, with no valid practical reason, buy large pickup trucks: they're trying to compensate for some deep-seated, behind the scenes insecurity they harbor about themselves as a person. Because in Java I am forced to write many lines of code to connect to a database and retrieve a data set (and let's not talk about how many lines of code I might need to iterate OVER that data and actually do something with it) while in a scripted language like, say, Coldfusion, I can do it in one line, does that make Java "more powerful"??? HECK no, especially when my "dead language" is simply tapping the interfaces Java already provides me while simultaneously allowing me, if I wish, to execute Java code directly. Ah, and let's not forget the fact that in many arenas, the Javaphytes have THEMSELVES adopted the way of the "high school programmer" and have created for themselves...what? TAG LIBRARIES! Yay! Why? Because some of the Javaphytes became enlightened and began packaging up certain of Java's functions in simple to read, simple to type, simple to use...tags. And what is Coldfusion, my Javaphyte friends? It is an extremely robust tag library for Java. Now isn't that the pot calling the kettle black.

Besides being of the firm opinion that the world, when taken as a whole, is mildly retarded, I am also of the firm opinion that there are those developers out there who directly derive their own sense of self-worth from how overly complicated and complex they can make a simple task. After all, if I devise a system of pullies, ropes, and ramps to move my chair across the room, aren't I smarter than the person who simply rolls it over there by hand? In case you didn't figure it out, the answer is "No, you're not smarter than the person who just rolled it over there".

Anyway, thanks the entertaining peek into the mind of a Javaphyte, Rey! :) Oh, and be sure and avoid using any Java tag libraries...someone might see you.
Posted by dougboude at 2:40 AM | PRINT THIS POST! | Link | 6 comments
What IS a Function, Anyway?
Function.
The word has given not just new coders wrinkled brows and vacant stares, but also most everyone who encounters the term initially. Though we programmers might tend to think  "function" only applies to us, in reality it crosses every boundary and therefore I believe that NOBODY should live one moment longer without being armed with a precise understanding of it. Here's what got me thinking about it...

Today as we were driving my step daughter home from school, I asked her what she was doing in math these days and she told me they were working with functions. It immediately brought to mind my first foray into Calculus taught by Mr. Musgrave, when "Eff of X" was a phrase I heard constantly yet was NEVER given the understanding of. Every single day I struggled to wrap my mind around what a function really was, what "Eff of X" was really saying, and never managed to until just a few years ago (hence I hobbled by with a mere C in that class). Now that I'm older and wiser, the term is no longer foreign to me and in fact is second nature, as I finally connected the dots between Calculus functions, Javascript functions, Coldfusion functions, and even the functions that occur in nature. What follows is my personal definition of what a function is, accompanied (as usual) by a colorful and simplistic analogy to help illustrate.

The Definition: A function receives something into itself, performs some kind of work on whatever the input was, and spits the results of that work back out. Period.

It can be a math function that accepts a value 'x', plugs it into some equation, and then returns the mathematical result; it can be a programmatic function that receives something into it...be it a numeric value, a string of text, an object, etc....and returns the results of the code it was told to execute. Ah, and here's the clincher, the missing link that will help ANYBODY, I mean even your TODDLER, to completely understand what a FUNCTION is:

Even your own BODY is a function! You give it some kind of input...let's say, a peanut butter sandwich. Your body performs some kind of WORK on that input (in our case, digestion), and VOILA! You get some output. In this case, a turd.

There is absolutely NO difference whatsoever between a calculus function, a programmatic function, the Human function, or even the myriad of individual functions that work in harmony within our own ecosystem. A function receives something in, performs some work on it, and gives something back.

Pass this tidbit on to everyone you know, even and especially your kids, so that perhaps when they too first encounter Mr. Musgrave's endless repitition of "Eff of X, boys and girls, EFF OF X!", they can avoid the mental anguish of trying to grasp something so simple and common sense, yet perpetuated (for some odd reason) as being so deep and abstract.

And now, if you choose to accept, your Assignment:
Find the nearest individual who you think would be least likely to understand what a function is (young or old), take two minutes to teach them the concept using their own body, their Play Doh Fuzzy Pumper Number 9, the oven, or anything else you can think of that they can relate to, and see if their retention of the definition isn't 100% every time you ask them thereafter.

Doug out  :0)
Posted by dougboude at 1:27 AM | PRINT THIS POST! | Link | 1 comment
06 March 2008
What IS 'Business Logic', Anyway?
So I'm having a discussion with my friend Jim the other day about an article he was writing and I give him a suggestion regarding one of his sentences on the subject of encapsulation. He had stated that encapsulation is about hiding data, while I appended the fact that it also hides business logic. This prompted an immediate discussion on the term 'business logic', and what exactly it was and was not. So, I thought it good to share my own personal definition of the phrase in order to solicit the input of others to see if the way I think of it differs significantly from the connotation it holds for the community at large. I'm also adding this to my Personal OO Lexicon for posterity's sake.

Business Logic

So this Controller is sitting at the bar babying a Belvedere Gimlet when he gets a call from his Framework asking him to please provide the value for the current user's next inspection date. A bit perturbed but never one to tarry when the Framework makes a request, he immediately dials his peep, Joe Object, down in the Model district and asks for user 1287's next inspection date. Joe Object quickly does his thing and gives Controller the value he requested, who in turn hands it off to his Framework.

The process that Joe Object went through in order to calculate the user's next inspection date is an example of what is referred to as "Business Logic". It's the process, formula, algorithm, decision tree, methodology, query, magic 8 ball, or any other means used to perform a piece of work that is specific to this application.  'Business Logic' is the answer to the question "How did you get that value?".  Consider this dialogue: "Hey, Joe Object, how exactly did you come up with that inspection date?" asks Controller.  "Since my job is to encapsulate the processes I use, I can't tell you," Joe Object says. "All I CAN say is that I executed the business logic for that particular request and gave the result to you."


As an aside, anything that you the developer would classify as Business Logic (as defined above), is the PERFECT candidate for inclusion in the CFCs that compose your application's MODEL; in fact, I would go so far as to say that it is mandatory that such code reside within your model. The rule I use (which I gleaned from perusing blogs and mailing lists) when deciding if code is business logic or not is this: "If I had to change frameworks tomorrow and the ONLY thing I can take with me is my Model, is this a piece of functionality I would consider to be uniquely associated with this app?"
Posted by dougboude at 8:32 PM | PRINT THIS POST! | Link | 5 comments