Ben Forta

Blog

October 18, 2000

Why Use Native Database Drivers

Ask many developers why native database drivers should be used (instead of ODBC drivers) and you'll almost always be told that it is to improve performance. But the truth is, there is very little performance gain (if any) when using native database drivers, so if that is the reason you are...

October 17, 2000

or ?

is used to call stored-procedures. can be used to call stored procedures too. So which should you use? is simpler to use, but it does not support the use of multiple result sets, return codes, or output parameters. is a little trickier to use, but supports all of these. Plus, queries can be cached,...

October 16, 2000

Keep Variable Names and Column Names Consistent

Form field names, variable names, anything that contains data that corresponds to database columns should be named exactly the same as the columns they represent. This will simplify your coding and debugging dramatically. (Applies to: ColdFusion All)

October 15, 2000

Use Try-Catch Handling

lets you display a specific page if an error occurs, but that is usually not enough. To take programmatic action when an error occurs (for example, notifying yourself via e-mail, or attempting to fix the problem) you should use try-catch handling using the and tags. (Applies to: ColdFusion 4 (or...

October 14, 2000

Drag-and-Drop HREF's

Need to create a link to a local file in Studio? Just find that file in the Resource Tab and drag it into your code - a complete will be generated, and the page will automatically be the link text. Of course, this will only work if you have already saved the file you are working on (if not Studio...

October 13, 2000

Use IsDefined() Instead of ParameterExists()

The ParameterExists() function checks to see if a variable exists, so does IsDefined(). But IsDefined() is far more powerful and flexible, and should be used instead of the older ParameterExists() function. You can use IsDefined() anywhere you used ParameterExists(), but there is one important...

October 12, 2000

Commenting Out Code

Need to temporarily remove a line or two of code while testing your CF app? Comment the code out by putting after. The code between those comment tags will not be processed by ColdFusion. (Applies to: ColdFusion All)

October 10, 2000

Don't Run Applications or Services That Are Not Needed

ColdFusion should be running on a dedicated box running nothing else (other than the operating system and HTTP server, of course). So that ColdFusion has access to all the resources possible, make sure that no other unnecessary applications, services, or daemons are running (many are installed and...

October 9, 2000

Accessing Global Variables From Within Custom Tags

The APPLICATION.CFM file is often used to define application wide (or global) variables that are visible to all code. However, Custom Tags do not process the APPLICATION.CFM file, so code within Custom Tags will not have access to these variables unless you explicitly pass them as attributes. You...

Page 486 of 489 (4885 posts)