It's "Corfield" - no "n".
No disrespect for the family name intend.
You have a definite propensity to invoke false rational with out being sure of your facts.
1. The tool clearly states MSSQL 2000. The tool does not make any claims to support other databases.
2. The function isDefinedValue() purpose is to return a bit value and not a logic name. Examples are not within the scope of the function's purpose.
3. Agreed that the use of listLen is a weak construct but listGetAt is deterministic. The function is for CF5 so forget cfloop.
4. Request.IN.FIELDNAMES must be set to a value before calling structKeyList because: "A list of keys; if structure does not exist, ColdFusion throws an exception"
5. "Joseph's whole point is about best practices and arguing that CFSQLTool is a good example to follow." That is not the whole point. The point is that CFSQLTool is a new design tool for creating CRUD queries. I published the entire code on CFOpen so people can choose to improve.
About the outrageous remarks concerning default.cfm. Did you look at the readme?
For your education, Microsoft has nothing to do with my use default.cfm. Actually Allaire did. In 1995, default.htm was popular the O'Reillly Website and default.cfm was popular with people running CF on Website. Also, index.htm was used with WAIS.
It is correct that I do not agree what some of the things you preach are best practices, certainly not always good architecture. I have said before you are a good with programing tricks.
I will ask this again.
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
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]
http://www.switch-box.org/CFSQLTool/Download/
Switch_box
www.Switch-box.org
----------------------------------------------------------
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]
