It's "Corfield" - no "n".

I'd be happy to review CFSQLTool again if you're making changes to it.
Does it work with MySQL and run on non-Windows platforms? Version
1.9p5 doesn't seem to work with MySQL.

Looking through the code, there's definitely stuff that makes me shudder:

                for (i=1;i lte listLen(orderList); i = i+1){
                        switch( UCase(listGetAt(orderList,i))) {

listLen() is an expensive function to call on every iteration of the
loop, as is listGetAt(). Using <cfloop list=...> would be much cleaner
and faster.

Later in the same file:

        request.IN.FIELDNAMES = ""; // make sure fieldnames exist and is empty
        request.IN.FIELDNAMES = structKeyList(request.IN); // make list of 
fieldnames

Why set it to "" and immediately set it to another string? And the
next line sets it to yet another value (and, again, uses a very
inefficient approach).

Then there's function isDefinedValue(varname) which returns 1 or 0 -
what's wrong with true and false? It's a boolean test function, not a
numeric computation function yes? And that function contains:

            if (StructIsEmpty(varvalue)) { return 0;}
            else {return 1;}

How about just doing "return not StructIsEmpty(varvalue)" ? There's a
slew of similar conditions.

And that's just Application.cfm. That's really the sort of stuff I
mean by saying don't look for good practices in CFSQLTool. It's not
just the generated code, it's the source code itself.

Use of default.cfm instead of index.cfm shows the deep-rooted Windows
bias in the app (took me a while to figure out how to get the app
started since I was confronted by a directory listing!).

BTW, "Invalid" and "OFFLINE" are one word not two: "In valid page name
request", "OFF LINE FOR UPDATES."

Before anyone thinks I'm attacking Joseph's code unnecessarily here,
bear in mind that Joseph's whole point is about best practices and
arguing that CFSQLTool is a good example to follow. If someone puts up
some code to do a particular job and says "Er, don't look at the code,
it's kind of messy!" then no one is going to pick it apart and
criticize the fact that it's messy. If someone holds up an app as best
practice that they think other folks should follow, expect criticism
of the code.

Regards,
Sean

On 11/8/05, Joseph Flanigan <[EMAIL PROTECTED]> wrote:
> Sean:
>     You said, " if someone is looking to learn *good* OO practices,
> CFSQLTool is definitely not the place to
> look."
>
> So if CFQLTool outputs getter and setter will you retract this statement?
>
> Joseph
>


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to