Ben Forta

Blog

December 7, 2000

Use Cookies with Care

Cookies are a very useful technology and an important part of any developers toolbox. But lots of hype and paranoia have contributed to many users fearing and disabling support for them. As such, you must never assume that just because you set a cookie it'll be there - always check for it's...

December 6, 2000

Expressions in Loop Ranges

allows developers to create several types of loop, including a range loop (FROM a value TO a value). The values passed to FROM and TO may be any expression, but pay special attention when you use expressions that could change mid-loop - ColdFusion will ignore any new values and will only evaluate...

December 5, 2000

Always Define Primary Keys

When designing your databases ensure that every table has a primary key so that every row in every table has a column (or set of columns) that uniquely identifies it. While primary keys are not actually required, experienced database designers ensure that every table they create has a primary key...

December 4, 2000

Undefined Array Elements

When is an array element not an array element? When it has never been used or initialized. ColdFusion expands arrays dynamically and as needed. So if you assign a value to array[2] after you create the array, ColdFusion will create elements 1 and 2 for you. But only element 2 will be a valid...

December 3, 2000

Safely Copying Structures

Structures cannot be copies using simple assignments (as in ), do that and you'll find that when the contents of one structure change, so do the contents of the other. To safely copy structures you must use the StructCopy() function. (Applies to: ColdFusion 4.5 (or later))

December 2, 2000

Use Hidden Forms Fields Carefully

Hidden form fields are a great way to pass data back and forth while processing a multi-part form -but you must use these carefully. As they are form fields they are essentially strings within quotes. As such, you must make sure to never place a string containing quotes in a hidden field. If you do...

November 30, 2000

Using Variable Variables

ColdFusion variables can be variables - in other words, you can refer to a variable name in a variable - and you can do this easily too. All you need to is refer to the variables like this to set the value of the variable referred to in var. (Applies to: ColdFusion 4 (or later))

November 29, 2000

Conditional Debugging

We've all had to embed debugging code into our pages only to have to take it all out, and then reinsert it again. The new ColdFusion IsDebugMode() function lets you programmatically determine if debugging is enabled, allowing you to leave debugging code in your pages knowing that it'll only be...

November 28, 2000

Finding Supported Locales

ColdFusion supports the internationalization of numbers, dates, currencies, and more using the LS functions. These functions generate output that varies based on the currently selected locale (set using the SetLocale() function). A list of supported locales is stored in the...

Page 481 of 489 (4885 posts)