![]() |
|||||
PRODUCTION COLDFUSION APPLICATION REQUIREMENTS
December 15, 2003 (v.2.0.1) The requirements are grouped into 2 sets: All applications are expected to meet the server-critical requirements. These requirements affect the performance of the servers and Web Services may disable your applications if they fall short of these standards. The support-critical standards are highly recommended. In case of issues with your application where Web Services is required to support the application, there is a possiblity that the application may be deemed unsupportable due to the fact it does not meet the support-critical requirements. Web services has set up an automated tool to check ColdFusion files to make sure they meet the server-critical requirements. Restricted tags
Application.cfm Every application must have an accompanying application.cfm file. The application name will be specified using the CFAPPLICATION tag. The application name is vital for ColdFusion log files and for application variables. All datasource names should be defined in the application.cfm file using the request scope (request.dsn=yourdatasourcename). This allows developers the flexibility of changing datasources without having to do a global search and replace. Error trapping Developers have to include error trapping by using the CFERROR, CFCATCH or the CF_ErrorTrapping custom tag. Database design The developer must make every effort to optimize their databases. In order to achieve that, developers should (a) define field types accurately, and (b) specify the right length for text fields. All searchable fields should be indexed. Queries Queries must be cached, unless you expect frequent changes to the resultset. The cached time may be stored as an application variable for ease of use. Use WHERE in your SQL instead of relying on CFIF's. Wherever possible, limit the result sets in order to save processing time. Variables Session variables should have a timeout specified in the CFAPPLICATION tag and destroyed when not needed. The CFLOCK tag should be used to lock variables when writing to session and application variables. Forms User input from a form should be validated, especially in the case of numeric and date entries. Developers may use the form field validation method provided by ColdFusion or write their own validation script.
Methodology All production ColdFusion applications are required to use Fusebox as the application methodology. The version of Fusebox to be used is entirely dependent on the developer's level of comfort. However, it is required that at the very minimum, a developer adhere to the version of Fusebox documented on the web services site. All objects will reside in an associated directory. The index.cfm page in a directory will serve as the switch (controls flow of application). Every action (fuse) for an object will have an associated file in the object’s directory. Prefix file names with the template type. Documentation Documenting code is very essential in a University environment. Applications have multiple developers, change hands and are subject to review by others. All developers are required to document their code. Application.cfm Application, session and client variables should be specified in the application.cfm file using CFPARAM. Queries Developers should name queries in the CFQUERY tag using legible names. To refer to a field from the resultset of a query directly, use the format "queryname.fieldname". As a good practice, SQL keywords must always be uppercase. When referring to a particular field in a table within a query, developers should always use the format "tablename.fieldname". Variables Use legible names when defining variables. ColdFusion variables are not of a defined type and this complicates the debugging process. It is recommended that developers prefix variable names with the abbreviated type. Example: strLastName Developers should make an effort to scope the variable whenever possible. Forms We recommend developers use the HTML FORM over CFFORM. Code indentation Developers must indent their code for better readability and to speed up the review process. Place the attributes for ColdFusion tags on separate lines for easier readability. |
|||||