The "Newbie" tags

As a newbie, you can expect to hear comments about "newbie tags". You may hear "Oh, I'd never use CFINSERT or CFUPDATE, I only use SQL within CFQUERY". If you follow a discussion on this you won't see any strong technical cases against them and when I've pushed the discussion, it ends up being admitted that problems haven't been seen since 4.5 but "SQL is much more flexible and powerful".

Many ColdFusion developers have learned CF by going through examples found in big fat books that typically will run you through an INSERT action within CFQUERY and then introduce CFINSERT. The process is repeated with CFUPDATE. This a great approach as it provides a greater understanding of what is happening in these database actions while also introducing the reader to two sets of tools in the toolbox.

A recent CFDJ article listed problems with using CFINSERT and CFUPDATE. The arguments against the "newbie" tags were based on the assumption that a coder was either unable or unwilling to write SQL code. Below is a summary of the arguments with a rebuttal based on an assumption that the coder could do SQL code when needed:

CFINSERT and CFUPDATE Arguments
Against
Rebuttal
More difficult to debug Develop simple methods for finding and avoiding code errors.
Does not encourage learning SQL Learn SQL and use it in your coding thought process
Not self-documenting Not a big issue for most developers
Carries more performance overhead When performance is an issue, switch to CFQUERY/SQL.
Limits developers by enforcing variable naming convention CFINSERT/CFUPDATE only process variables from the form scope which is fine for simple data inputs. Use SQL for more complex inserts and updates.

He went on to infer that use of these "newbie" tags was not justifiable for developers that are capable of learning SQL. From my perspective, I would see it as irresponsible to bill a client the extra hours on a project writing SQL statements when I could have spent minutes by using CFINSERT and CFUPDATE. I have found cases where CFQUERY has problems in MX and CFINSERT and CFUPDATE do not.

Overall, we would all agree that a developer needs to understand what he is doing and be capable of using all of the tools that are at his disposal. As developers, we should not limit ourselves to, or restrict ourselves from the use of some of the components of what makes a language like CFML a rapid development tool.

Selling Points of CFINSERT and CFUPDATE
Requires less development time.
Accommodates additional fields with less code modification.
Handles some reserved words without special consideration.
Has little downside for developers that understand SQL and can debug INSERT and UPDATE errors.
Allows for more reusable code.