How do you organize your small reusable cffunctions?

后端 未结 6 1373
孤街浪徒
孤街浪徒 2020-11-30 06:19

I am reorganizing my ColdFusion directory structures and am curious about how experienced CF developers are organizing libraries of smaller cffunctions.

I am not as

6条回答
  •  青春惊慌失措
    2020-11-30 06:54

    We use .cfm files for function libraries and call the appropriate file with cfinclude. Some of the .cfm files have been downloaded from cflib.org and others are written by us. The files are in a directory named UDF which is a subdirectory of another directory which is mapped to the forward slash character. The cfinclude statement is simply:

    
    

    This approach makes the functions available to all applications on the server.

    We also prefer the several small library approach. Each library is topic specific (math, string, list-array etc)

提交回复
热议问题