Coding Conventions free your mind
As I have spent more and more time programming, and have had to go back an rewrite old code I've learned the hard way the programming conventions and guidelines are an absolute must.
As a wiser more seasoned (and humbler programmer) what I have realised is that they free your mind up from the petty decisions (what should I call this file?, should it be camelcase or underscore seperated?, should a form submit to itself or a another page? etc), and allow you to focus on the big decisions (is this application structured correctly, does it do what the end user needs etc).
A point worth making is that while many of the programming conventions that I now use are not inherently better than the other options (eg camelcase vs underscore seperated variable names) it's just that I do it consistently (and in a team everyone agree on them) and so the code is consistent and easy to read for everyone.
Another important guideline that we have concern where code should reside:
- Core business logic - CFC's
- Useful utilities and functions - CFC's
- Any nasty hacks - CFC's
- Display templates and HTML - CFM
- Reuseable display templates - Imported CFM custom tags
A good start for programming conventions for your team is ColdFusion MX Coding Guidelines by Sean Corfield
Cheers, Mark




There are no comments for this entry.
[Add Comment]