Home >Knowledge Center > Technologies Trends
         
 

ColdFusion Main > ColdFusion Articles ColdFusion Tips

ColdFusion Tips

   1. Pre-Template

         1. Segment your files

         2. Always use .cfm extensions

         3. Have meaningful file names

         4. Always have an application.cfm and a onrequestend.cfm

         5. Always save your files as lower

   2. Documentation

         1. Use a standard information header -

         2. Segment your code

         3. Comment each segment.

         4. If you comment out code, tell why

         5. Map your resources

   3. Code

         1. Every app should have a CFAPPLICATION tag

         2. Run application defaults ONCE

         3. Scope your variables

         4. Never use pounds (#) in an evaluation zone

         5. Use functions when doing TEXT comparisons

         6. Remember Short Circuited Boolean Evaluation
 
         7. Never use IIF - If you can help it, don't use the IIF function. It is half as fast as a normal CFIF.

         8. Use CFSWITCH when you.
 
         9. Use CFSCRIPT

        10. Lock network protocols

        11. Lock memory-based state management variables

        12. Restrict your query returns

        13. Never nest loops deeper than 3 levels

        14. Indent your code

        15. Lowercase all paths and files

   4. Modules
      
         1. Use CFMODULE over CF

         2. Be careful what you pass.

         3. Use CFINCLUDE over CFMODULE

         4. Never nest deeper than 3 levels.  

IIf you are looking for programmers and web developers for ColdFusion programming, please
contact us
For more details please visit our ColdFusion Services section.

Click here for more
ColdFusion articles.

 

 


Print this page   Email to Friend